@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('brand.css');

:root {
    --bg-color: #020617;
    --bg-gradient: radial-gradient(circle at top, #0f172a 0%, #020617 55%, #000 100%);
    --card-bg: #020617;
    --main-color: #22c55e;
    --main-glow: rgba(34, 197, 94, 0.35);
    --sub-color: #9ca3af;
    --sub-alt-color: #0b1120;
    --text-color: #f9fafb;
    --error-color: #ef4444;
    --error-extra-color: #991b1b;
    --font-family-ui: 'Poppins', sans-serif;
    --font-family-mono: 'JetBrains Mono', monospace;
    --roundness: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px var(--main-glow);
    --border-color: #2e2a3b;
}

.light-theme {
    /* Clean Sky Light Theme */
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: #ffffff;
    --main-color: #0284c7;
    --main-glow: rgba(2, 132, 199, 0.2);
    --sub-color: #64748b;
    --sub-alt-color: #cbd5e1;
    --text-color: #1e293b;
    --error-color: #dc2626;
    --error-extra-color: #991b1b;
    --border-color: #e2e8f0;
}

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

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-color);
    font-family: var(--font-family-ui);
    min-height: 100vh;
    display: flex;
    flex-direction: row; /* Changed from column to row for sidebar */
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Sidebar Styles - Professional Compact Design */
.sidebar {
    width: 80px; /* Collapsed width */
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0.75rem;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 1px 0 0 var(--border-color);
    overflow: hidden; /* Hide overflow content when collapsed */
}

.sidebar:hover {
    width: 260px; /* Expanded width */
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    height: 40px;
    white-space: nowrap;
}

.sidebar-header .logo-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
    filter: drop-shadow(0 0 8px var(--main-glow));
}

.sidebar-header .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0.05s;
}

.sidebar:hover .sidebar-header .logo-text {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    color: var(--sub-color);
    text-decoration: none;
    border-radius: var(--roundness);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--sub-alt-color);
    color: var(--text-color);
}

.nav-item.active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--main-color);
    border-left: 3px solid var(--main-color);
    border-radius: 0 var(--roundness) var(--roundness) 0; /* Flat left side */
    box-shadow: none;
    padding-left: calc(0.5rem - 3px); /* Compensate for border */
}

.light-theme .nav-item.active {
    background: rgba(2, 132, 199, 0.1);
}

.nav-item .icon {
    font-size: 1.2rem;
    min-width: 40px; /* Fixed width for icon centering */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-item .label {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar:hover .nav-item .label {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    white-space: nowrap;
}

.sidebar-toggle {
    display: none; /* Hidden on desktop */
}

/* User Profile in Sidebar */
.user-avatar-small {
    width: 28px;
    height: 28px;
    background: var(--main-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    min-width: 28px;
    margin-left: 6px; /* Center align with icons */
}

/* Main Content Wrapper */
#main-content-wrapper {
    flex: 1;
    margin-left: 80px; /* Match collapsed sidebar width */
    width: calc(100% - 80px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* Hide Old Header Elements */
header nav, header .logo {
    display: none !important;
}
header {
    border-bottom: none;
    margin-bottom: 1rem;
    display: none; /* Hide entire old header */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        border-right: none;
        border-top: 1px solid var(--border-color);
        flex-direction: row;
        padding: 0.5rem 1rem;
        justify-content: space-around;
        background: var(--bg-color); /* Solid background on mobile */
        z-index: 9999;
    }

    .sidebar-header, .sidebar-footer, .sidebar-toggle {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.25rem;
        font-size: 0.7rem;
        border-radius: 8px;
    }
    
    .nav-item .icon {
        font-size: 1.2rem;
    }

    .nav-item:hover {
        transform: none;
        background: transparent;
        color: var(--main-color);
    }

    .nav-item.active {
        background: transparent;
        color: var(--main-color);
        box-shadow: none;
    }

    #main-content-wrapper {
        margin-left: 0;
        width: 100%;
        margin-bottom: 80px; /* Space for bottom nav */
    }
    
    /* Show a mobile top bar for logo/theme/auth if needed, or rely on content area */
    .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        padding: 1rem;
        align-items: center;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--sub-alt-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--sub-color);
}

.app-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
}

.logo .icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px var(--main-glow));
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn, .mode-btn {
    background: transparent;
    border: none;
    color: var(--sub-color);
    font-family: var(--font-family-ui);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
    border-radius: var(--roundness);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
}

.icon-btn:hover, .mode-btn:hover {
    color: var(--text-color);
    background: var(--sub-alt-color);
}

.icon-btn {
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* Main Content Area */
main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-header h1 {
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--main-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* Toolbar (Control Panel) */
.toolbar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--roundness);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.mode-group, .sub-mode-group, .lang-group, .type-group, .diff-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mode-btn, .sub-option {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.mode-btn.active, .sub-option.active {
    color: #020617;
    background: radial-gradient(circle at top left, #4ade80, var(--main-color));
    box-shadow: 0 2px 10px var(--main-glow);
    font-weight: 600;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

select {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-family-ui);
    font-size: 0.9rem;
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}

select:hover {
    border-color: var(--main-color);
}

/* Typing Area */
.typing-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--roundness);
    padding: 3rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-soft);
    margin: 1rem 0;
}

.stats-overlay {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    display: flex;
    gap: 2rem;
    font-size: 1.25rem;
    font-family: var(--font-family-mono);
    color: var(--main-color);
    opacity: 0;
    transition: opacity 0.2s;
    font-weight: 600;
}

.stats-overlay.visible {
    opacity: 1;
}

.words-wrapper {
    font-family: var(--font-family-mono);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--sub-color);
    word-break: break-word;
    height: 160px;
    overflow: hidden;
    position: relative;
    user-select: none;
    cursor: text;
}

