/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.register-page {
    font-family: 'SeccaSoftW03-UltraBlack', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

body:not(.register-page) {
    overflow: auto !important;
}

/* Background */
.register-wrapper {
    position: relative;
    min-height: 150vh;
    height: auto;
    background-image: url('../../public/register_assets/background_register.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 50px 0 100px 0;
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 40px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 150vh;
}

.register-container {
    width: 100%;
    max-width: 450px;
    text-align: center;
    padding: 40px 0 80px 0;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 3;
    margin-top: 20px;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.moai-logo {
    height: 160px;
    width: auto;
    filter:
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
    transition: all 0.3s ease;
}

.logo-container:hover .moai-logo {
    transform: scale(1.05);
}

/* Form Styles */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 3;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
}

.form-label {
    font-family: 'SeccaSoftW03-UltraBlack', cursive;
    font-size: 16px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 8px;
    -webkit-text-stroke: 1px #000;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-left: 15px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-asset {
    position: absolute;
    width: 100%;
    height: auto;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.form-input {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    outline: none;
    width: 80%;
    height: 50px;
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    font-family: 'Inter', sans-serif;
    margin-top: 3px;
}

.form-input::placeholder {
    color: #666;
    font-weight: 400;
}

.form-input:focus {
    color: #000;
}

.form-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 15px auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 350px;
    width: 100%;
}

.checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    appearance: none;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #FFD700;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.form-checkbox:checked {
    background: #FFD700;
    border-color: #FFA500;
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.checkbox-label {
    font-family: 'SeccaSoftW03-UltraBlack', cursive;
    font-size: 14px;
    font-weight: 500;
    color: #FFD700;
    cursor: pointer;
    -webkit-text-stroke: 0.5px #000;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Button Styles */
.button-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto 30px auto;
    width: 100%;
    max-width: 350px;
}

.button-asset {
    position: absolute;
    width: 100%;
    max-width: 300px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.register-button {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    max-width: 300px;
    height: 55px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: transparent;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-button:hover {
    transform: translateY(-2px);
}

.register-button:active {
    transform: translateY(0);
}

.register-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    opacity: 0;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.button-loader.active {
    opacity: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Footer Links */
.form-footer {
    margin-top: 40px;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.links-container {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.footer-link {
    font-family: 'SeccaSoftW03-UltraBlack', cursive;
    color: #FFD700;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    -webkit-text-stroke: 0.5px #000;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.footer-link:hover {
    color: #FFA500;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 30px 15px;
        min-height: 150vh;
    }

    .register-container {
        max-width: 100%;
        padding: 30px 0 70px 0;
    }

    .register-wrapper {
        padding: 30px 0 60px 0;
        background-attachment: scroll;
        min-height: 150vh;
    }

    .logo-section {
        margin-bottom: 40px;
        margin-top: 15px;
    }

    .moai-logo {
        height: 140px;
    }

    .input-wrapper {
        max-width: 320px;
    }

    .form-input {
        height: 45px;
        font-size: 14px;
        width: 78%;
        margin-top: 2px;
    }

    .form-label {
        font-size: 15px;
        margin-left: 12px;
    }

    .button-wrapper {
        margin: 35px auto 25px auto;
        max-width: 320px;
    }

    .button-asset {
        max-width: 280px;
    }

    .register-button {
        height: 50px;
        font-size: 16px;
        max-width: 280px;
    }

    .checkbox-group {
        max-width: 320px;
        padding: 10px;
        margin: 12px auto;
    }

    .checkbox-label {
        font-size: 13px;
    }

    .form-checkbox {
        width: 18px;
        height: 18px;
    }

    .form-footer {
        max-width: 320px;
        margin-bottom: 50px;
    }

    .links-container {
        gap: 20px;
    }

    .footer-link {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 10px;
        min-height: 150vh;
    }

    .register-container {
        padding: 25px 0 60px 0;
    }

    .register-wrapper {
        padding: 25px 0 50px 0;
        background-attachment: scroll;
        min-height: 150vh;
    }

    .logo-section {
        margin-bottom: 30px;
        margin-top: 10px;
    }

    .moai-logo {
        height: 120px;
    }

    .input-wrapper {
        max-width: 280px;
    }

    .form-input {
        height: 42px;
        font-size: 13px;
        padding: 12px 15px;
        width: 75%;
        margin-top: 2px;
    }

    .form-label {
        font-size: 14px;
        margin-left: 10px;
    }

    .button-wrapper {
        max-width: 280px;
        margin: 30px auto 20px auto;
    }

    .button-asset {
        max-width: 250px;
    }

    .register-button {
        height: 48px;
        font-size: 15px;
        max-width: 250px;
    }

    .checkbox-group {
        max-width: 280px;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        margin: 10px auto;
    }

    .checkbox-label {
        font-size: 12px;
        text-align: center;
    }

    .form-footer {
        max-width: 280px;
        margin-bottom: 40px;
    }

    .links-container {
        flex-direction: column;
        gap: 12px;
    }

    .footer-link {
        font-size: 12px;
    }
}

/* Animation for form elements */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

.checkbox-group {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.7s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.button-wrapper {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.8s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.form-footer {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.9s;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.form-input:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
