/* ===== ROOT VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #6c63ff;
    --primary-dark: #554fb8;
    --primary-light: #8a84ff;
    --secondary-color: #495057;
    --accent-color: #ff6b6b;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Background Colors */
    --bg-dark: #0d0e0f;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-card: #1a1b1e;
    --bg-nav: #2d2e33;
    
    /* Text Colors */
    --text-primary: #343a40;
    --text-light: #6c757d;
    --text-white: #ffffff;
    --text-muted: #adb5bd;
    
    /* Border & Shadow */
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    --shadow-light: 0 3px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 22px;
    --space-xxl: 30px;
    
    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 15px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Type Scale */
    --font-size-body: 1rem;
    --font-size-small: 0.9rem;
    --font-size-lead: 1.12rem;
    --line-height-body: 1.65;

    /* Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 78px;
    --sidebar-gap: 18px;
    --sidebar-surface: linear-gradient(175deg, rgba(5, 9, 22, 0.97) 0%, rgba(8, 15, 34, 0.97) 50%, rgba(6, 10, 24, 0.98) 100%);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
    background: #060a1d;
    overscroll-behavior-y: none;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(circle at 18% 12%, #1b2053 0%, #0f1639 32%, #0a0f2a 58%, #060a1d 100%);
    background-color: #060a1d;
    background-attachment: fixed;
    color: var(--text-white);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    /* Safe area support for notched devices (iPhone X+) */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Mobile: disable fixed background to avoid white/cloudy repaint flashes on some browsers */
@media (max-width: 767px) {
    html {
        background: #060a1d;
    }

    body {
        background-color: #060a1d;
        background-attachment: scroll;
        -webkit-backface-visibility: hidden; /* reduce repaint artifacts */
        backface-visibility: hidden;
    }
}

.container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: var(--space-sm);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: var(--radius-sm);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-white);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-muted);
}

.section p {
    max-width: 72ch;
}

.page-intro,
.section-lead {
    font-size: var(--font-size-lead);
    color: var(--text-muted);
    max-width: 68ch;
}

.page-intro {
    margin: 0 auto var(--space-lg);
}

.section-lead {
    margin-top: -6px;
    margin-bottom: var(--space-lg);
}

.page-note {
    font-size: var(--font-size-small);
    color: var(--text-muted);
}

.dashboard-topbar {
    display: none;
}

/* ===== LAYOUT COMPONENTS ===== */

/* Header */
header {
    background: #2d2e33;
    background: linear-gradient(135deg, var(--bg-nav) 0%, #2d2e33 100%);
    color: var(--text-white);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--info-color));
}

.header-content {
    position: relative;
    z-index: 2;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 10001;
    background: var(--primary-color);
    color: var(--text-white);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
}

