/* ==========================================================================
   GVensino Simulator - Design System & Modern Styling (Pure CSS)
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
    /* Color Palette - Light Theme (Inspired by GVensino Main Website) */
    --bg-primary: #f4f6fa;
    --bg-secondary: #ffffff;
    --bg-secondary-rgb: 255, 255, 255;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-input: rgba(15, 23, 42, 0.04);
    --border-card: rgba(15, 23, 42, 0.06);
    --border-input: rgba(15, 23, 42, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    
    --color-primary: #2563eb; /* GVensino Blue */
    --color-primary-hover: #1d4ed8;
    --color-accent: #d97706; /* Warm Yellow/Orange Accent */
    --color-accent-subtle: rgba(217, 119, 6, 0.08);
    --color-success: #10b981;
    --color-danger: #ef4444;
    
    --shadow-card: 0 20px 40px rgba(15, 23, 42, 0.05), 
                   0 1px 3px rgba(15, 23, 42, 0.03),
                   inset 0 1px 0 rgba(255, 255, 255, 0.6);
    --shadow-input-focus: 0 0 0 4px rgba(37, 99, 235, 0.14);
    --shadow-button-hover: 0 10px 20px rgba(37, 99, 235, 0.2);
    
    --orb-opacity: 0.12;
    --grid-color: rgba(15, 23, 42, 0.03);
    --card-blur: 16px;
    
    --bg-badge: rgba(37, 99, 235, 0.06);
    --border-badge: rgba(37, 99, 235, 0.15);
    --text-badge: #1d4ed8;
    
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-border: rgba(15, 23, 42, 0.06);
}

/* Dark Theme overrides (Inspired by GVensino Simulator & Modern IDEs) */
.dark {
    --bg-primary: #07090e;
    --bg-secondary: #0e121b;
    --bg-secondary-rgb: 14, 18, 27;
    --bg-card: rgba(14, 18, 27, 0.72);
    --bg-input: rgba(5, 7, 12, 0.45);
    --border-card: rgba(255, 255, 255, 0.06);
    --border-input: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    --color-primary: #3b82f6; /* Simulator Blue */
    --color-primary-hover: #2563eb;
    --color-accent: #f59e0b; /* Yellow Accent */
    --color-accent-subtle: rgba(245, 158, 11, 0.12);
    --color-success: #34d399;
    --color-danger: #f87171;
    
    --shadow-card: 0 30px 60px rgba(0, 0, 0, 0.5), 
                   inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --shadow-input-focus: 0 0 0 4px rgba(59, 130, 246, 0.22);
    --shadow-button-hover: 0 15px 30px rgba(59, 130, 246, 0.3);
    
    --orb-opacity: 0.48;
    --grid-color: rgba(255, 255, 255, 0.03);
    --card-blur: 24px;
    
    --bg-badge: rgba(59, 130, 246, 0.1);
    --border-badge: rgba(59, 130, 246, 0.2);
    --text-badge: #60a5fa;
    
    --header-bg: rgba(14, 18, 27, 0.75);
    --header-border: rgba(255, 255, 255, 0.06);
}

/* Base Styles & Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Background elements */
.grid-isometric {
    position: fixed;
    width: 200vw;
    height: 200vh;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(1000px) rotateX(60deg) rotateZ(-45deg);
    transform-origin: center;
    top: -50%;
    left: -50%;
    z-index: -2;
    pointer-events: none;
}

.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: var(--orb-opacity);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

#orb1 {
    width: 900px;
    height: 900px;
    top: -10%;
    left: -15%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0.08) 35%, rgba(37, 99, 235, 0) 70%);
}

#orb2 {
    width: 900px;
    height: 900px;
    bottom: -25%;
    right: -20%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, rgba(79, 70, 229, 0.08) 40%, rgba(79, 70, 229, 0) 70%);
}

/* Header / Floating Glass Bar */
.gvensino-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Premium Vector Logo Colors */
.gvensino-logo {
    display: block;
    height: 42px;
}

.logo-text-gv {
    fill: var(--color-accent);
    transition: fill 0.3s ease;
}

