/**
 * L-Shay Translation - Complete Styles
 * Created by L-Shay
 */

/* ==================== VARIABLES ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

/* ==================== HOME SCREEN ==================== */
.home-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.home-hero {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-large {
    width: 120px;
    height: 120px;
    background: var(--gradient);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    margin: 0 auto 30px;
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.home-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.home-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 50px;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 50px 0;
    max-width: 1000px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.feature-card h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.home-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.btn-primary, .btn-secondary, .btn-guest {
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-guest {
    background: var(--success);
    color: white;
}

.btn-guest-large {
    padding: 20px 50px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 20px 45px rgba(99, 102, 241, 0.6);
        transform: scale(1.02);
    }
}

.btn-guest-large:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.6);
}

.btn-guest-large i {
    font-size: 24px;
    animation: rocket 1s ease-in-out infinite;
}

@keyframes rocket {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.guest-info {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary:hover, .btn-guest:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.home-languages {
    margin: 60px 0;
    text-align: center;
    max-width: 900px;
}

.home-languages h2 {
    color: white;
    font-size: 28px;
    margin-bottom: 30px;
}

.language-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.lang-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-badge-more {
    background: var(--gradient);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
}

.home-footer {
    margin-top: 80px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.home-footer p {
    margin: 10px 0;
}

.home-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== APP CONTAINER ==================== */
.app-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    display: flex;
    background: var(--light);
}

.page {
    display: none;
    width: 100%;
    height: 100%;
}

.page.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 280px;
    background: var(--dark);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    color: white;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 30px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: var(--shadow);
    z-index: 10;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--gradient);
    color: white;
}

.nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.user-profile {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
}

.profile-status {
    font-size: 12px;
    opacity: 0.8;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--light);
    overflow: hidden;
}

.header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-right {
    display: flex;
    gap: 12px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: var(--light);
    transform: scale(1.05);
}

/* ==================== TRANSLATION PAGE ==================== */
.translation-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.translation-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.translation-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: white;
}

