/**
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 * Todos os direitos reservados
 */

/* CSS Variables - Evernote Green Palette */
:root {
    /* Chosen palette colors - Antigravity Theme */
    --primary-color: #00DD80;
    --secondary-color: #02a35f;
    --primary-glow: rgba(0, 221, 128, 0.4);
    --accent-color: rgba(255, 255, 255, 0.85);
    --surface-color: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 10px 30px rgba(0,0,0,0.03);
    --text-color: #1a1a2e;
    --nav-bg: rgba(10, 10, 15, 0.95);
    --nav-text: #ffffff;
    --nav-text-secondary: #b0b0c0;
    
    /* Automatic variations */
    --primary-hover: color-mix(in srgb, var(--primary-color) 85%, black);
    --primary-light: color-mix(in srgb, var(--primary-color) 15%, white);
    --bg-color: #f4f7f6;
    --text-muted: color-mix(in srgb, var(--text-color) 60%, transparent);
    --text-secondary: #4a4a5e;
    --border-color: rgba(0,0,0,0.05);
    --error-color: #ff3366;
    --success-color: var(--primary-color);
    --warning-color: #ffcc00;
    
    /* Layout */
    --border-radius: 8px;
    --spacing-unit: 8px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-family);
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2.25rem;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0f;
        --surface-color: rgba(20, 20, 30, 0.4);
        --accent-color: rgba(30, 30, 45, 0.6);
        --glass-border: rgba(255, 255, 255, 0.02);
        --glass-shadow: 0 10px 30px rgba(0,0,0,0.2);
        --text-color: #ffffff;
        --text-muted: #888899;
        --text-secondary: #b0b0c0;
        --border-color: rgba(255,255,255,0.05);
        --primary-light: rgba(0, 221, 128, 0.1);
        --nav-bg: rgba(10, 10, 15, 0.95);
        --nav-text: #ffffff;
        --nav-text-secondary: #b0b0c0;
    }
}

[data-theme="dark"] {
    --bg-color: #0a0a0f;
    --surface-color: rgba(20, 20, 30, 0.4);
    --accent-color: rgba(30, 30, 45, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 20px 40px rgba(0,0,0,0.3);
    --text-color: #ffffff;
    --text-muted: #888899;
    --text-secondary: #b0b0c0;
    --border-color: rgba(255,255,255,0.05);
    --primary-light: rgba(0, 221, 128, 0.1);
    --nav-bg: rgba(10, 10, 15, 0.95);
    --nav-text: #ffffff;
    --nav-text-secondary: #b0b0c0;
}

[data-theme="light"] {
    --bg-color: #f4f7f6;
    --surface-color: rgba(255, 255, 255, 0.5);
    --accent-color: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 20px 40px rgba(0,0,0,0.05);
    --text-color: #1a1a2e;
    --text-muted: color-mix(in srgb, var(--text-color) 60%, transparent);
    --text-secondary: #4a4a5e;
    --border-color: rgba(0,0,0,0.05);
    --primary-light: color-mix(in srgb, var(--primary-color) 15%, white);
    --nav-bg: rgba(10, 10, 15, 0.95);
    --nav-text: #ffffff;
    --nav-text-secondary: #b0b0c0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 2.5vw, 18px);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: transparent;
    padding-top: 90px;
    padding-bottom: 90px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: calc(var(--spacing-unit) * 2);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-secondary);
}

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

a:hover {
    text-decoration: underline;
}

/* Layout Components */
.container {
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

.section {
    display: none;
    min-height: calc(100vh - 130px);
    padding: calc(var(--spacing-unit) * 3) 0;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 4);
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.header-logo h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
    white-space: nowrap;
}

.desktop-nav {
    display: none;
    gap: calc(var(--spacing-unit) * 3);
}

.desktop-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--nav-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: calc(var(--spacing-unit)) 0;
    white-space: nowrap;
}

.desktop-nav .nav-link i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.desktop-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease, box-shadow 0.3s ease;
    border-radius: 2px;
}

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

.desktop-nav .nav-link:hover::after {
    width: 16px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.desktop-nav .nav-link.active {
    color: var(--nav-text);
    font-weight: 600;
}

.desktop-nav .nav-link.active::after {
    width: 100%;
    box-shadow: 0 0 10px var(--primary-glow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    min-width: 44px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--error-color) 85%, black);
    transform: translateY(-2px);
}

.btn-icon {
    padding: calc(var(--spacing-unit) * 1.5);
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--nav-text);
    cursor: pointer;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 2) 0;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Correction Card Wrapper - Made Invisible for Flat Tech UI */
.correction-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: calc(var(--spacing-unit) * 4);
    border: none;
}

.mode-selector {
    display: flex;
    gap: calc(var(--spacing-unit));
    margin-bottom: calc(var(--spacing-unit) * 4);
    background: var(--surface-color);
    padding: calc(var(--spacing-unit));
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit) * 2);
    border: none;
    border-radius: calc(var(--border-radius) * 0.75);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.mode-btn:hover:not(.active) {
    background: var(--border-color);
}

/* Form Elements */
.correction-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.input-label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit));
}

