/* ====== UNIFIED AUTHENTICATION MODAL - COMPACT CREATIVE MOBILE DESIGN ====== */

.unified-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(51, 65, 85, 0.85) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
}

.auth-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-dream {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.1);
    animation: floatDream 15s infinite linear;
}

.floating-dream-1 { 
    top: 10%; 
    left: 10%; 
    animation-delay: 0s;
}

.floating-dream-2 { 
    top: 20%; 
    right: 15%; 
    animation-delay: 1s;
}

.floating-dream-3 { 
    bottom: 30%; 
    left: 20%; 
    animation-delay: 2s;
}

.floating-dream-4 { 
    bottom: 15%; 
    right: 25%; 
    animation-delay: 1.5s;
}

.floating-dream-5 { 
    top: 50%; 
    left: 5%; 
    animation-delay: 0.5s;
}

@keyframes floatDream {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.1;
    }
}

.unified-auth-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.unified-auth-modal {
    position: relative;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 252, 0.95) 100%
    );
    border-radius: 24px;
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 420px;
    max-height: 95vh;
    overflow: hidden;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.unified-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.unified-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.unified-auth-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.auth-logo-container {
    margin-bottom: 1.5rem;
}

.auth-logo-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748b, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 32px rgba(100, 116, 139, 0.3);
    overflow: hidden;
}

.auth-logo-icon {
    font-size: 2rem;
    color: white;
    z-index: 2;
}

.logo-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: logoShine 3s infinite;
    transform: rotate(45deg);
}

@keyframes logoShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.auth-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    background: linear-gradient(135deg, #64748b, #1e293b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-content {
    animation: titleSlideIn 0.6s ease-out;
}

@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.unified-auth-body {
    padding: 0 2rem 2rem;
    position: relative;
}

/* Age Verification Styles */
.age-verification-content {
    text-align: center;
    padding: 1rem 0;
}

.verification-icon {
    margin-bottom: 1.5rem;
}

.verification-icon i {
    font-size: 3rem;
    color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verification-info {
    margin-bottom: 2rem;
}

.verification-info p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.age-question p {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.age-verification-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-age-confirm,
.btn-age-decline {
    padding: 1rem;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-age-confirm {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-age-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-age-decline {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-age-decline:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.verification-footer {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.verification-footer p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.verification-footer a {
    color: #64748b;
    text-decoration: underline;
    text-decoration-color: rgba(100, 116, 139, 0.3);
    transition: all 0.3s ease;
}

.verification-footer a:hover {
    color: #1e293b;
    text-decoration-color: #1e293b;
}

/* Form Styles */
.auth-form-container {
    position: relative;
}

.back-button-container {
    margin-bottom: 1.5rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(100, 116, 139, 0.1);
    color: #1e293b;
}

.unified-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.unified-form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.8);
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.unified-form-input:focus {
    outline: none;
    border-color: #64748b;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

.unified-form-input:focus + .input-border {
    transform: scaleX(1);
}

.unified-form-input:focus ~ .input-icon {
    color: #64748b;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #64748b, #475569);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 0 0 16px 16px;
}

.form-options {
    text-align: right;
    margin-top: -0.5rem;
}

.forgot-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #1e293b;
    text-decoration: underline;
}

.unified-submit-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.unified-submit-btn:hover:not(.loading) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 116, 139, 0.4);
    background: linear-gradient(135deg, #475569, #334155);
}

.unified-submit-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-content,
.loading-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-switch {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.auth-switch p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.switch-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.switch-link:hover {
    color: #1e293b;
    text-decoration: underline;
}

/* Decorative Elements */
.modal-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.1), rgba(71, 85, 105, 0.05));
}

.decoration-1 {
    width: 120px;
    height: 120px;
    top: -60px;
    right: -60px;
    animation: decorationFloat 6s ease-in-out infinite;
}

.decoration-2 {
    width: 80px;
    height: 80px;
    bottom: -40px;
    left: -40px;
    animation: decorationFloat 8s ease-in-out infinite reverse;
}

.decoration-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: -30px;
    animation: decorationFloat 10s ease-in-out infinite;
}

@keyframes decorationFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 0.2;
    }
}

/* Underage Modal Styles */
.underage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.9) 0%,
        rgba(220, 38, 38, 0.85) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 1rem;
}

.underage-modal {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.25);
}

.underage-icon {
    margin-bottom: 1.5rem;
}

.underage-icon i {
    font-size: 3rem;
    color: #f59e0b;
}

.underage-modal h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.underage-modal p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-underage-close {
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.btn-underage-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .unified-auth-modal {
        max-width: 100%;
        margin: 1rem;
        border-radius: 20px;
    }
    
    .unified-auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .unified-auth-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .auth-logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .auth-logo-icon {
        font-size: 1.75rem;
    }
    
    .auth-brand-name {
        font-size: 1.25rem;
    }
    
    .auth-main-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .unified-form-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .input-icon {
        left: 0.875rem;
        font-size: 0.875rem;
    }
    
    .unified-submit-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .unified-auth-overlay {
        padding: 0.5rem;
    }
    
    .unified-auth-modal {
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .unified-auth-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .unified-auth-body {
        padding: 0 1rem 1rem;
    }
    
    .auth-main-title {
        font-size: 1.25rem;
    }
    
    .unified-modal-close {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .age-verification-buttons {
        gap: 0.75rem;
    }
    
    .btn-age-confirm,
    .btn-age-decline {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unified-auth-modal {
        border: 2px solid #000;
        background: #fff;
    }
    
    .unified-form-input {
        border-color: #000;
    }
    
    .unified-submit-btn {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-dream,
    .logo-shine,
    .decoration-circle {
        animation: none;
    }
    
    .unified-auth-modal * {
        transition-duration: 0.01ms !important;
    }
}