/* =============================================
   BLOXER - Clean Professional Design
   ============================================= */

/* Import Beta Banner Styles */
@import url('beta-banner.css');

:root {
    /* Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #e2e8f0;
    --bg-border: #e2e8f0;
    --bg-accent: #3b82f6;
    --bg-accent-hover: #2563eb;
    
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* Status */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBudW1PY3RhdmVzPSI0IiAvPjxmZUNvbG9yTWF0cml4IHR5cGU9InNhdHVyYXRlIiB2YWx1ZXM9IjAiLz48ZmVDb21wb3NpdGUgb3BlcmF0b3I9ImluIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIwLjAyIi8+PC9zdmc+');
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

/* =============================================
   AUTHENTICATION ENHANCEMENTS
   ============================================= */

.auth-container {
    animation: auth-appear 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

@keyframes auth-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 2.2rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Social Buttons Placeholder */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-social {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* Enhanced Inputs */
.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--accent);
}

.input-wrapper {
    position: relative;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.input-wrapper input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 12px 15px !important;
    height: 45px !important;
}

.input-wrapper .input-icon {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked + .checkbox-box {
    background: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"]:checked + .checkbox-box i {
    display: block;
}

.checkbox-box i {
    display: none;
    color: white;
    font-size: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
}

/* =============================================
   FIELD FEEDBACK & VALIDATION
   ============================================= */

.field-feedback {
    margin-top: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.field-feedback .success {
    color: var(--success);
    font-weight: 500;
}

.field-feedback .error {
    color: var(--error);
    font-weight: 500;
}

.field-feedback .checking {
    color: var(--warning);
    font-style: italic;
}

.option-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.security-notice {
    margin-top: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notice-icon {
    font-size: 1rem;
}

/* =============================================
   MINI ACCESSIBILITY IMPROVEMENTS
   ============================================= */

/* Better focus indicators */
.btn,
input,
textarea,
select {
    position: relative;
}

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --accent: #0066cc;
        --bg-primary: #000000;
    }
}

/* Better button sizes for touch */
.btn {
    min-height: 44px;
    min-width: 44px;
}

/* =============================================
   LOGO & BRANDING
   ============================================= */

.logo {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Logo icon - minimalist Bloxer */
.logo h1::before {
    content: '⬡';
    display: block;
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.logo p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    height: 48px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* =============================================
   RADIO GROUPS
   ============================================= */

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.radio-label:hover {
    color: var(--text-secondary);
}

.radio-label input[type="radio"] {
    width: auto;
    margin-right: 8px;
    accent-color: var(--btn-gradient-start);
}

.radio-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px var(--btn-shadow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--btn-shadow);
}

.btn:active {
    transform: translateY(0px);
}

/* =============================================
   ALERTS & NOTIFICATIONS
   ============================================= */

.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue-light);
}

.alert ul {
    margin-left: 20px;
    margin-top: 5px;
}

/* =============================================
   LINKS
   ============================================= */

.links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.links a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.links a:hover::after {
    width: 100%;
}

/* =============================================
   PASSWORD STRENGTH INDICATOR
   ============================================= */

.password-strength {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.password-strength.weak {
    color: var(--error);
}

.password-strength.medium {
    color: var(--warning);
}

.password-strength.strong {
    color: var(--success);
}

/* =============================================
   ENHANCED INPUT WRAPPERS
   ============================================= */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.input-icon {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* =============================================
   FORM OPTIONS & CHECKBOXES
   ============================================= */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--input-border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--btn-gradient-start);
    border-color: var(--btn-gradient-start);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: var(--accent) !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.forgot-link:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline !important;
}

/* =============================================
   BUTTON LOADING STATES
   ============================================= */

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =============================================
   FIELD FEEDBACK & VALIDATION
   ============================================= */

.field-feedback {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 20px;
}

.field-feedback .success {
    color: var(--success);
}

.field-feedback .error {
    color: var(--error);
}

.field-feedback .checking {
    color: var(--warning);
    animation: pulse 1.5s infinite;
}

/* =============================================
   ENHANCED RADIO GROUPS
   ============================================= */

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.3s ease;
    padding: 15px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    flex: 1;
    background: var(--input-bg);
    transition: all 0.3s ease;
}

.radio-label:hover {
    color: var(--text-secondary);
    border-color: var(--input-focus-border);
    background: var(--bg-hover);
}

.radio-label input[type="radio"]:checked + .radio-text {
    color: var(--accent);
}

.radio-label input[type="radio"]:checked ~ .radio-desc {
    color: var(--text-secondary);
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.radio-label input[type="radio"] {
    width: auto;
    margin-bottom: 8px;
    accent-color: var(--btn-gradient-start);
}

.radio-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.radio-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
}

/* =============================================
   TERMS & CONDITIONS
   ============================================= */

.terms-group {
    margin: 25px 0;
}

.terms-link {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.terms-link:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline !important;
}