.translation-textarea {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    resize: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.translation-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

.swap-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.swap-btn:hover {
    background: var(--light);
    border-color: var(--primary);
    transform: rotate(180deg);
}

.translation-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.translate-btn {
    background: var(--gradient);
    color: white;
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.clear-btn {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

.clear-btn:hover {
    background: white;
    box-shadow: var(--shadow);
}

/* ==================== Q&A PAGE ==================== */
.qa-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.subject-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.subject-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.subject-card i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.subject-card h4 {
    font-size: 14px;
    color: var(--dark);
}

.qa-input-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.qa-input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    resize: none;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.qa-answer-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.answer-box {
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
    margin: 15px 0;
    line-height: 1.8;
    color: var(--text);
}

.answer-actions {
    display: flex;
    gap: 12px;
}

/* ==================== HISTORY PAGE ==================== */
.history-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-chip:hover {
    background: var(--light);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-type {
    padding: 6px 12px;
    background: var(--light);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-date {
    font-size: 14px;
    color: var(--text-light);
}

.history-content p {
    margin: 8px 0;
    color: var(--text);
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ==================== PROFILE PAGE ==================== */
.profile-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.profile-header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.profile-info h2 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
}

.profile-info p {
    color: var(--text-light);
    margin: 4px 0;
}

.profile-join-date {
    margin-top: 10px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 8px;
}

.stat-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==================== SUPPORT PAGE ==================== */
.support-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.support-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

.contact-info {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info p {
    margin: 12px 0;
    color: var(--text);
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.support-form {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.credits {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.credits p {
    margin: 8px 0;
    color: var(--text);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-block {
    width: 100%;
}

.auth-switch {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ==================== NOTIFICATIONS ==================== */
.notification {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 20px;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-success i {
    color: var(--success);
}

.notification-error {
    border-left: 4px solid var(--error);
}

.notification-error i {
    color: var(--error);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-warning i {
    color: var(--warning);
}

.notification-info {
    border-left: 4px solid var(--primary);
}

.notification-info i {
    color: var(--primary);
}

.notification-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .translation-box {
        grid-template-columns: 1fr;
    }
    
    .swap-container {
        order: 2;
    }
    
    .support-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    
    .sidebar.collapsed {
        width: 100%;
    }
    
    .nav-menu {
        display: flex;
        gap: 10px;
        overflow-x: auto;
    }
    
    .nav-item {
        margin: 0;
    }
    
    .home-title {
        font-size: 32px;
    }
    
    .home-features {
        grid-template-columns: 1fr;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .home-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .btn-primary, .btn-secondary, .btn-guest, .btn-guest-large {
        width: 100%;
        padding: 18px 30px;
        font-size: 16px;
    }
    
    .translation-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .home-title {
        font-size: 28px;
    }
    
    .home-subtitle {
        font-size: 16px;
    }
    
    .logo-large {
        width: 90px;
        height: 90px;
        font-size: 45px;
    }
    
    .translation-box {
        padding: 15px;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .lang-select {
        width: 100%;
    }
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .sidebar,
    .header,
    .home-actions,
    .floating-features,
    .notification {
        display: none !important;
    }
    
    .main-content {
        width: 100%;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
.dark-theme {
    --light: #1e293b;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --border: #334155;
}

.dark-theme .translation-panel,
.dark-theme .qa-input-section,
.dark-theme .qa-answer-section,
.dark-theme .history-item,
.dark-theme .profile-header,
.dark-theme .stat-card,
.dark-theme .contact-info,
.dark-theme .support-form,
.dark-theme .credits {
    background: #1e293b;
    color: #e2e8f0;
}

.dark-theme .main-content {
    background: #0f172a;
}

.dark-theme .header {
    background: #1e293b;
    border-bottom-color: #334155;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
.translation-textarea,
.qa-input,
.answer-box {
    will-change: transform;
}

.feature-card,
.subject-card,
.history-item,
.stat-card {
    will-change: transform, box-shadow;
}

/* ==================== SMOOTH SCROLLING ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== SELECTION STYLES ==================== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ==================== ANIMATIONS ==================== */
.updating {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-screen.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

.loading-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== ENHANCED ANIMATIONS ==================== */
.feature-card {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-badge {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.lang-badge:nth-child(1) { animation-delay: 0.1s; }
.lang-badge:nth-child(2) { animation-delay: 0.15s; }
.lang-badge:nth-child(3) { animation-delay: 0.2s; }
.lang-badge:nth-child(4) { animation-delay: 0.25s; }
.lang-badge:nth-child(5) { animation-delay: 0.3s; }
.lang-badge:nth-child(6) { animation-delay: 0.35s; }
.lang-badge:nth-child(7) { animation-delay: 0.4s; }
.lang-badge:nth-child(8) { animation-delay: 0.45s; }
.lang-badge:nth-child(9) { animation-delay: 0.5s; }
.lang-badge:nth-child(10) { animation-delay: 0.55s; }
.lang-badge:nth-child(11) { animation-delay: 0.6s; }
.lang-badge:nth-child(12) { animation-delay: 0.65s; }

/* ==================== SMOOTH PAGE TRANSITIONS ==================== */
.page {
    animation: pageSlideIn 0.4s ease-out;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== IMPROVED HOVER EFFECTS ==================== */
.subject-card {
    position: relative;
    overflow: hidden;
}

.subject-card::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;
}

.subject-card:hover::before {
    left: 100%;
}

.history-item {
    position: relative;
    overflow: hidden;
}

.history-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.history-item:hover::after {
    width: 100%;
}

/* ==================== ENHANCED NOTIFICATIONS ==================== */
.notification {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== IMPROVED FORM INPUTS ==================== */
.translation-textarea,
.qa-input,
.form-group input,
.form-group textarea {
    transition: all 0.3s ease;
}

.translation-textarea:focus,
.qa-input:focus,
.form-group input:focus,
.form-group textarea:focus {
    transform: scale(1.01);
}

/* ==================== STAT CARDS ANIMATION ==================== */
.stat-card {
    animation: popIn 0.5s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