.logo-text-ensino {
    fill: var(--text-primary);
    transition: fill 0.3s ease;
}

.logo-text-tagline {
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

/* Theme Toggle Button (Premium Micro-animations) */
.theme-toggle-btn {
    background: var(--bg-badge);
    border: 1px solid var(--border-badge);
    color: var(--text-badge);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    transform: scale(1.06) rotate(15deg);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    background-color: rgba(59, 130, 246, 0.08);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.sun-icon {
    display: none;
}

.dark .moon-icon {
    display: none;
}

.dark .sun-icon {
    display: block;
}

/* Layout / Grid Principal */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 3rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 5rem;
    align-items: center;
    z-index: 10;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 4rem;
        padding-top: 6.5rem;
        text-align: center;
    }
    
    .gvensino-header {
        padding: 0.8rem 1.5rem;
    }
    
    .header-nav {
        display: none; /* Hide desktop nav links on smaller viewports to keep it neat */
    }
}

/* Left Column: Hero Typography & Visual Proof */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

@media (max-width: 1024px) {
    .hero-content {
        align-items: center;
        text-align: center;
    }
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background-color: var(--bg-badge);
    border: 1px solid var(--border-badge);
    border-radius: 9999px;
    color: var(--text-badge);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.badge-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-primary);
    animation: custom-pulse 2s infinite;
}

@keyframes custom-pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-color 0.4s ease;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 500px;
    transition: color 0.4s ease;
}

@media (max-width: 1024px) {
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Social Proof (Student Avatars Stacked) */
.student-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 1024px) {
    .student-container {
        justify-content: center;
    }
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    margin-left: -12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    object-fit: cover;
}

.avatar-img:first-child {
    margin-left: 0;
}

.avatar-img:hover {
    transform: translateY(-6px) scale(1.08);
    z-index: 10;
}

.avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -12px;
    transition: all 0.3s ease;
}

.student-info {
    text-align: left;
}

.student-info-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.student-info-sub {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}


/* Right Column: Premium Glassmorphic Login Card */
.login-card-wrapper {
    position: relative;
    width: 100%;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--card-blur));
    -webkit-backdrop-filter: blur(var(--card-blur));
    border: 1px solid var(--border-card);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 10;
    transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.4s ease, background-color 0.4s ease;
    transform-style: preserve-3d;
}

@media (max-width: 480px) {
    .login-card {
        padding: 2.2rem 1.5rem;
        border-radius: 1.5rem;
    }
}

/* Behind-card subtle gradient glow (no heavy blurs) */
.card-ambient-glow {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    background: linear-gradient(135deg, var(--color-primary) 0%, rgba(79, 70, 229, 0.4) 100%);
    border-radius: 2.5rem;
    filter: blur(60px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.dark .card-ambient-glow {
    opacity: 0.28;
    filter: blur(80px);
}

.card-header {
    margin-bottom: 2.2rem;
    text-align: left;
}

.card-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color 0.4s ease;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    transition: color 0.4s ease;
}

/* Forms & Floating Custom Inputs */
.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.6rem;
    text-align: left;
}

.form-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.55rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.4s ease;
}

.forgot-link {
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

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

.input-custom {
    width: 100%;
    padding: 1.05rem 1.25rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 0.85rem;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.015);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-custom::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.input-custom:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-input-focus);
    background-color: var(--bg-secondary);
}

/* Submission action button */
.btn-primary {
    width: 100%;
    padding: 1.05rem;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background-color: var(--color-primary);
    border: none;
    border-radius: 0.85rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-button-hover);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
}

.btn-primary:hover::after {
    left: 200%;
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.dark .btn-primary:hover {
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.32);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner Loader inside Button */
.spinner {
    animation: spin 1s linear infinite;
    margin-right: 0.6rem;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    display: inline-block;
}

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

/* Alert Box Styles */
.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.4rem;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card footer details */
.card-footer {
    margin-top: 2.2rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border-card);
    text-align: center;
    transition: border-color 0.4s ease;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: color 0.4s ease;
}

.link-custom {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-block;
    margin-top: 0.4rem;
}

.link-custom:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Utility Helper */
.hidden {
    display: none !important;
}