/* =============================================
   PASSWORD REQUIREMENTS
   ============================================= */

.password-requirements {
    margin-top: 8px;
    padding: 10px;
    background: var(--input-bg);
    border-radius: 8px;
    border-left: 3px solid var(--warning);
}

.password-requirements small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* =============================================
   STEP INDICATORS
   ============================================= */

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--input-border);
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active {
    background: var(--btn-gradient-start);
    border-color: var(--btn-gradient-start);
    color: white;
    box-shadow: 0 0 20px var(--btn-shadow);
}

.step.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--input-border);
    margin: 0 10px;
}

.step-text {
    margin-left: 20px;
    text-align: left;
}

.step-active {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.step-total {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =============================================
   TOKEN INFO
   ============================================= */

.token-info {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.token-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.token-icon {
    font-size: 1.2rem;
}

.token-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--accent);
}

.token-expiry {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* =============================================
   HELP TEXT
   ============================================= */

.help-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    padding: 10px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

/* =============================================
   TOKEN DISPLAY
   ============================================= */

.token-display {
    background: var(--input-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    word-break: break-all;
    border: 1px solid var(--input-border);
    position: relative;
    overflow: hidden;
}

.token-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
}

.token-display strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* =============================================
   STEP INDICATOR
   ============================================= */

.step-indicator {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--input-border);
}

/* =============================================
   LOADING STATES
   ============================================= */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--text-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 480px) {
    .auth-container {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .form-group input,
    .btn {
        padding: 12px 16px;
    }
}

/* =============================================
   MINI ACCESSIBILITY IMPROVEMENTS
   ============================================= */

/* Better contrast for accessibility */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip to content for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 6px;
}

/* Better text selection */
::selection {
    background: var(--accent);
    color: white;
}

::-moz-selection {
    background: var(--accent);
    color: white;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* =============================================
   MINI PERFORMANCE TWEAKS
   ============================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Better image loading */
img {
    object-fit: cover;
}

/* Fallback for lazy loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* =============================================
   ANIMATIONS & TRANSITIONS
   ============================================= */

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
    background: var(--btn-gradient-start);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--btn-gradient-end);
}

/* =============================================
   EDITOR SPECIFIC STYLES
   ============================================= */

/* Main Editor Container */
.editor-container {
    display: flex;
    height: 100vh;
    background: var(--deep-black);
    position: relative;
    overflow: hidden;
}

/* Editor Sidebar */
.editor-sidebar {
    width: 280px;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    transition: width 0.3s ease;
}

.editor-sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
}