.word {
    display: inline-block;
    margin-right: 0.6em;
}

.letter {
    position: relative;
    transition: color 0.1s;
}

.letter.correct {
    color: var(--text-color);
    text-shadow: 0 0 2px rgba(255,255,255,0.2);
}

.letter.incorrect {
    color: var(--error-color);
    text-decoration: underline;
    text-decoration-style: wavy;
}

.letter.extra {
    color: var(--error-extra-color);
}

.word.active .letter.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 10%;
    height: 80%;
    width: 3px;
    background-color: var(--main-color);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--main-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hidden-input {
    position: absolute;
    opacity: 0;
    z-index: -1;
}

.restart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.typing-container:hover .restart-container,
.restart-container:focus-within {
    opacity: 1;
}

#restart-btn {
    font-size: 1.5rem;
    padding: 0.8rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub-color);
    cursor: pointer;
    transition: all 0.2s;
}

#restart-btn:hover {
    color: var(--main-color);
    transform: rotate(90deg);
    border-color: var(--main-color);
    box-shadow: 0 0 10px var(--main-glow);
}

.key-hint {
    font-size: 0.75rem;
    color: var(--sub-color);
    font-family: var(--font-family-mono);
}

/* Sections (Hero Tests, Games, etc.) */
.hero-tests, .leaderboard-section, .articles-section, .faq-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--roundness);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-align: center;
}

.hero-subtext {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--sub-color);
}

/* Modern Buttons (Replaces 3D Buttons) */
.btn-3d-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-3d {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 30px;
    text-decoration: none;
    color: #020617;
    background: radial-gradient(circle at top left, #4ade80, var(--main-color));
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 15px var(--main-glow);
    overflow: hidden;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-3d:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--main-glow);
}

.btn-3d:hover::before {
    opacity: 1;
}

.btn-3d:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px var(--main-glow);
}

/* Paragraph Selection Buttons */
.paragraph-selection h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.paragraph-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.para-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--sub-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.para-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    background: var(--card-bg);
}

.para-btn.active {
    background: var(--main-color);
    color: var(--bg-color);
    border-color: var(--main-color);
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.leaderboard-table th {
    text-align: left;
    padding: 1rem;
    color: var(--sub-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-table tr {
    background: var(--bg-color);
    transition: transform 0.2s;
}

.leaderboard-table tr:hover {
    transform: scale(1.01);
    background: var(--sub-alt-color);
}

.leaderboard-table td {
    padding: 1rem;
    border: none;
}

.leaderboard-table td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.leaderboard-table td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.rank-cell {
    color: var(--main-color);
    font-weight: 800;
    font-size: 1.2rem;
    text-align: center;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: radial-gradient(circle at top left, #4ade80, var(--main-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

/* Article Cards */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--roundness);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: var(--shadow-soft);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sub-alt-color);
    color: var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.article-card:hover .icon-wrapper {
    background: var(--main-color);
    color: #fff;
    transform: scale(1.1);
}

.article-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
}

.article-card p {
    color: var(--sub-color);
    font-size: 0.9rem;
}

/* FAQ */
.faq-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.2rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--main-color);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 1.2rem;
    border-top: 1px solid var(--border-color);
    color: var(--sub-color);
    background: var(--sub-alt-color);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 3rem 0;
    background: transparent;
    border-top: none;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--sub-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--main-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85); /* Blurred backdrop */
    backdrop-filter: blur(8px);
    z-index: 10001; /* High z-index to overlay everything including cookie banner */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden; /* Ensure it's hidden from screen readers/clicks */
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    padding: 2rem;
    border-radius: var(--roundness);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
    transform: translateY(0);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.primary-btn, .secondary-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font-family-ui);
}

.primary-btn {
    background: var(--main-color);
    color: #fff; /* Always white on primary */
    box-shadow: 0 4px 10px var(--main-glow);
}

.primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-big {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--roundness);
    text-align: center;
}

.stat-big .label {
    font-size: 1rem;
    color: var(--sub-color);
    margin-bottom: 0.5rem;
}

.stat-big .value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
}

.stat-small {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--roundness);
    text-align: center;
}

.stat-small .label {
    font-size: 0.85rem;
    color: var(--sub-color);
    margin-bottom: 0.25rem;
}

.stat-small .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.chart-container {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--roundness);
    height: 300px;
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .toolbar {
        justify-content: center;
        padding: 1rem;
    }
    
    .mode-group, .sub-mode-group, .lang-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .divider { display: none; }
    
    .typing-container {
        padding: 1.5rem;
    }
    
    .stats-overlay {
        position: static;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .leaderboard-table th, .leaderboard-table td {
        padding: 0.75rem;
    }
}

/* Utilities & Missing Classes */
.hidden {
    display: none !important;
}

.caps-lock-warning {
    background: var(--error-extra-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--roundness);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    animation: fadeIn 0.3s ease;
}

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

#custom-text-input {
    width: 100%;
    height: 200px;
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--roundness);
    padding: 1rem;
    margin: 1.5rem 0;
    resize: vertical;
    font-family: var(--font-family-mono);
    font-size: 0.9rem;
}

#custom-text-input:focus {
    border-color: var(--main-color);
    outline: none;
    box-shadow: 0 0 0 2px var(--main-glow);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.secondary-btn, .primary-btn {
    padding: 0.75rem 2rem;
    border-radius: var(--roundness);
    cursor: pointer;
    font-family: var(--font-family-ui);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
}

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

.secondary-btn:hover {
    color: var(--text-color);
    border-color: var(--text-color);
    background: var(--bg-color);
}

.primary-btn {
    background: var(--main-color);
    color: var(--bg-color); /* Contrast text */
}

.primary-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px var(--main-glow);
}
