:root {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Noto Sans Kannada', sans-serif;
    --font-mono: 'Noto Sans Kannada', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

.glass-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.1;
    top: 10%;
    left: 10%;
    animation: float 20s infinite alternate;
}

@keyframes float {
    from { transform: translate(0, 0); }
    to { transform: translate(50vw, 30vh); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

header h1 span {
    color: var(--primary);
}

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

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.github-link:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
}

.editor-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.top-bar {
    background: rgba(15, 23, 42, 0.5);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.secondary-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.secondary-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    height: 600px;
}

.editor-container {
    position: relative;
    display: flex;
    border-right: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.3);
}

.line-numbers {
    width: 40px;
    padding: 1rem 0;
    background: rgba(0, 0, 0, 0.2);
    color: #475569;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-align: right;
    padding-right: 0.75rem;
    user-select: none;
    border-right: 1px solid var(--border);
}

.line-numbers span {
    display: block;
}

.code-editor {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    padding: 1rem;
    outline: none;
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow: auto;
    white-space: pre;
    user-select: text;
    caret-color: var(--primary);
}

.code-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

.output-container {
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.output-label {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.output-area {
    flex: 1;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #10b981;
    white-space: pre-wrap;
    overflow-y: auto;
}

.examples {
    margin-top: 3rem;
}

.examples h3 {
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.example-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.example-card:hover {
    background: rgba(45, 55, 72, 0.8);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.example-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.example-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .editor-container {
        height: 350px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .output-container {
        height: 250px;
    }
}

/* ── Language Toggle ──────────────────────────────────────────────── */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

.lang-option {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    transition: all 0.2s;
}

.lang-option.active {
    color: #0f172a;
    background: var(--primary);
}

.lang-sep {
    color: var(--border);
    font-size: 0.7rem;
}

/* ── Suggestions Dropdown ─────────────────────────────────────────── */
.suggestions-dropdown {
    position: fixed;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    min-width: 180px;
    max-width: 320px;
    overflow: hidden;
    padding: 4px;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-family: 'Noto Sans Kannada', var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
}

.suggestion-item:hover, .suggestion-item.selected {
    background: var(--primary);
    color: #0f172a;
}

.suggestion-index {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 1px 5px;
    border-radius: 3px;
}

.suggestion-item.selected .suggestion-index {
    color: rgba(15, 23, 42, 0.6);
    background: rgba(0, 0, 0, 0.1);
}

/* ── Kannada Font Mode removed since it is now globally consistent ── */
