/* ===== PURE PH9 AUTH PAGES - MODERN WATER THEME ===== */
/* Light/Dark Mode with Water Effects */

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand Colors - Refined */
    --brand-primary: #0d2847;
    --brand-primary-light: #1a4068;
    --brand-secondary: #4facfe;
    --brand-secondary-light: #72c2fe;
    --brand-cyan: #00d4ff;
    --brand-green: #00d26a;
    --brand-green-light: #2eec80;
    --brand-aqua: #00e5cc;
    --brand-dark-blue: #0a1628;
    
    /* Light Mode Colors (Default) */
    --bg-primary: #f0f9ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fcff;
    --bg-hover: #e8f4ff;
    
    --text-primary: #1a2a4a;
    --text-secondary: #5a6a8a;
    --text-muted: #8a9ab0;
    --text-inverse: #ffffff;
    
    --border-color: #d0e4f5;
    --border-light: #e8f2fc;
    
    --shadow-sm: 0 2px 8px rgba(13, 40, 71, 0.06);
    --shadow-md: 0 4px 16px rgba(13, 40, 71, 0.08);
    --shadow-lg: 0 8px 32px rgba(13, 40, 71, 0.12);
    --shadow-card: 0 20px 60px rgba(13, 40, 71, 0.15);
    --shadow-cta: 0 8px 24px rgba(0, 210, 106, 0.35);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-cyan) 100%);
    --gradient-cta: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-light) 100%);
    --gradient-bg: linear-gradient(135deg, #e8f4ff 0%, #f0f9ff 50%, #e0f0ff 100%);
    
    /* Sizing */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --bg-primary: #0a1628;
    --bg-secondary: #111d32;
    --bg-card: #152238;
    --bg-input: #1a2a45;
    --bg-hover: #1e3250;
    
    --text-primary: #f0f8ff;
    --text-secondary: #a0b8d0;
    --text-muted: #6a8298;
    
    --border-color: #2a3a55;
    --border-light: #1e2e48;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
    
    --gradient-bg: linear-gradient(135deg, #0a1628 0%, #111d32 50%, #0d1829 100%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}

/* ===== AUTH PAGE CONTAINER ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* ===== WATER BACKGROUND ===== */
.water-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Light mode - bg1 with better visibility */
.water-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/bg1.jpg') center/cover no-repeat;
    opacity: 0.18;
}

/* Graphic decoration for light mode */
.water-background::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 350px;
    height: 350px;
    background: url('../images/graphic1.png') center/contain no-repeat;
    opacity: 0.1;
}

/* Dark mode backgrounds */
[data-theme="dark"] .water-background::before {
    background: url('../images/bg2.jpg') center/cover no-repeat;
    opacity: 0.2;
}

[data-theme="dark"] .water-background::after {
    background: url('../images/graphic2.png') center/contain no-repeat;
    opacity: 0.12;
}

/* Water Ripples */
.water-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(1, 192, 245, 0.1) 0%, transparent 70%);
    animation: ripple 10s infinite ease-out;
}

.water-ripple:nth-child(1) { 
    width: 800px; 
    height: 800px; 
    top: -300px; 
    right: -200px; 
    animation-delay: 0s; 
}
.water-ripple:nth-child(2) { 
    width: 600px; 
    height: 600px; 
    bottom: -200px; 
    left: -150px; 
    animation-delay: 3s; 
}
.water-ripple:nth-child(3) { 
    width: 400px; 
    height: 400px; 
    top: 40%; 
    left: 20%; 
    animation-delay: 6s; 
}

@keyframes ripple {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.5; }
}

/* Floating Bubbles */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(105, 243, 255, 0.4) 0%, rgba(1, 192, 245, 0.2) 100%);
    animation: bubble-float 12s infinite ease-in-out;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.bubble::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.bubble:nth-child(1) { width: 30px; height: 30px; left: 8%; animation-delay: 0s; animation-duration: 10s; }
.bubble:nth-child(2) { width: 50px; height: 50px; left: 18%; animation-delay: 2s; animation-duration: 14s; }
.bubble:nth-child(3) { width: 25px; height: 25px; left: 32%; animation-delay: 4s; animation-duration: 11s; }
.bubble:nth-child(4) { width: 40px; height: 40px; left: 45%; animation-delay: 1s; animation-duration: 13s; }
.bubble:nth-child(5) { width: 35px; height: 35px; left: 58%; animation-delay: 3s; animation-duration: 12s; }
.bubble:nth-child(6) { width: 45px; height: 45px; left: 72%; animation-delay: 5s; animation-duration: 15s; }
.bubble:nth-child(7) { width: 28px; height: 28px; left: 85%; animation-delay: 2.5s; animation-duration: 11s; }
.bubble:nth-child(8) { width: 55px; height: 55px; left: 92%; animation-delay: 4.5s; animation-duration: 16s; }