.project-info h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.project-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* File Explorer */
.file-explorer {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.file-explorer h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* File Tree */
.file-tree {
    font-size: 14px;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    position: relative;
}

.tree-item:hover {
    background: var(--bg-hover);
}

.tree-item.active {
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tree-toggle {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-toggle:hover {
    opacity: 1;
}

.tree-children {
    margin-left: 20px;
    display: none;
}

.tree-children.expanded {
    display: block;
}

/* File Items */
.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.file-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.file-item.active {
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.file-item i {
    width: 20px;
    margin-right: 10px;
    opacity: 0.8;
}

.file-item.active i {
    opacity: 1;
}

/* File Type Icons */
.file-icon.html { color: #e34c26; }
.file-icon.css { color: #1572b6; }
.file-icon.js { color: #f1e05a; }
.file-icon.json { color: #ccc; }
.file-icon.md { color: #083fa1; }
.file-icon.php { color: #777bb4; }

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone.active {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    transform: scale(1.02);
}

.drop-zone i {
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.drop-zone p {
    margin: 0 0 8px 0;
    font-weight: 500;
}

.drop-zone small {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Main Editor Area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--deep-black);
}

/* Editor Tabs */
.editor-tabs {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 55px;
    backdrop-filter: blur(20px);
}

.tab {
    padding: 15px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

/* Editor Actions */
.editor-actions {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.editor-actions .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.editor-actions .btn:hover {
    transform: translateY(-1px);
}

/* Hot Reload Toggle */
#hot-reload-toggle.active {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    color: white;
    border-color: var(--success);
}

#hot-reload-toggle.active:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Editor Workspace */
.editor-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Code Editor */
.code-editor {
    flex: 1;
    position: relative;
    background: #1e1e1e;
}

.monaco-editor {
    height: 100%;
    width: 100%;
}

/* Monaco Editor Custom Theme Override */
.monaco-editor .margin {
    background: #1e1e1e;
}

.monaco-editor .monaco-editor-background {
    background: #1e1e1e;
}

/* Preview Pane */
.preview-pane {
    width: 450px;
    background: white;
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.preview-pane.collapsed {
    width: 0;
    overflow: hidden;
}

.preview-header {
    padding: 15px 20px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
}

.preview-controls {
    display: flex;
    gap: 8px;
}

.preview-controls button {
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.preview-controls button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.preview-content {
    flex: 1;
    overflow: auto;
    background: white;
}

.preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Status Bar */
.status-bar {
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    backdrop-filter: blur(20px);
}

.status-bar div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.ready {
    background: var(--success);
}

.status-indicator.modified {
    background: var(--warning);
}

.status-indicator.saving {
    background: var(--accent);
    animation: pulse 1s infinite;
}

.status-indicator.error {
    background: var(--error);
}

/* User Menu */
.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.user-button {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 10px 18px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-button:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.back-button .btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .preview-pane {
        width: 350px;
    }
    
    .editor-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .editor-sidebar {
        position: absolute;
        left: -280px;
        z-index: 999;
        height: 100vh;
    }
    
    .editor-sidebar.mobile-open {
        left: 0;
    }
    
    .preview-pane {
        width: 300px;
    }
    
    .user-menu {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
    
    .back-button {
        display: none;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--deep-black);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Console/Error Panel */
.console-panel {
    height: 200px;
    background: #1e1e1e;
    border-top: 1px solid var(--glass-border);
    display: none;
    flex-direction: column;
}

.console-panel.open {
    display: flex;
}

.console-header {
    padding: 10px 15px;
    background: #252526;
    border-bottom: 1px solid #333;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.console-content {
    flex: 1;
    padding: 10px 15px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.console-error {
    color: #f48771;
}

.console-warning {
    color: #cca700;
}

.console-info {
    color: #75beff;
}

/* Split View */
.editor-workspace.split-view .code-editor {
    width: 50%;
}

.editor-workspace.split-view .preview-pane {
    width: 50%;
}

/* Terminal Panel */
.terminal-panel {
    height: 250px;
    background: #1e1e1e;
    border-top: 1px solid var(--glass-border);
    display: none;
    flex-direction: column;
}

.terminal-panel.open {
    display: flex;
}

.terminal-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #ccc;
}

.terminal-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #252526;
    border-top: 1px solid #333;
}

.terminal-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ccc;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    outline: none;
}

.terminal-prompt {
    color: #75beff;
    margin-right: 8px;
}

/* =============================================
   LIGHT UI OVERRIDE (ALLEGRO + 1PASSWORD VIBE)
   ============================================= */

:root {
    --deep-black: #f7f9fc;
    --deep-black-gradient: #edf3fb;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: #dbe5f4;
    --input-bg: #ffffff;
    --input-border: #c7d5eb;
    --input-focus-border: #1769ff;
    --input-focus-shadow: rgba(23, 105, 255, 0.15);
    --btn-gradient-start: #ff5a00;
    --btn-gradient-end: #ff7a1f;
    --btn-shadow: rgba(255, 90, 0, 0.24);
    --ambient-glow: rgba(255, 90, 0, 0.18);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #1769ff;
    --accent-hover: #0f57d8;
    --bg-primary: #f7f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eff4fb;
    --bg-hover: #e8eef9;
}

body {
    font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", sans-serif;
    background: linear-gradient(180deg, #f7f9fc 0%, #edf3fb 100%);
    color: var(--text-primary);
}

body::before {
    background:
        radial-gradient(circle at 8% 8%, rgba(255, 90, 0, 0.12) 0%, rgba(255, 90, 0, 0) 36%),
        radial-gradient(circle at 92% 0%, rgba(23, 105, 255, 0.1) 0%, rgba(23, 105, 255, 0) 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    opacity: 1;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-top: 4px solid #ff5a00;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.auth-header h1 {
    background: none;
    -webkit-text-fill-color: initial;
    color: #101828;
}

.auth-header p,
.form-group label,
.links p,
.text-muted {
    color: var(--text-secondary);
}

.input-wrapper,
.radio-group {
    background: #f8fbff !important;
    border: 1px solid var(--input-border) !important;
}

.input-wrapper:focus-within,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 3px var(--input-focus-shadow) !important;
    background: #ffffff !important;
}

.form-group input,
.form-group textarea,
.form-group select {
    color: #0f172a;
    background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.btn,
.btn-primary {
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px var(--btn-shadow);
    text-transform: none;
    letter-spacing: 0.1px;
}

.btn:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(255, 90, 0, 0.28);
}

.btn-secondary {
    background: #ffffff;
    color: #1769ff;
    border: 1px solid #b9cff8;
    box-shadow: none;
}

.btn-danger {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    box-shadow: none;
}

.btn-social {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #d6e1f2;
}

.btn-social:hover {
    background: #f8fbff;
    border-color: #b9cff8;
}

.links {
    border-top: 1px solid #dbe5f4;
}

.links a,
.forgot-link,
.terms-link {
    color: #1769ff !important;
}

.links a:hover,
.forgot-link:hover,
.terms-link:hover {
    color: #0f57d8 !important;
}

.alert-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.alert-success {
    background: #ecfdf3;
    border-color: #86efac;
    color: #15803d;
}
