/* ============================================
   Sinhala Unicode Converter - Styles
   Modern, responsive design with dark theme
   ============================================ */

/* ============================================
   Legacy Sinhala Font Declarations
   ============================================ */

/* FM-Malithi (DL/Manel compatible) font */
@font-face {
    font-family: 'FMMalithi';
    src: url('https://cdn.jsdelivr.net/gh/nickel-dev/sinhalaunicode@main/fonts/FMAbhaya.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Isiwara font */
@font-face {
    font-family: 'Iskoola Pota';
    src: url('https://cdn.jsdelivr.net/gh/nickel-dev/sinhalaunicode@main/fonts/iskoola.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Fallback DL-Manel style font */
@font-face {
    font-family: 'DL-Manel';
    src: local('FM Malithi'), local('FMAbhaya'), local('DL-Paras');
    font-weight: normal;
    font-style: normal;
}

/* CSS Variables for Theming */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #09090b;
    --bg-secondary: rgba(24, 24, 27, 0.7);
    --bg-tertiary: rgba(39, 39, 42, 0.6);
    --bg-card: rgba(24, 24, 27, 0.5);
    --bg-hover: rgba(63, 63, 70, 0.8);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-placeholder: #64748b;

    --accent-primary: #8b5cf6;
    --accent-secondary: #d946ef;
    --accent-glow: rgba(139, 92, 246, 0.4);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;

    /* Transitions */
    /* Using fluid cubic-bezier for premium feel */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-sinhala: 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.8);
    --bg-tertiary: rgba(241, 245, 249, 0.8);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-hover: rgba(241, 245, 249, 1);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --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 48px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-image {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--space-sm);
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   Converter Section
   ============================================ */
.converter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
    .converter-section {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.panel:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.panel:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
}

.panel-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.05);
}

/* Text Areas */
.text-area {
    flex: 1;
    min-height: 250px;
    padding: var(--space-lg);
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-family: var(--font-sinhala);
    line-height: 1.8;
    resize: none;
    outline: none;
}

.text-area::placeholder {
    color: var(--text-placeholder);
}

.output-area {
    overflow-y: auto;
}

.output-area .placeholder {
    color: var(--text-placeholder);
    font-style: italic;
}

/* Legacy Font Preview Styles */
.output-area.font-unicode {
    font-family: var(--font-sinhala);
}

.output-area.font-dl {
    font-family: 'FMMalithi', 'FM Malithi', 'FMAbhaya', 'DL-Manel', 'DL-Paras', 'FM-Malithi', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}

.output-area.font-isi {
    font-family: 'Iskoola Pota', 'Isiwara', 'Nirmala UI', sans-serif;
    font-size: 1.3rem;
}

/* Font Selector */
.font-selector {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}

.font-selector:hover {
    border-color: var(--border-hover);
}

.font-selector:focus {
    border-color: var(--accent-primary);
}

.copy-format-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

/* Panel Footer */
.panel-footer {
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
}

.stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stats .divider {
    color: var(--border-color);
}

.keyboard-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.keyboard-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.keyboard-toggle.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: var(--space-sm);
}

.export-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.export-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ============================================
   Virtual Keyboard
   ============================================ */
.keyboard-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-normal);
}

.keyboard-section.hidden {
    display: none;
}

.keyboard-layout-selector {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.keyboard-layout-selector button {
    padding: var(--space-xs) var(--space-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.keyboard-layout-selector button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.keyboard-layout-selector button.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.keyboard-row {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-bottom: var(--space-xs);
}

.keyboard-key {
    min-width: 48px;
    height: 48px;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sinhala);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.keyboard-key:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.keyboard-key:active {
    transform: translateY(0);
    background: var(--accent-primary);
    color: white;
}

.keyboard-key.modifier-key {
    background: var(--bg-tertiary);
    font-size: 0.9rem;
}

.keyboard-key.modifier-key.active {
    background: var(--accent-primary);
    color: white;
}

.key-main {
    font-size: 1.1rem;
    line-height: 1;
}

.key-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-family);
    position: absolute;
    bottom: 2px;
    right: 4px;
}

/* ============================================
   Quick Reference
   ============================================ */
.reference-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.reference-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    cursor: pointer;
}

.reference-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.toggle-reference {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.toggle-reference:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toggle-reference .icon {
    transition: transform var(--transition-fast);
}

.reference-header.collapsed .toggle-reference .icon {
    transform: rotate(-90deg);
}

.reference-content {
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}

.reference-content.collapsed {
    display: none;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.reference-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.reference-card h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reference-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.ref-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ref-item kbd {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.reference-items.examples .ref-item {
    width: 100%;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-lg);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.hidden {
    display: none;
}

.toast-message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.modal-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.help-section {
    margin-bottom: var(--space-lg);
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.help-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Utility Classes
   ============================================ */
.icon {
    width: 18px;
    height: 18px;
}

.hidden {
    display: none !important;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .main-content {
        padding: var(--space-md);
    }

    .logo h1 {
        display: none;
    }

    .text-area {
        min-height: 180px;
        font-size: 1rem;
    }

    .keyboard-key {
        min-width: 36px;
        height: 42px;
        font-size: 0.9rem;
    }

    .reference-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .keyboard-key {
        min-width: 30px;
        height: 38px;
        padding: var(--space-xs);
    }

    .key-sub {
        display: none;
    }

    .export-btn span {
        display: none;
    }

    .keyboard-toggle span {
        display: none;
    }
}

/* ============================================
   App Tabs & Translator UI
   ============================================ */
.app-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-xs);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    padding: var(--space-sm) var(--space-xl);
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.badge {
    background: var(--warning);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.english-font {
    font-family: var(--font-family);
}

.mic-btn.active {
    color: var(--error);
}

.recording-pulses {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.powered-by {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.glow-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { text-shadow: 0 0 10px var(--accent-glow); }
    to { text-shadow: 0 0 20px var(--accent-primary); color: var(--text-primary); }
}

.phrases-section {
    margin-top: var(--space-2xl);
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-short);
}
.report-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}
.report-btn .icon { width: 14px; height: 14px; }

/* Report Modal Specific Styles to override Blogger Theme */
.report-textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: var(--space-md) !important;
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all var(--transition-short) !important;
}
.report-textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2) !important;
}

.report-submit-btn {
    width: 100% !important;
    padding: var(--space-md) !important;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all var(--transition-short) !important;
    text-transform: none !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
}
.report-submit-btn:hover {
    box-shadow: var(--shadow-glow) !important;
    transform: translateY(-2px) !important;
}
.report-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.phrases-header h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.phrases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.phrase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
}

.phrase-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.phrase-en {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.phrase-si {
    color: var(--accent-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.phrase-pron {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   Animations
   ============================================ */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: slideUp 0.4s ease forwards;
}

.input-panel {
    animation-delay: 0.1s;
}

.output-panel {
    animation-delay: 0.2s;
}

/* Print Styles */
@media print {

    .header,
    .keyboard-section,
    .reference-section,
    .footer,
    .panel-footer,
    .nav-links {
        display: none !important;
    }

    .output-panel {
        border: none;
        box-shadow: none;
    }
}