/* Navigation */
.nav-menu {
    display: flex;
    justify-content: center;
    background: rgba(45, 46, 51, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth header buttons (Get Started / Login) */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* GET STARTED Button (Primary) */
.btn-get-started,
.register-button.btn-get-started {
    background: linear-gradient(135deg, #6c63ff 0%, #4a3aff 100%);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-get-started .mobile-label {
    display: none;
}

.btn-get-started .desktop-label,
.btn-get-started .mobile-label {
    white-space: nowrap;
}

.btn-get-started:hover,
.register-button.btn-get-started:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* LOGIN Button (Secondary/Outline) */
.btn-login,
.login-button.btn-login {
    background: transparent;
    color: #6c63ff;
    padding: 0.625rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1.5px solid #6c63ff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login:hover,
.login-button.btn-login:hover {
    background: #6c63ff;
    color: white;
    transform: translateY(-2px);
}

/* Mobile adjustments for header auth buttons */
@media (max-width: 480px) {
    .auth-buttons {
        margin-left: 0;
        gap: 0.5rem;
        justify-content: center;
    }

    .btn-get-started, .btn-login,
    .register-button.btn-get-started, .login-button.btn-login {
        padding: 0.5rem 1rem;
        font-size: 0.825rem;
    }
}

.nav-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: block;
}

.nav-menu a:hover {
    color: var(--primary-light);
    background: rgba(108, 99, 255, 0.1);
    /* Removed transform and box-shadow to prevent jitter */
}

.nav-menu a:active {
    transform: none;
    background: rgba(108, 99, 255, 0.2);
    /* Removed transition to prevent jitter */
}

.nav-menu a:focus {
    transform: none;
    outline: none;
    background: rgba(108, 99, 255, 0.15);
}

.nav-menu a.active {
    background: var(--primary-color);
    color: var(--text-white);
    transform: none;
}

.mobile-menu-toggle {
    display: none;
    margin: var(--space-md) auto 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    width: 36px;
    height: 32px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 14px;
    height: 2px;
    background: var(--text-white);
    border-radius: 999px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.layout-top-strip {
    display: none;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    /* Removed transition to prevent jitter */
    pointer-events: none;
}

.nav-menu a:hover::before {
    left: 100%;
}

.nav-menu a:active::before {
    animation: none;
    transition: none;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: var(--space-lg);
}

body.unified-content main {
    background: linear-gradient(180deg, rgba(18, 24, 50, 0.88), rgba(14, 20, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(5, 8, 20, 0.3);
}

body.unified-content:not(.landing-page) main {
    border-left: none;
    border-radius: 0 18px 18px 0;
    box-shadow: none;
    background: linear-gradient(175deg, rgba(10, 14, 34, 0.9), rgba(8, 12, 28, 0.92));
}

body.unified-content main > .section {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 16px 18px;
}

body.unified-content:not(.landing-page) main > .section {
    width: 100%;
    max-width: none;
}

body.unified-content main > .section + .section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.unified-content main > .dashboard-topbar {
    display: block;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px 18px 0 0;
}

body.unified-content:not(.landing-page) main > .dashboard-topbar {
    border-radius: 0;
}

/* Sections */
.section {
    background: var(--bg-card);
    margin: var(--space-md) auto;
    padding: var(--space-md);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    max-width: 900px;
}

.section:hover {
    /* Removed transform and box-shadow to prevent jitter */
}

.section-center {
    text-align: center;
}

/* ===== FORM ELEMENTS ===== */

/* Form Groups */
.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    background: #222 !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: #fff !important;
    transition: all var(--transition-normal);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
}
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}I

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

/* ===== LOGIN & AUTHENTICATION STYLES ===== */

/* Login Container */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-header h2 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Login Form */
.login-form {
    margin-bottom: var(--space-lg);
}

.login-form .form-group {
    margin-bottom: var(--space-lg);
}

.login-form label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.95rem;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-white);
    transition: all var(--transition-normal);
}

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

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.remember-me label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    cursor: pointer;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow var(--transition-normal), background var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(95deg, #f0a500, #ff7b2c);
    filter: brightness(1.06);
}

.login-btn:active {
    filter: brightness(0.95);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login Links */
.login-links {
    text-align: center;
    margin-top: var(--space-lg);
}

.login-links a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: block;
    margin-bottom: var(--space-sm);
}

.login-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.login-links .register-link {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== ALERT & MESSAGE STYLES ===== */
.alert {
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    /* Remove animation to prevent layout jitter */
    /* animation: slideInDown 0.3s ease; */
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-color: rgba(40, 167, 69, 0.3);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-color: rgba(220, 53, 69, 0.3);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border-color: rgba(255, 193, 7, 0.3);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border-color: rgba(23, 162, 184, 0.3);
}

/* ===== LOADING STYLES ===== */
.loader {
    display: none;
    text-align: center;
    margin: var(--space-lg) 0;
    padding: var(--space-md);
}

.loader.active {
    display: block;
}

.loader-content {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Disable spinner animation on mobile to prevent scrolling jank */
@media (max-width: 768px) {
    .loading-spinner {
        animation: none;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Removed slideInDown keyframes to prevent layout shift */
/* @keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} */

/* ===== BUTTONS ===== */
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #6c63ff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* Mobile search wrapper and clear button used by header/index mobile inputs */
.mobile-search-wrapper {
    position: fixed;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 1205;
    display: flex;
    gap: 8px;
    align-items: center;
}
.mobile-search-wrapper .header-search-input.mobile {
    flex: 1 1 auto;
    margin: 0;
    position: static !important;
    width: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    max-width: none !important;
    min-width: 0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Small buttons don't jitter - no transform */
.btn-sm:hover {
    transform: none !important;
}

.btn-success {
    background: #28a745;
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: var(--text-white);
}

.btn-danger {
    background: #dc3545;
    background: linear-gradient(135deg, var(--danger-color), #e63946);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.register-button {
    background-color: #28a745;
}

.search-button {
    background: rgba(255, 175, 78, 0.12);
    border: 1px solid rgba(255, 175, 78, 0.3);
    color: #ffe3bb;
}

.search-button:hover {
    background: rgba(255, 175, 78, 0.2);
    border-color: rgba(255, 175, 78, 0.5);
}

/* Global search highlighting styles */
.search-match {
    border-left: 3px solid rgba(255, 175, 78, 0.5);
    padding-left: 10px;
    background: rgba(255, 175, 78, 0.04);
}

.search-result-banner {
    background: linear-gradient(90deg, rgba(255, 175, 78, 0.15), rgba(255, 127, 58, 0.1));
    border: 1px solid rgba(255, 175, 78, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #ffe3bb;
    font-size: 0.95rem;
    text-align: center;
}

mark.search-highlight {
    background: rgba(255, 175, 78, 0.4);
    color: inherit;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.register-button:hover {
    background-color: #218838;
}

.login-button {
    background-color: #17a2b8;
}

.login-button:hover {
    background-color: #117a8b;
}

/* Button Groups */
.top-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md);
    flex-wrap: wrap;
}

/* ===== TABLE STYLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

table th,
table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    background: #6c63ff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr {
    transition: background-color var(--transition-fast);
}

table tr:hover {
    background: rgba(108, 99, 255, 0.05);
}

table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

table tr:nth-child(even):hover {
    background: rgba(108, 99, 255, 0.08);
}

/* ===== SPECIAL COMPONENTS ===== */

/* Timer */
.timer {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(108, 99, 255, 0.1);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(255, 107, 107, 0.1));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: var(--space-lg) 0;
}

.timer p {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    color: var(--text-white);
}

#timer {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(108, 99, 255, 0.3);
}

/* Auction Actions */
.auction-actions {
    text-align: center;
    padding: var(--space-xl);
}

/* Prevent jitter in auction actions section */
#bidding .auction-actions,
#bidding .auction-actions *,
#bidding form {
    transform: none !important;
}

.calculator {
    background: rgba(40, 167, 69, 0.1);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(23, 162, 184, 0.1));
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: box-shadow var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-heavy);
}

.card-header {
    background: #6c63ff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    padding: var(--space-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: -var(--space-lg) -var(--space-lg) var(--space-lg) -var(--space-lg);
}

/* ===== HOMEPAGE SPECIFIC STYLES ===== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-content {
    text-align: center;
    padding: 48px 20px 40px;
    max-width: 780px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: var(--font-size-lead);
    color: var(--text-muted);
    margin-bottom: 26px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.stat {
    text-align: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.hero-note {
    margin-top: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.trust-strip {
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.12), rgba(108, 99, 255, 0.12));
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.trust-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 16px;
}

.trust-item strong {
    display: block;
    color: var(--text-white);
    margin-bottom: 4px;
}

.trust-item span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.section-lead {
    margin-top: -6px;
    margin-bottom: var(--space-lg);
    color: var(--text-muted);
    max-width: 60ch;
}

.about-intro {
    max-width: 68ch;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: none !important;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* Steps Container */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Calculator Styles */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.calculator-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-button {
    width: 100%;
    margin-top: 10px;
}

/* Keep calculator button stable – no hover translate */
.calculator-button.btn-primary:hover {
    transform: none !important;
}

.calculator-result {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profit-result h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.result-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item.total {
    border-top: 2px solid var(--primary-color);
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.profit {
    color: var(--success-color);
}

.total-return {
    color: var(--primary-color);
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    padding: 10px;
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.session-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.session-time {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.session-name {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.session-status {
    font-weight: bold;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-section {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(255, 107, 107, 0.1));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ===== MESSAGE STYLES ===== */
.message {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.message.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.message.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border-color: rgba(23, 162, 184, 0.3);
}

/* ===== LOADING & ANIMATIONS ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* ===== RESPONSIVE GRID SYSTEM ===== */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop: 4 columns */
@media (min-width: 1280px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dashboard sidebar layout: stack on mobile, side-by-side on desktop */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
}

/* Ensure images and media are responsive */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== FOOTER ===== */
footer:not(.auth-footer) {
    background: #2d2e33;
    background: linear-gradient(135deg, var(--bg-nav) 0%, #2d2e33 100%);
    color: var(--text-white);
    text-align: center;
    padding: var(--space-xl);
    margin-top: var(--space-xxl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Footer legal/tagline split for consistent spacing */
.footer-legal {
    width: 100%;
}

.footer-legal p {
    margin: 0;
    font-weight: 600;
}

.footer-tagline {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 8px;
}

.footer-tagline p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.95rem;
}

.footer-links {
    margin-top: var(--space-sm);
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== LANDING EXPERIENCE UPGRADE ===== */
body.landing-page {
    --landing-ink: #f3f6ff;
    --landing-subtle: #b7c4e6;
    --landing-cyan: #2de2e6;
    --landing-orange: #ff9b54;
    --landing-surface: rgba(12, 21, 44, 0.72);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(45, 226, 230, 0.18), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(255, 155, 84, 0.18), transparent 42%),
        linear-gradient(125deg, #071021 0%, #10203f 42%, #0a1833 100%);
}

/* On small screens, make the site footer flow after content to avoid overlap */
@media (max-width: 520px) {
    footer:not(.auth-footer) {
        position: static;
        padding: var(--space-lg) var(--space-xl);
        margin-top: var(--space-lg);
    }

    .footer-content {
        padding: 6px 0;
    }

    /* Ensure auth-specific fixed footer rules do not overlay public pages */
    .auth-footer {
        position: static !important;
        bottom: auto !important;
        padding: 10px 14px !important;
        margin-top: 12px !important;
    }
}

body.landing-page main {
    position: relative;
    overflow: hidden;
}

body.landing-page main::before,
body.landing-page main::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(0.5px);
}

body.landing-page main::before {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -70px;
    background: radial-gradient(circle, rgba(45, 226, 230, 0.28) 0%, rgba(45, 226, 230, 0) 72%);
}

body.landing-page main::after {
    width: 270px;
    height: 270px;
    bottom: -90px;
    left: -90px;
    background: radial-gradient(circle, rgba(255, 155, 84, 0.24) 0%, rgba(255, 155, 84, 0) 72%);
}

body.landing-page .section {
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: linear-gradient(145deg, rgba(14, 24, 46, 0.78), rgba(9, 17, 35, 0.82));
    border-color: rgba(112, 168, 255, 0.24);
}

body.landing-page .hero-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #05152d;
    background: linear-gradient(120deg, var(--landing-cyan), #75f0ff);
}

body.landing-page .hero-content h2 {
    font-size: clamp(1.85rem, 4.2vw, 3.05rem);
    color: var(--landing-ink);
    text-shadow: 0 8px 34px rgba(10, 24, 55, 0.45);
}

body.landing-page .hero-subtitle,
body.landing-page .hero-note,
body.landing-page .section-lead,
body.landing-page p {
    color: var(--landing-subtle);
}

body.landing-page .hero-stats {
    perspective: 1100px;
}

body.landing-page .hero-stats .stat,
body.landing-page .hero-panel {
    transform-style: preserve-3d;
    transition: transform 0.28s ease-out, border-color 0.28s ease-out, box-shadow 0.28s ease-out;
    border: 1px solid rgba(120, 180, 255, 0.25);
    box-shadow: 0 22px 40px rgba(3, 10, 25, 0.45);
    background-size: cover;
    background-position: center;
}

body.landing-page .hero-stats .stat {
    background: linear-gradient(160deg, rgba(10, 23, 46, 0.8), rgba(12, 30, 56, 0.72));
    min-height: 102px;
    padding: 12px 12px 10px;
}

body.landing-page .hero-stats .stat:nth-child(1) {
    background: linear-gradient(160deg, rgba(10, 23, 46, 0.74), rgba(12, 30, 56, 0.68)), url('/images/stat-invested.svg');
}

body.landing-page .hero-stats .stat:nth-child(2) {
    background: linear-gradient(160deg, rgba(26, 18, 58, 0.74), rgba(46, 20, 92, 0.68)), url('/images/stat-earned.svg');
}

body.landing-page .hero-stats .stat:nth-child(3) {
    background: linear-gradient(160deg, rgba(17, 58, 62, 0.74), rgba(26, 66, 125, 0.68)), url('/images/stat-success.svg');
}

body.landing-page .hero-panels {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.landing-page .hero-panel {
    text-align: left;
    padding: 12px 12px 14px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(8, 20, 38, 0.88), rgba(16, 31, 57, 0.76));
}

body.landing-page .hero-panel h3 {
    margin-bottom: 6px;
    font-size: 1rem;
    color: #eaf4ff;
}

body.landing-page .hero-panel p {
    margin: 0;
    font-size: 0.84rem;
}

body.landing-page .trust-strip {
    background: linear-gradient(120deg, rgba(45, 226, 230, 0.14), rgba(255, 155, 84, 0.14));
}

body.landing-page .feature-card,
body.landing-page .step,
body.landing-page .session-card,
body.landing-page .contact-item,
body.landing-page .calculator-form,
body.landing-page .calculator-result {
    background: linear-gradient(145deg, rgba(12, 24, 45, 0.75), rgba(8, 17, 34, 0.75));
    border-color: rgba(112, 168, 255, 0.2);
}

body.landing-page .stat-number,
body.landing-page .session-time,
body.landing-page .profit {
    background: linear-gradient(140deg, var(--landing-cyan), var(--landing-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.landing-page .btn-primary,
body.landing-page .register-button {
    background: linear-gradient(130deg, #06b7bf, #1e92d2);
}

body.landing-page .btn-primary:hover,
body.landing-page .register-button:hover {
    transform: translateY(-1px);
}

body.landing-page .login-button {
    background: linear-gradient(130deg, #ff9b54, #e7732d);
}

body.landing-page .reveal-item {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: saturate(0.8);
    transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

body.landing-page .reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
}

/* Stability hard-lock: disable non-essential container motion */
body.landing-page .reveal-item,
body.landing-page .hero-stats .stat,
body.landing-page .hero-panel,
body.landing-page main::before,
body.landing-page main::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}

@media (max-width: 900px) {
    body.landing-page .hero-panels {
        grid-template-columns: 1fr;
    }

    body.landing-page .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.landing-page .reveal-item,
    body.landing-page .hero-stats .stat,
    body.landing-page .hero-panel,
    body.landing-page main::before,
    body.landing-page main::after {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    :root {
        --space-xl: 18px;
        --space-xxl: 24px;
    }
    
    header {
        padding: var(--space-lg);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .mobile-menu-toggle {
        display: inline-flex !important;
        position: absolute;
        top: 14px;
        left: 14px;
        right: auto;
        margin: 0;
        z-index: 1002;
    }

    .header-content {
        position: relative;
        padding-top: 54px;
    }

    .header-content > h1 {
        margin-top: 0;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100vh;
        margin-top: 0;
        border-radius: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        border-left: none;
        border-top: none;
        border-bottom: none;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 78px 12px 20px;
        transform: translateX(-104%);
        transition: transform var(--transition-normal);
        z-index: 1000;
        background: linear-gradient(180deg, rgba(12, 18, 38, 0.98), rgba(17, 24, 44, 0.98));
        box-shadow: 14px 0 30px rgba(5, 8, 20, 0.45);
    }

    .nav-menu.active,
    .nav-menu.open,
    body.nav-open .nav-menu {
        transform: translateX(0);
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 7px;
        width: 100%;
        align-items: stretch;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: left;
    }

    .nav-menu a {
        text-align: left;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.03);
    }

    body.nav-open {
        overflow: hidden;
    }
    
    .section {
        padding: var(--space-lg);
        margin: var(--space-md);
    }

    body.unified-content main {
        border-radius: 14px;
    }

    body.unified-content main > .section {
        padding: 18px 16px;
    }
    
    .top-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .top-buttons .button {
        width: 100%;
        max-width: 250px;
    }
    
    .login-container {
        margin: 40px 20px;
        padding: var(--space-xl);
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .trust-items {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-actions, .cta-buttons {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    #timer {
        font-size: 2rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    :root {
        --space-lg: 14px;
        --space-xl: 14px;
    }

    .mobile-menu-toggle {
        top: 12px;
        left: 12px;
        right: auto;
        width: 36px;
        height: 32px;
    }

    main {
        padding: var(--space-md);
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 0.95rem;
    }
    
    .section {
        padding: var(--space-md);
        margin: var(--space-sm) 0;
        border-radius: 6px;
    }

    body.unified-content main {
        border-radius: 12px;
    }

    body.unified-content main > .section {
        padding: 10px 10px;
    }
    
    .login-container {
        margin: 20px 10px;
        padding: var(--space-lg);
    }
    
    .login-header h2 {
        font-size: 1.3rem;
    }

    /* Form elements */
    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .form-group input,
    .form-group select,
    .input-field,
    select {
        width: 100%;
        padding: 10px 8px;
        font-size: 16px;
        border-radius: 6px;
    }

    /* Button touch targets: 44px minimum */
    button,
    .button,
    .btn {
        width: 100%;
        min-height: 44px;
        min-width: 44px;
        padding: 0.8rem;
        font-size: 0.9rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-small {
        min-height: 40px;
        min-width: 40px;
        padding: 6px 10px;
        font-size: 0.75rem;
        width: auto;
    }
    
    body:not(.home-dashboard) table {
        display: block;
        overflow-x: auto;
        font-size: 0.8rem;
        width: 100%;
    }

    body:not(.home-dashboard) table thead {
        display: none;
    }

    body:not(.home-dashboard) table tbody,
    body:not(.home-dashboard) table tr {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    body:not(.home-dashboard) table td {
        display: block;
        text-align: left;
        padding: 6px 0;
        border: none;
    }

    #timer {
        font-size: 1.3rem;
    }

    #sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .section {
        max-width: 1400px;
    }
    
    .login-container {
        max-width: 500px;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow { box-shadow: var(--shadow-medium); }
.shadow-lg { box-shadow: var(--shadow-heavy); }

.hidden {
    display: none !important;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: none;
    outline-offset: 0;
}

/* Fallback for browsers that don't support :focus-visible */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: none;
    outline-offset: 0;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .nav-menu {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Microsoft Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .nav-menu {
        background: rgba(45, 46, 51, 0.98);
    }
}

/* Basic reset and styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

/* END OF FILE */

/* ===== Compact landing mobile density pass ===== */
@media (max-width: 767px) {
    html,
    body {
        background-color: #060a1d;
        overscroll-behavior: none;
    }

    body.landing-page {
        min-height: 100dvh;
        font-size: 14px;
        line-height: 1.4;
        background:
            radial-gradient(circle at 18% 12%, rgba(45, 226, 230, 0.16), transparent 44%),
            radial-gradient(circle at 85% 20%, rgba(255, 155, 84, 0.16), transparent 40%),
            linear-gradient(125deg, #071021 0%, #10203f 42%, #0a1833 100%);
        background-color: #071021;
        background-attachment: scroll;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
    }

    body.landing-page main::before,
    body.landing-page main::after {
        display: none;
    }

    body.landing-page main,
    body.landing-page .dashboard-layout,
    body.landing-page footer:not(.auth-footer) {
        background-color: #071021;
    }

    body.landing-page .section {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    body.landing-page .logo-section {
        grid-column: 2;
        min-width: 0;
        text-align: left;
    }

    body.landing-page .logo-section h1 {
        margin: 0;
        font-size: 0.98rem;
        line-height: 1.05;
    }

    body.landing-page .logo-section p {
        margin: 2px 0 0;
        font-size: 0.57rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.landing-page .top-buttons {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        padding: 0;
        flex-wrap: nowrap;
    }

    body.landing-page .top-buttons .button {
        width: auto;
        max-width: none;
        min-width: 0;
        min-height: 34px;
        padding: 6px 8px;
        border-radius: 9px;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    body.landing-page .register-button {
        display: inline-flex !important;
        max-width: 76px;
    }

    body.landing-page main {
        padding: 8px 10px !important;
        border-radius: 12px;
    }

    body.landing-page .layout-top-strip {
        display: none !important;
        gap: 8px;
        padding: 7px 8px;
        margin: 0 0 8px;
        border-radius: 9px;
    }

    body.landing-page .top-strip-brand {
        min-width: 0;
    }

    body.landing-page .top-strip-brand strong {
        font-size: 0.9rem;
    }

    body.landing-page .top-strip-brand span {
        font-size: 0.66rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.landing-page .top-strip-actions {
        gap: 6px;
        flex-wrap: nowrap;
    }

    body.landing-page .top-strip-actions .button {
        width: auto;
        min-width: 0;
        min-height: 36px;
        padding: 7px 9px;
        border-radius: 8px;
        font-size: 0.76rem;
        white-space: nowrap;
    }

    body.landing-page .dashboard-layout {
        gap: 8px;
        padding: 0;
    }

    body.landing-page .section,
    body.landing-page.unified-content main > .section,
    body.landing-page .trust-strip {
        margin: 0 0 8px;
        padding: 10px 8px !important;
        border-radius: 9px;
        gap: 8px;
    }

    body.landing-page .hero-content {
        padding: 12px 4px 10px;
        max-width: none;
    }

    body.landing-page .hero-kicker {
        margin-bottom: 6px;
        padding: 4px 8px;
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    body.landing-page .hero-content h2,
    body.landing-page h2 {
        margin-bottom: 7px;
        padding-bottom: 5px;
        font-size: 1.05rem;
    }

    body.landing-page h2::after {
        width: 38px;
        height: 2px;
    }

    body.landing-page .hero-subtitle,
    body.landing-page .hero-note,
    body.landing-page .section-lead,
    body.landing-page p,
    body.landing-page .about-intro {
        margin-bottom: 7px;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    body.landing-page h3,
    body.landing-page h4 {
        margin-bottom: 5px;
        font-size: 0.92rem;
    }

    body.landing-page .hero-stats,
    body.landing-page .trust-items,
    body.landing-page .features-grid,
    body.landing-page .schedule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        margin: 8px 0;
    }

    body.landing-page .hero-panels,
    body.landing-page .calculator-container {
        grid-template-columns: 1fr !important;
        gap: 8px;
        margin-top: 8px;
    }

    body.landing-page .hero-stats .stat,
    body.landing-page .trust-item,
    body.landing-page .feature-card,
    body.landing-page .step,
    body.landing-page .session-card,
    body.landing-page .contact-item,
    body.landing-page .calculator-form,
    body.landing-page .calculator-result,
    body.landing-page .hero-panel {
        min-height: 0;
        padding: 9px !important;
        border-radius: 8px;
        box-shadow: none;
    }

    body.landing-page .hero-stats .stat:nth-child(3) {
        grid-column: 1 / -1;
    }

    body.landing-page .stat-number {
        font-size: 1.05rem;
        line-height: 1.1;
    }

    body.landing-page .stat-label,
    body.landing-page .trust-item span,
    body.landing-page .session-name,
    body.landing-page .session-status {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    body.landing-page .trust-item strong,
    body.landing-page .session-time {
        margin-bottom: 3px;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    body.landing-page .feature-icon {
        margin-bottom: 5px;
        font-size: 1.7rem;
    }

    body.landing-page .steps-container {
        gap: 8px;
    }

    body.landing-page .step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 8px;
    }

    body.landing-page .step-number {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        font-size: 0.86rem;
    }

    body.landing-page .form-group {
        margin-bottom: 8px;
    }

    body.landing-page .form-group label {
        margin-bottom: 3px;
        font-size: 0.8rem;
    }

    body.landing-page .form-group input,
    body.landing-page .form-group select {
        min-height: 40px;
        padding: 8px 10px;
        border-radius: 7px;
        font-size: 16px;
    }

    body.landing-page button,
    body.landing-page .button,
    body.landing-page .btn,
    body.landing-page .btn-primary {
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.84rem;
    }

    body.landing-page .calculator-button {
        margin-top: 4px;
    }

    body.landing-page .result-placeholder {
        min-height: 74px;
    }

    body.landing-page .placeholder-icon {
        font-size: 1.55rem;
    }

    body.landing-page .result-grid {
        gap: 6px;
    }

    body.landing-page .result-item {
        padding: 6px 0;
        font-size: 0.82rem;
    }

    body.landing-page .contact-info {
        gap: 8px;
    }

    body.landing-page footer:not(.auth-footer) {
        margin-top: 0;
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    body.landing-page footer p {
        margin: 0;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    body.landing-page .logo-section h1 {
        font-size: 0.86rem;
    }

    body.landing-page .logo-section p {
        font-size: 0.5rem;
    }

    body.landing-page .top-buttons .button,
    body.landing-page .top-strip-actions .button {
        min-height: 32px;
        padding: 5px 7px;
        font-size: 0.62rem;
    }

    body.landing-page .register-button {
        max-width: 70px;
    }

    body.landing-page main {
        padding: 7px 8px !important;
    }

    body.landing-page .layout-top-strip {
        padding: 6px 7px;
        margin-bottom: 7px;
    }

    body.landing-page .top-strip-brand span {
        display: none;
    }

    body.landing-page .section,
    body.landing-page.unified-content main > .section,
    body.landing-page .trust-strip {
        margin-bottom: 7px;
        padding: 8px 6px !important;
    }

    body.landing-page .hero-content h2,
    body.landing-page h2 {
        font-size: 0.98rem;
    }

    body.landing-page .hero-stats,
    body.landing-page .trust-items,
    body.landing-page .features-grid,
    body.landing-page .schedule-grid {
        gap: 7px;
    }
}
