/* ============================================================
   BLOOM ACADEMY - UNIFIED THEME SYSTEM (SIGNUP PAGE REDESIGN)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    background-color: var(--vscode-bg, #f8fafc);
    color: var(--vscode-text-primary, #0f172a);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.signup-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
}

/* Two-column layout grid */
.signup-wrapper {
    display: grid;
    grid-template-columns: 4fr 6fr; /* 40% Left / 60% Right */
    width: 100%;
    min-height: 100vh;
    background-color: var(--vscode-bg, #f8fafc);
    transition: background-color 0.3s ease;
}

/* LEFT PANEL: Features & Dynamic Illustration Mockup */
.illustration-panel {
    position: relative;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #8b5cf6 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    overflow: hidden;
}

/* High-tech overlay grid */
.illustration-overlay-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 1;
}

.illustration-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: #ffffff;
}

.branding-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 4px;
}

.brand-logo-fallback {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.promo-section {
    margin: 2rem 0;
}

.promo-heading {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.promo-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.15rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.feature-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Laptop Graphic Container */
.illustration-graphic-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

.sphere-1 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.15);
    top: -50px;
    left: -50px;
}

.sphere-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -80px;
    right: -50px;
}

.illustration-laptop-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    animation: floatLaptop 6s ease-in-out infinite;
}

.laptop-illustration {
    width: 100%;
    height: auto;
}

/* Floating badges surrounding the laptop */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 5;
    animation: floatBadge 5s ease-in-out infinite;
}

.badge-grade {
    top: 20px;
    left: -15px;
    animation-delay: 0.3s;
}

.badge-attend {
    top: -20px;
    right: 20px;
    animation-delay: 0.8s;
}

.badge-fees {
    bottom: 30px;
    right: -10px;
    animation-delay: 1.2s;
}

/* RIGHT PANEL: Registration Form */
.form-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    background-color: var(--vscode-bg, #f8fafc);
    position: relative;
    z-index: 2;
}