.text-input {
    width: 100%;
    padding: calc(var(--spacing-unit) * 3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    resize: vertical;
    min-height: 200px;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.text-input::placeholder {
    color: var(--text-muted);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: calc(var(--spacing-unit));
}

.char-counter {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: calc(var(--spacing-unit));
    border-radius: 50%;
    transition: var(--transition);
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear:hover {
    background: var(--error-color);
    color: white;
}

.btn-correct {
    align-self: flex-end;
    width: auto;
    min-width: 220px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    white-space: nowrap;
    color: #000 !important;
    background: var(--primary-color);
    border: 1px solid transparent;
    box-shadow: none;
}
.btn-correct:hover {
    background: #00e585;
}

/* Result Section */
.result-section {
    margin-top: calc(var(--spacing-unit) * 4);
    padding-top: calc(var(--spacing-unit) * 4);
    border-top: 2px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
}

.result-header h3 {
    margin: 0;
    color: var(--text-color);
}

.result-actions {
    display: flex;
    gap: calc(var(--spacing-unit));
}

.corrected-text {
    background: var(--surface-color);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    line-height: 1.7;
    font-size: var(--font-size-base);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.explanations {
    background: var(--primary-light);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.explanation-item {
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 1px solid var(--border-color);
}

.explanation-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.explanation-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit));
}

/* Comparison View */
.comparison-view {
    margin-top: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 3);
    background: var(--surface-color);
    border-radius: var(--border-radius);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 3);
}

.comparison-grid h4 {
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-color);
}

.comparison-text {
    padding: calc(var(--spacing-unit) * 2);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    line-height: 1.7;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 3);
    background: var(--accent-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.stat-card i {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* History Section */
.history-filters {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 4);
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--font-size-base);
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 44px;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.history-item {
    background: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
    transition: var(--transition);
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit));
}

.history-meta {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.mode-badge {
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5);
    border-radius: calc(var(--border-radius) * 0.5);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.mode-badge.quick {
    background: var(--warning-color);
    color: #000;
}

.mode-badge.learn {
    background: var(--primary-color);
    color: white;
}

.history-content {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.history-text {
    background: var(--surface-color);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.history-actions {
    display: flex;
    gap: calc(var(--spacing-unit));
    flex-wrap: wrap;
}

/* Settings Section */
.settings-group {
    margin-bottom: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 3);
    background: var(--accent-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.settings-group h3 {
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit));
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
    gap: calc(var(--spacing-unit) * 2);
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    cursor: pointer;
}

.setting-select {
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    min-width: 150px;
}

/* Custom Checkbox */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: calc(var(--spacing-unit) * 2);
    overflow: hidden;
    background: var(--accent-color);
}

.faq-question {
    width: 100%;
    padding: calc(var(--spacing-unit) * 3);
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--surface-color);
}

.faq-icon {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3);
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 4);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.empty-state p {
    margin-bottom: calc(var(--spacing-unit) * 4);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 1px solid var(--glass-border);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    flex: 1;
    color: var(--nav-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    min-width: 0;
    min-height: 48px;
    border-radius: 0;
}

.nav-item i {
    font-size: 20px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-color);
    background: transparent;
}

.nav-item.active i {
    transform: scale(1.15);
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-item:hover:not(.active) {
    color: var(--nav-text);
    background: transparent;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    width: max-content;
    max-width: 85vw;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success i { color: var(--success-color); }
.toast.error i { color: var(--error-color); }
.toast.warning i { color: var(--warning-color); }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: var(--bg-color);
    padding: calc(var(--spacing-unit) * 4);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto calc(var(--spacing-unit) * 2);
}

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

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

/* Footer */
.app-footer {
    text-align: center;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: calc(var(--spacing-unit) * 6);
}

.app-footer p {
    margin-bottom: calc(var(--spacing-unit));
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.app-footer p:last-child {
    margin-bottom: 0;
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.b20-link:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: calc(var(--spacing-unit)) !important; }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2) !important; }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3) !important; }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 4) !important; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius);
    height: 20px;
    margin-bottom: calc(var(--spacing-unit));
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton.text { height: 16px; }
.skeleton.title { height: 24px; }
.skeleton.button { height: 44px; }

/* Antigravity Design Classes */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-color);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--primary-glow);
    top: -100px; left: -100px;
}

.orb-2 {
    width: 500px; height: 500px;
    background: rgba(0, 150, 255, 0.1);
    bottom: -150px; right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px; height: 300px;
    background: rgba(100, 255, 150, 0.1);
    top: 40%; left: 30%;
    animation-delay: -10s;
}

.glass-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
}

.perspective-container {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.glass-panel {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
}

.float-animation {
    animation: float-panel 6s ease-in-out infinite alternate;
}

@keyframes float-panel {
    0% { transform: translateY(0) rotateX(1deg) rotateY(0.5deg); }
    100% { transform: translateY(-8px) rotateX(-0.5deg) rotateY(-1deg); }
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00f0ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glass-pill {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}
[data-theme="dark"] .glass-pill {
    background: rgba(0, 0, 0, 0.2);
}

.glow-effect {
    position: relative;
    overflow: visible !important;
}

.glow-aura {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--primary-color);
    filter: blur(15px);
    opacity: 0.4;
    z-index: -1;
    border-radius: inherit;
    transition: var(--transition);
}

.btn-correct:hover .glow-aura {
    opacity: 0.8;
    filter: blur(20px);
}

.isometric-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.isometric-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,221,128,0.15);
}

.delay-1 {
    animation-delay: 0.1s;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 221, 128, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 221, 128, 0.2);
}
