/* Error message styling for registration form */
.error-message {
    display: block;
    color: white;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 0;
    line-height: 1.2;
}
@font-face {
    font-family: "DIN LT Heavy";
    src: url(../Fonts/din-next-lt-pro-condensed-heavy.otf);
    font-style: normal;
}

@font-face {
    font-family: "DIN Bold Con";
    src: url(../Fonts/DINNextLTPro-BoldCondensed.ttf);
    font-style: normal;
}

@font-face {
    font-family: "DIN Medium";
    src: url(../Fonts/DINNextLTPro-MediumCond.ttf);
    font-style: normal;
}

/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    /* background: linear-gradient(135deg, #8B1538 0%, #DC2626 50%, #8B1538 100%); */
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    /* background: linear-gradient(135deg, #8B1538 0%, #DC2626 50%, #8B1538 100%); */
    background: url(../images/bg.png) no-repeat center center/100% 100%;
}

#loaderGif {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* Ensure it's above other content */
}


/* Header Styles */
.header {
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.logo-img {
    width: 120px;
    height: auto;
}

/* Registration Page Styles */
.registration-page .form-container {
    padding: 20px;
    position: relative;
    z-index: 10;
}

.registration-form {
    font-family: "DIN Medium", sans-serif;
    letter-spacing: 1.2px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image: url(../images/form-bg.png);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 20px;
    margin-top: -1rem;
    margin-bottom: 10rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group select {
    font-family: "DIN Medium", sans-serif;
    letter-spacing: 1.2px;
    padding: 8px;
    padding-left: 10px;
    padding-right: 10px;
    border: 2px solid #fff;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: bold;
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.form-group select {
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group select option {
    background: #8B1538;
    color: white;
}

.phone-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-family: "DIN Medium", sans-serif;
    gap: 10px;
}

.country-code {
    font-family: "DIN Medium", sans-serif;
    width: 80px;
    /* padding: 15px 10px; */
    padding: 8px;
    padding-left: 10px;
    padding-right: 10px;
    border: 2px solid #fff;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: bold;
    outline: none;
    text-align: center;
    letter-spacing: 1.2px;
}

.phone-group input {
    flex: 1;
    padding: 8px;
    padding-left: 10px;
    padding-right: 10px;
    border: 2px solid #fff;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: bold;
    outline: none;
    font-family: "DIN Medium", sans-serif;
    letter-spacing: 1.2px;
}

.phone-group input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.mandatory-note {
    color: rgba(249, 183, 88, 1);
    font-size: 9px;
    text-align: left;
    margin-top: -10px;
    margin-left: 15px;
}

/* Question Section */
.question-section {
    margin: 20px 0;
}

.question-section h3 {
    color: rgba(249, 183, 88, 1);
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: center;
    /* box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.5); */
}

.radio-group {
    display: flex;
    gap: 20px;
    justify-content: space-evenly;
    align-items: center;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    accent-color: #F59E0B;
}

.radio-option span {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Checkbox Section */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    /* cursor: pointer; */
    line-height: 1.4;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    accent-color: #F59E0B;
    flex-shrink: 0;
}

.checkbox-option span {
    color: white;
    font-size: 9px;
    font-weight: normal;
}

/* Submit Button */
.submit-btn {
    font-family: "DIN Bold Con", sans-serif;
    background: rgba(249, 183, 88, 1);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    max-width: 200px;
    align-self: center;
    width: 100%;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* Game Page Styles */
.game-page {
    text-align: center;
}

.content {
    background: url(../images/form-bg.png);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 20px;
    padding: 20px 5px 20px 5px;
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 2rem;
}

/* .message {
    margin-bottom: 30px;
} */

.game-message{
    font-family: "DIN Medium", sans-serif;
    margin-bottom: 30px;
    z-index: 5;
}

.game-message img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.message p {
    font-size: 16px;
    line-height: 1.5;
    /* margin-bottom: 10px; */
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-box {
    position: relative;
    width: 280px;
    height: 200px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gifImg{
    padding: 1rem;
    width: 100%;
    width: 310px;
    height: 230px;
    border-radius: 28px;
    margin-top: 0.3rem;
}

.game-placeholder {
    text-align: center;
    color: #666;
}

.game-placeholder p {
    font-size: 16px;
    margin-bottom: 10px;
}

.game-placeholder small {
    font-size: 12px;
    color: #999;
}

.play-btn {
    font-family: "DIN Bold Con", sans-serif;
    width: 200px;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.skip-btn {
    font-family: "DIN Medium", sans-serif;
    background: transparent;
    color: white;
    text-decoration: underline;
    /* border: 2px solid white; */
}

.play-btn:hover,
.skip-btn:hover {
    transform: translateY(-2px);
}

/* Leaderboard Page Styles */
.leaderboard-page {
    /* padding: 20px; */
    text-align: center;
}

.leaderboard-content {
    font-family: "DIN Medium", sans-serif;
    background: url(../images/form-bg.png);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 20px;
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 4rem;
}

.leaderboard-top-section {
    padding: 20px;
    border-top-left-radius: 45px;
    border-top-right-radius: 45px;
    background: rgba(41, 41, 41, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    padding: 20px 15px 15px;
}

.leaderboard-btn {
    font-family: "DIN LT Heavy", sans-serif;
    position: absolute;
    z-index: 10;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 20px;
    letter-spacing: 1.3px;
    font-weight: bold;
    margin: 20px 0;
    transition: transform 0.2s;
}

.user-score {
    font-family: "DIN Bold Con", sans-serif;
    margin: 20px 0;
    font-size: 20px;
    font-weight: bold;
}

/* Top Three Podium */
.top-three {
    font-family: "DIN Bold Con", sans-serif;
    margin: -5px 0;
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: -30px;
}

.position {
    max-width: 85px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.position.first {
    order: 2;
    margin: 25px 12px;
}

.position.second {
    order: 1;
}

.position.third {
    order: 3;
}

.avatar {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
}

.position.first .avatar {
    width: 50px;
    height: 55px;
    background: url(../images/rank1_cleanup.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.position.second .avatar {
    width: 50px;
    height: 55px;
    background: url(../images/rank2.png) no-repeat center center/100% 100%;
}

.position.third .avatar {
    width: 50px;
    height: 55px;
    background: url(../images/rank3.png) no-repeat center center/100% 100%;
}

.crown {
    position: absolute;
    top: -15px;
    left: 80%;
    background: url(../images/Vector.png);
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.crown.winner {
    background: gold;
    width: 30px;
    height: 30px;
    top: -20px;
}

.position .name {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 5px;
}

.position .score {
    font-size: 12px;
    color: #FFF;
}

/* Leaderboard List */
.leaderboard-list {
    font-family: "DIN Medium", sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    height: 225px;
    overflow-y: auto;
}

::-webkit-scrollbar {
    display: none;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.leaderboard-item:hover {
    background: rgba(249, 183, 88, 1);
    transition: background 0.3s ease;
}

.leaderboard-item.highlight {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.leaderboard-item .rank {
    font-size: 16px;
    font-weight: bold;
    width: 30px;
    color: #8B1538;
}

.leaderboard-item.highlight .rank {
    color: white;
}

.player-info {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.avatar-small {
    width: 35px;
    height: 35px;
    background: url(../images/user.png) no-repeat center center/100% 100%;
    border-radius: 50%;
    margin-right: 15px;
    /* border: 1px solid #8B1538; */
    color: #fff;
}

.leaderboard-item.highlight .avatar-small {
    border-color: white;
}

.player-info .name {
    font-size: 14px;
    font-weight: bold;
    color: #8B1538;
}

.leaderboard-item.highlight .player-info .name {
    color: white;
}

.points {
    font-size: 14px;
    font-weight: bold;
    color: #8B1538;
}

.leaderboard-item.highlight .points {
    color: white;
}

/* Thank You Page Styles */
.thankyou-page {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.thankyou-content {
    background: url(../images/form-bg.png);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 20px;
    text-align: center;
    margin-left: 15px;
    margin-right: 15px;
}

.thank-you-message p {
    font-family: "DIN Medium", sans-serif;
    font-size: 18px;
    line-height: 1.6;
    max-width: 350px;
}

/* Footer Graphics */
.footer-graphics {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 200px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.silhouettes {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 150'%3E%3Cpath fill='%23000' opacity='0.3' d='M0 150h400V100c-20 0-40-10-60-5-25 8-35-15-60-10-30 6-45 20-80 15-40-6-55-25-95-20-35 4-50 15-85 10-20-3-20-10-20-10V150z'/%3E%3C/svg%3E") no-repeat center bottom;
    background-size: cover;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }

    .form-container,
    .content {
        padding: 15px;
    }

    .game-box {
        width: 250px;
        height: 180px;
    }

    .gifImg{
        width: 270px;
        height: 205px;
    }

    .podium {
        gap: 5px;
    }

    .position .avatar {
        width: 50px;
        height: 50px;
    }

    .position.first .avatar {
        width: 65px;
        background: url(../images/rank1.png) no-repeat center center/100% 100%;
        height: 65px;
    }

    .thank-you-message h1 {
        font-size: 36px;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Apply animations */
.registration-form {
    animation: fadeIn 0.8s ease-out;
}

.game-container {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.leaderboard-list .leaderboard-item {
    animation: slideIn 0.6s ease-out;
}

.leaderboard-list .leaderboard-item:nth-child(1) {
    animation-delay: 0.1s;
}

.leaderboard-list .leaderboard-item:nth-child(2) {
    animation-delay: 0.2s;
}

.leaderboard-list .leaderboard-item:nth-child(3) {
    animation-delay: 0.3s;
}

.thank-you-message {
    animation: fadeIn 1s ease-out;
}

/* Button hover effects */
.submit-btn:active,
.play-btn:active,
.skip-btn:active,
.leaderboard-btn:active {
    transform: translateY(1px);
}

/* Focus states for accessibility */
input:focus,
select:focus,
button:focus {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}