/* White Glassmorphism Card */
.auth-card {
    background-color: var(--vscode-card, #ffffff);
    border: 1px solid var(--vscode-border, #e2e8f0);
    border-radius: 22px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.06);
    width: 100%;
    max-width: 680px; /* 650-700px */
    overflow: hidden;
    padding: 2.75rem; /* 40-48px padding */
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

@supports (backdrop-filter: blur(16px)) {
    .auth-card {
        background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.09);
}

.auth-card-header {
    margin-bottom: 2rem;
    position: relative;
}

.auth-back-link {
    text-decoration: none;
    color: var(--vscode-text-secondary, #475569);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.25rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-back-link:hover {
    color: var(--color-primary, #2563eb);
    transform: translateX(-2px);
}

.auth-welcome-title {
    font-size: 2rem; /* Large title */
    color: var(--vscode-text-primary, #0f172a);
    font-weight: 800;
    margin-bottom: 0.375rem;
}

.auth-welcome-subtitle {
    font-size: 0.95rem; /* Subtitle */
    color: var(--vscode-text-secondary, #475569);
}

/* Two-column layout rows inside card */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-label {
    font-size: 16px; /* Large label */
    font-weight: 600; /* Medium/bold font weight */
    color: var(--vscode-text-primary, #0f172a);
    letter-spacing: 0.1px;
}

.input-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    height: 56px; /* Input height 54-58px */
    padding: 12px 52px 12px 20px !important; /* 20px left padding, 52px right for status icon */
    border: 1px solid var(--vscode-border, #dcdcdc);
    background-color: var(--vscode-surface, #ffffff);
    color: var(--vscode-text-primary, #0f172a);
    border-radius: 14px; /* Rounded corners 14px */
    font-size: 16px; /* Font size 16px */
    outline: none;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.25s ease;
}

.form-input::placeholder {
    color: var(--vscode-text-muted, #94a3b8);
    font-size: 15px; /* Placeholder 15px */
}

.form-input:hover {
    border-color: #c8c8c8;
}

.form-input:focus {
    border-color: var(--color-primary, #2563eb); /* Focus blue border */
    box-shadow: 0 0 0 4px var(--vscode-hover, rgba(37, 99, 235, 0.08)); /* Focus soft glow */
}

/* Validation Visual Styling */
.form-input.is-valid {
    border-color: var(--vscode-success, #16a34a) !important;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12) !important;
}

.form-input.is-invalid {
    border-color: var(--vscode-danger, #dc2626) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12) !important;
}

.validation-status-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.form-input.is-valid ~ .validation-status-icon {
    display: flex;
    color: var(--vscode-success, #16a34a);
}

.form-input.is-valid ~ .validation-status-icon::before {
    content: "✓";
    font-weight: bold;
    font-size: 1.1rem;
}

.form-input.is-invalid ~ .validation-status-icon {
    display: flex;
    color: var(--vscode-danger, #dc2626);
}

.form-input.is-invalid ~ .validation-status-icon::before {
    content: "✗";
    font-weight: bold;
    font-size: 1.1rem;
}

.validation-feedback {
    color: var(--vscode-danger, #dc2626);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Dropdown styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 48px !important;
}

select.form-input:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

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

.password-input-wrapper .form-input {
    padding-right: 80px !important; /* Space for eye toggle (right: 18px) and status checkmark (right: 48px) */
}

.password-toggle {
    position: absolute;
    right: 18px; /* Password eye icon absolute right, 18px padding */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--vscode-text-muted, #94a3b8);
    cursor: pointer;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    z-index: 6;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover {
    color: var(--vscode-text-primary, #0f172a);
    background-color: var(--vscode-border-soft, #f1f5f9);
}

/* Password Strength Indicator Widget */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.strength-bar {
    height: 6px;
    background: var(--vscode-border-soft, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.strength-fill.weak {
    width: 33%;
    background-color: #ef4444; /* Weak: Red */
}

.strength-fill.medium {
    width: 66%;
    background-color: #f59e0b; /* Medium: Orange/Yellow */
}

.strength-fill.strong {
    width: 100%;
    background-color: #10b981; /* Strong: Green */
}

.strength-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--vscode-text-secondary, #475569);
}

#strengthLabel {
    font-weight: 700;
}

#strengthLabel.weak {
    color: #ef4444;
}

#strengthLabel.medium {
    color: #f59e0b;
}

#strengthLabel.strong {
    color: #10b981;
}

/* Checkbox & Terms styling */
.checkbox-wrapper {
    margin: 0.5rem 0 1.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--vscode-text-secondary, #475569);
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--color-primary, #2563eb);
    border-radius: 4px;
}

.link-green {
    color: var(--color-primary, #2563eb); /* Unified theme color */
    text-decoration: none;
    font-weight: 600;
}

.link-green:hover {
    text-decoration: underline;
}

/* Submission Button - Gradient: Blue -> Purple */
.auth-submit {
    width: 100%;
    height: 56px; /* Button height 56px */
    background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%); /* Blue -> Purple gradient */
    color: white;
    border: none;
    border-radius: 14px; /* Rounded 14px */
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background-color 0.25s ease;
}

.auth-submit:hover {
    transform: translateY(-2px) scale(1.015); /* Lift effect and scale */
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35); /* Glow shadow */
}

.auth-submit:active {
    transform: translateY(1px) scale(0.985);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* bottom Sign In link centering and highlights */
.form-link {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 14px;
    color: var(--vscode-text-secondary, #475569);
    font-weight: 500;
}

.form-link a {
    color: var(--color-primary, #2563eb); /* Only Sign In highlighted */
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.form-link a:hover {
    text-decoration: underline;
}

/* Spinner helper for loading state */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   DARK THEME COMPATIBILITY OVERRIDES (VS CODE EDITION)
   ============================================================ */
html.dark-theme body {
    background-color: var(--vscode-bg, #1e1e1e);
}

html.dark-theme .signup-wrapper {
    background-color: var(--vscode-bg, #1e1e1e);
}

html.dark-theme .form-panel {
    background-color: var(--vscode-bg, #1e1e1e);
}

html.dark-theme .auth-card {
    background-color: var(--vscode-card, #252526);
    border: 1px solid var(--vscode-border, #2d2d2d);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@supports (backdrop-filter: blur(16px)) {
    html.dark-theme .auth-card {
        background-color: rgba(37, 37, 38, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

html.dark-theme .form-input {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
    color: #ffffff !important;
}

html.dark-theme .form-input:hover {
    border-color: #505050 !important;
}

html.dark-theme .form-input:focus {
    border-color: var(--color-primary, #007acc) !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.2) !important;
}

html.dark-theme .password-toggle:hover {
    color: #ffffff;
    background-color: #2d2d2d;
}

html.dark-theme .brand-logo-fallback {
    background-color: rgba(255, 255, 255, 0.1);
}

html.dark-theme .floating-badge {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

/* SVG laptop dark overrides */
html.dark-theme .ill-screen-bg {
    fill: #1e1e1e;
}
html.dark-theme .ill-titlebar {
    fill: #252526;
}
html.dark-theme .ill-addressbar {
    fill: #2d2d2d;
}
html.dark-theme .ill-widget-bg {
    fill: #252526;
    stroke: rgba(255,255,255,0.03);
}
html.dark-theme .ill-avatar-bg {
    fill: rgba(255,255,255,0.04);
}
html.dark-theme .ill-muted {
    fill: #3c3c3c;
}
html.dark-theme .ill-label {
    fill: #808080;
}
html.dark-theme .ill-value {
    fill: #ffffff;
}
html.dark-theme .ill-laptop-base {
    fill: #3c3c3c;
}
html.dark-theme .ill-laptop-groove {
    fill: #1e1e1e;
}

/* Select arrow dynamic dark adjust */
html.dark-theme select.form-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

html.dark-theme select.form-input:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007acc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ============================================================
   RESPONSIVE DESIGN & ANIMATIONS
   ============================================================ */

/* Page entrance animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Laptop floating animations */
@keyframes floatLaptop {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.02); }
}

/* Responsive configurations */

/* Desktop & Laptop transition (1200px and below) */
@media (max-width: 1200px) {
    .signup-wrapper {
        grid-template-columns: 0.9fr 1.1fr; /* 45% / 55% split */
    }
    .illustration-panel {
        padding: 2rem;
    }
    .promo-heading {
        font-size: 1.85rem;
    }
    .features-grid {
        gap: 1rem;
    }
}

/* Tablets (1024px and below) */
@media (max-width: 1024px) {
    .signup-wrapper {
        grid-template-columns: 0.8fr 1.2fr; /* Smaller left panel */
    }
    .illustration-panel {
        padding: 2rem 1.5rem;
    }
}

/* Smaller Tablets (850px and below) */
@media (max-width: 850px) {
    .signup-wrapper {
        grid-template-columns: 1fr; /* Stack layout */
    }
    .illustration-panel {
        display: none; /* Hide left panel completely */
    }
    .form-panel {
        min-height: 100vh;
        width: 100%;
        padding: 2rem 1.5rem;
    }
    .auth-card {
        max-width: 600px;
        padding: 2rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Mobile Screens (480px and below) */
@media (max-width: 480px) {
    .form-panel {
        padding: 1.25rem 1rem;
    }
    .auth-card {
        border-radius: 18px;
        padding: 1.5rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    }
    .auth-welcome-title {
        font-size: 1.6rem;
    }
    .form-input {
        height: 54px;
        font-size: 15px;
        padding-left: 16px !important;
    }
    .password-toggle {
        right: 14px;
    }
    .auth-submit {
        height: 54px;
        font-size: 15px;
    }
    .checkbox-label {
        font-size: 13px;
    }
}

