/* ========================================
   SIGNUP PAGE
   Split-screen registration page
======================================== */

/* Header Logo Styling */
.floating-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    z-index: 1000;
}

.floating-nav .nav-container {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 1000;
    pointer-events: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.logo-33 {
    display: flex;
    align-items: center;
}

.logo-33 svg {
    width: 28px;
    height: 28px;
    margin-right: 10px;
}

.logo-text {
    font-family: 'Do Hyeon', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.signup-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Left Side - Form with Topo Background */
.signup-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem 1rem 2rem;
    /* Adjusted padding to clear logo but not leave too much space */
    position: relative;
    overflow: hidden;
    background: var(--background-primary, #0a0a0a);
}

.signup-topo-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.signup-spotlight {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(10, 10, 10, 0.1) 0%,
            rgba(10, 10, 10, 0.93) 100%);
    transition: opacity 0.1s ease;
}

.signup-form-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(30, 30, 30, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.signup-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.signup-title {
    font-size: 1.75rem;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #f1a817 0%, #c8830f 50%, #a6690c 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.signup-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Social Signup Buttons */
.social-signup-buttons {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.social-signup-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-signup-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-signup-btn i {
    font-size: 1.2rem;
}

.social-signup-btn.google {
    border-color: rgba(255, 255, 255, 0.15);
}

.social-signup-btn.google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.social-signup-btn.discord {
    border-color: rgba(255, 255, 255, 0.15);
}

.social-signup-btn.discord:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Divider */
.signup-divider {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.signup-divider::before,
.signup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.signup-divider span {
    padding: 0 1rem;
}

/* Signup Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 auto;
    /* Center horizontally */
    width: 100%;
    max-width: 440px;
}

/* Error Box Wrapper - Reserve fixed space to prevent layout shift */
.signup-error-wrapper {
    min-height: 55px;
    /* Reserve space for error box */
    display: flex;
    align-items: center;
    margin-top: 0.375rem;
}

/* Error Box - Static in flow, positioned before submit button */
.signup-error-box {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: slideDown 0.3s ease;
    backdrop-filter: blur(10px);
}

.signup-error-box i {
    font-size: 1.125rem;
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Add fade out class */
.signup-error-box.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.signup-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.signup-form-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.signup-form-input {
    padding: 0.75rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.signup-form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.signup-form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.signup-form-submit {
    padding: 0.75rem 1.25rem;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    color: #000000;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0;
    /* No extra margin, wrapper handles spacing */
}

.signup-form-submit:hover {
    background: #ffb930;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(241, 168, 23, 0.3);
}

.signup-form-submit:active {
    transform: translateY(0);
}

.signup-footer {
    text-align: center;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.signup-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-footer a:hover {
    color: #ffb930;
}

/* ========== OTP Verification Step ========== */

/* Hide/Show Steps */
.signup-step {
    display: none;
}

.signup-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OTP Section */
.otp-section {
    margin-top: 1rem;
}

.otp-instruction {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.otp-instruction strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* OTP Input Grid */
.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    justify-content: center;
}

.otp-input {
    width: 100%;
    aspect-ratio: 1;
    max-width: 50px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(241, 168, 23, 0.1);
}

.otp-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.otp-timer i {
    color: var(--accent-color);
}

.otp-timer.expired {
    color: #ff6b6b;
}

.otp-timer.expired i {
    color: #ff6b6b;
}

/* OTP Actions */
.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.otp-resend {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.3s ease;
}

.otp-resend-btn:hover:not(:disabled) {
    color: #ffb930;
}

.otp-resend-btn:disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    text-decoration: none;
}

.otp-back-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.otp-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========== Right Side - Image ========== */

.signup-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(241, 168, 23, 0.1) 0%, rgba(168, 105, 12, 0.1) 100%);
}

.signup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.signup-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(241, 168, 23, 0.2) 50%,
            rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .signup-container {
        flex-direction: column;
    }

    .signup-left {
        min-height: 100vh;
        padding: 5rem 2rem 2rem 2rem;
    }

    .signup-right {
        min-height: 400px;
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .signup-left {
        padding: 5rem 1.5rem 1.5rem 1.5rem;
        min-height: 100vh;
        justify-content: flex-start;
    }

    .signup-form-wrapper {
        padding: 1.25rem 1.25rem;
        max-width: 100%;
        margin-top: 1rem;
    }

    .signup-title {
        font-size: 1.5rem;
    }

    .signup-header {
        margin-bottom: 0.75rem;
    }

    .social-signup-buttons {
        flex-direction: column;
        margin-bottom: 0.75rem;
    }

    .signup-divider {
        margin: 0.75rem 0;
    }

    .signup-form {
        gap: 0.625rem;
    }

    .signup-right {
        min-height: 300px;
        max-height: 40vh;
    }
}

@media (max-width: 480px) {
    .signup-left {
        padding: 4.5rem 1rem 1rem 1rem;
    }

    .signup-form-wrapper {
        padding: 1rem 1rem;
        border-radius: 16px;
    }

    .signup-title {
        font-size: 1.35rem;
    }

    .signup-subtitle {
        font-size: 0.8rem;
    }

    .signup-header {
        margin-bottom: 0.625rem;
    }

    .social-signup-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.825rem;
    }

    .signup-form-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .signup-form-submit {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .signup-error-wrapper {
        min-height: 50px;
    }

    .signup-right {
        display: none;
    }
}

/* Fix logo overlap on mobile by making it absolute (scrolls with page) */
@media (max-width: 768px) {
    .floating-nav .nav-container {
        position: absolute;
    }
}

/* Password Toggle Styles */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s;
}

.password-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.password-toggle-btn:focus {
    outline: none;
    color: var(--accent-color);
}

.signup-form-input.has-toggle {
    padding-right: 45px;
    width: 100%;
}

/* Ensure all inputs take full width */
.signup-form-input {
    width: 100%;
}