@keyframes bubble-float {
    0% { 
        transform: translateY(100vh) rotate(0deg); 
        opacity: 0; 
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { 
        transform: translateY(-100px) rotate(360deg); 
        opacity: 0; 
    }
}

/* Water Drops using actual waterdrop image */
.water-drops {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url('../images/waterdrop.png');
    background-size: 40px 50px;
    background-repeat: repeat;
}

/* Auth card decoration with graphics */
.auth-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: url('../images/graphic1.png') center/contain no-repeat;
    opacity: 0.05;
    pointer-events: none;
}

.auth-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: url('../images/watre.png') center/contain no-repeat;
    opacity: 0.06;
    pointer-events: none;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s ease-out;
}

.auth-container.wide {
    max-width: 520px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== AUTH CARD ===== */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Water decoration */
.auth-card::after {
    content: '💧';
    position: absolute;
    bottom: 20px;
    right: 25px;
    font-size: 2rem;
    opacity: 0.08;
}

/* ===== LOGO SECTION ===== */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0;
}

[data-theme="dark"] .auth-logo h1 {
    color: var(--text-primary);
}

.auth-logo h1 span {
    color: var(--brand-cyan);
}

.auth-logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ===== FORM HEADER ===== */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-header h2 i {
    color: var(--brand-cyan);
}

.form-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label .required {
    color: #ff4757;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 4px rgba(1, 192, 245, 0.12);
}

.form-control:focus + .input-icon,
.form-control:focus ~ .input-icon {
    color: var(--brand-cyan);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.no-icon {
    padding-left: 16px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--brand-cyan);
}

/* Form Text */
.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== CHECKBOX ===== */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkmark i {
    font-size: 0.7rem;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form-check input:checked + .checkmark {
    background: var(--gradient-primary);
    border-color: var(--brand-cyan);
}

.form-check input:checked + .checkmark i {
    opacity: 1;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== FORM ROW ===== */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== LINKS ===== */
.auth-link {
    font-size: 0.9rem;
    color: var(--brand-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--brand-dark-blue);
    text-decoration: underline;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    width: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(1, 192, 245, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 192, 245, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
}

.btn i {
    font-size: 1rem;
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 15px;
}

/* ===== SOCIAL LOGIN ===== */
.social-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-social:hover {
    border-color: var(--brand-cyan);
    background: var(--bg-hover);
}

.btn-social i {
    font-size: 1.1rem;
}

.btn-google i { color: #ea4335; }
.btn-facebook i { color: #1877f2; }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.1rem;
    margin-top: 1px;
}

.alert-success {
    background: rgba(110, 170, 0, 0.1);
    border: 1px solid rgba(110, 170, 0, 0.3);
    color: var(--brand-green);
}

.alert-danger {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.alert-info {
    background: rgba(1, 192, 245, 0.1);
    border: 1px solid rgba(1, 192, 245, 0.3);
    color: var(--brand-cyan);
}

/* ===== AUTH FOOTER ===== */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== BACK LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 10px 20px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.back-link:hover {
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    transform: translateX(-4px);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-auth {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.theme-toggle-auth:hover {
    background: var(--brand-cyan);
    color: white;
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-auth .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle-auth .fa-sun { display: inline-block; }
[data-theme="light"] .theme-toggle-auth .fa-sun { display: none; }
[data-theme="light"] .theme-toggle-auth .fa-moon { display: inline-block; }
html:not([data-theme]) .theme-toggle-auth .fa-sun { display: none; }
html:not([data-theme]) .theme-toggle-auth .fa-moon { display: inline-block; }

/* ===== INFO BOX ===== */
.info-box {
    background: rgba(1, 192, 245, 0.08);
    border: 1px solid rgba(1, 192, 245, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.info-box i {
    color: var(--brand-cyan);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-box-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-box-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all var(--transition-normal);
    border-radius: 2px;
}

.strength-fill.weak { width: 33%; background: #ff4757; }
.strength-fill.medium { width: 66%; background: #f59e0b; }
.strength-fill.strong { width: 100%; background: var(--brand-green); }

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== STEPS INDICATOR ===== */
.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all var(--transition-fast);
}

.step.active {
    background: var(--brand-cyan);
    width: 30px;
    border-radius: 5px;
}

.step.completed {
    background: var(--brand-green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .auth-page {
        padding: 20px 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
        border-radius: var(--border-radius);
    }
    
    .auth-logo img {
        width: 80px;
        height: 80px;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .form-control {
        padding: 12px 14px;
        padding-left: 40px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .theme-toggle-auth {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    /* Hide some bubbles on mobile */
    .bubble:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 375px) {
    .auth-card {
        padding: 25px 16px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

/* Success Animation */
@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    animation: successPop 0.5s ease-out;
}
