@font-face {
    font-family: 'ComicNeue-Angular-Bold';
    src: url('../fonts/ComicNeue-Angular-Bold.ttf') format('truetype');
}

body {
    margin: 0;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    background-color: #65b4d3;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    color: white;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    z-index: -1;
}

.cloud {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.9;
    z-index: -1;
}

.cloud-1 {
    width: 180px;
    height: 60px;
    bottom: 20%;
    left: 5%;
    animation: float 20s infinite ease-in-out;
}

.cloud-2 {
    width: 220px;
    height: 70px;
    bottom: 40%;
    right: 10%;
    animation: float 25s infinite ease-in-out reverse;
}

.cloud-3 {
    width: 150px;
    height: 50px;
    top: 15%;
    left: 15%;
    animation: float 22s infinite ease-in-out 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-15px) translateX(15px); }
    50% { transform: translateY(0) translateX(30px); }
    75% { transform: translateY(15px) translateX(15px); }
}

.container {
    background-color: #7a4628;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 8px solid;
    border-image: linear-gradient(to bottom right, #9b5a34, #5a351e) 1;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.2;
    z-index: 0;
}

.container > * {
    position: relative;
    z-index: 1;
}

.header {
    background-color: #6aaa3b;
    padding: 12px;
    border-radius: 10px;
    font-size: 28px;
    margin: -15px -15px 15px -15px;
    color: white;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    border: 6px solid;
    border-image: linear-gradient(to bottom right, #8bc958, #54882e) 1;
    position: relative;
    overflow: hidden;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.2;
    z-index: 0;
}

.header span {
    position: relative;
    z-index: 1;
}

.choose-text {
    background-color: #5a351e;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    color: white;
    font-size: 22px;
    margin: 5px 0 15px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 3px solid #412615;
}

.rewards {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    padding: 15px;
    border-radius: 15px;
    background: linear-gradient(90deg, #00ffcc, #33ccff, #66ccff, #99ccff);
    background-size: 400% 400%;
    animation: rainbow-scroll 8s ease infinite;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes rainbow-scroll {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.reward-item {
    position: relative;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.reward-item::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    top: -25%;
    left: -25%;
    opacity: 0;
    animation: spotlight 4s infinite linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes spotlight {
    0% {
        transform: rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    30% {
        opacity: 0;
    }
    100% {
        transform: rotate(360deg);
        opacity: 0;
    }
}

.reward-item:nth-child(1)::after {
    animation-delay: 0s;
}

.reward-item:nth-child(2)::after {
    animation-delay: 1s;
}

.reward-item:nth-child(3)::after {
    animation-delay: 2s;
}

.reward-item:nth-child(4)::after {
    animation-delay: 3s;
}

.reward-item:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.reward-item img {
    width: 70px;
    height: 70px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.reward-item:hover img {
    transform: scale(1.05);
}

.reward-item.active {
    border-color: #ffff00;
    box-shadow: 0 0 25px #ffff00, inset 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.12);
}

.reward-item.active::after {
    opacity: 0.7;
    animation: spotlight 2s infinite linear;
}

.checkmark {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: #2dc52d;
    border: 3px solid white;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
    display: none;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.reward-item.active .checkmark {
    display: block;
}

.input-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
    background-color: #5a351e;
    border-radius: 12px;
    padding: 8px 15px;
    border: 4px solid;
    border-image: linear-gradient(to bottom right, #7c4c2f, #412615) 1;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3), 0 5px 10px rgba(0, 0, 0, 0.2);
}

.input-label {
    font-size: 20px;
    color: white;
    margin-right: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.username-input {
    flex: 1;
    padding: 12px;
    font-family: inherit;
    font-size: 18px;
    color: white;
    background-color: #412615;
    border-radius: 8px;
    border: 3px solid #7c4c2f;
    outline: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.username-input:focus {
    border-color: #ffcc00;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 204, 0, 0.6);
}

.username-input::placeholder {
    color: #c7c7c7;
}

.next-btn {
    background-color: #6aaa3b;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    font-size: 22px;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    box-shadow: 0 6px 0 #54882e, 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #54882e, 0 12px 20px rgba(0, 0, 0, 0.4);
}

.next-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #54882e, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.15;
    z-index: 0;
}

.next-btn span {
    position: relative;
    z-index: 1;
}

.loading-text {
    font-size: 40px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
    color: #ffcc00;
}

.loading-text span {
    animation: dots 1.4s infinite;
    opacity: 0;
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00;
}

.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.2s; }
.loading-text span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dots {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

#verification-container .header {
    background-color: #6aaa3b;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 28px;
    margin: -15px -15px 15px -15px;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    border: 6px solid;
    border-image: linear-gradient(to bottom right, #8bc958, #54882e) 1;
    position: relative;
    overflow: hidden;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#verification-container .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.2;
    z-index: 0;
}

#verification-container .header span {
    position: relative;
    z-index: 2;
}

.verification-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #5a351e;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
}

.verification-body p {
    margin: 10px 0;
    color: white;
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.verification-reason {
    font-size: 16px;
    color: #ffcc99;
    margin: 5px 0 15px 0;
    text-align: center;
}

.verify-btn {
    background-color: #6aaa3b;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    margin-top: 5px;
    position: relative;
    overflow: hidden;
}

.verify-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.15;
    z-index: 0;
}

.verify-btn span {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.verify-btn:hover {
    transform: translateY(-2px);
}

.verify-btn:active {
    transform: translateY(2px);
}

.verify-btn.loading span {
    display: none;
}

.spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

.verify-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.page-loading.fade-out {
    opacity: 0;
}

.page-loading-text {
    color: white;
    font-size: 36px;
    text-shadow: 0 0 10px #ffcc00;
    letter-spacing: 2px;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ffcc00, 0 0 20px #ffcc00;
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ffcc00, 0 0 40px #ffcc00;
    }
}

.affiliation {
    position: fixed;
    bottom: 15px;
    right: 15px;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.8;
    z-index: 100;
}

.welcome-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.welcome-content {
    background-color: #7a4628;
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 8px solid;
    border-image: linear-gradient(to bottom right, #9b5a34, #5a351e) 1;
    text-align: center;
}

.welcome-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/stud.png');
    background-size: 32px 32px;
    opacity: 0.2;
    z-index: 0;
}

.welcome-header {
    background-color: #6aaa3b;
    padding: 12px;
    border-radius: 10px;
    font-size: 28px;
    margin: -20px -20px 15px -20px;
    color: white;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    border: 6px solid;
    border-image: linear-gradient(to bottom right, #8bc958, #54882e) 1;
    position: relative;
    overflow: hidden;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.welcome-body {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.welcome-body p {
    margin: 10px 0;
}

.welcome-body strong {
    color: #ffcc00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.welcome-close {
    background-color: #6aaa3b;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'ComicNeue-Angular-Bold', sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px #3e6223, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 0 #54882e, 0 6px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.welcome-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #54882e, 0 8px 15px rgba(0, 0, 0, 0.4);
}

.welcome-close:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #54882e, 0 3px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 520px) {
    .container {
        width: 90%;
        padding: 10px;
    }

    .header {
        font-size: 24px;
        padding: 10px;
    }

    .choose-text {
        font-size: 18px;
    }

    .rewards {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .reward-item {
        width: 70px;
        height: 70px;
    }

    .reward-item img {
        width: 60px;
        height: 60px;
    }

    .input-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-label {
        margin-bottom: 8px;
        margin-right: 0;
    }

    .username-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-content {
        width: 95%;
        padding: 15px;
    }
    
    .welcome-header {
        font-size: 22px;
    }
    
    .welcome-body {
        font-size: 14px;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}