@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=DM+Serif+Text:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #090d15;
    --bg-secondary: #0d1422;
    --surface-color: rgba(13, 20, 35, 0.9);
    --surface-raised: rgba(18, 27, 46, 0.8);
    --primary-color: #4d9fd6;
    --secondary-color: #7bb8d8;
    --primary-dark: #2d7aaa;
    --text-primary: #edf1f7;
    --text-secondary: #7a91aa;
    --text-muted: #4a5a6a;
    --accent-glow: rgba(77, 159, 214, 0.12);
    --border-color: rgba(100, 140, 175, 0.13);
    --border-strong: rgba(100, 140, 175, 0.25);
    --glass-blur: 10px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 100px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(45, 100, 160, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(30, 70, 120, 0.05) 0%, transparent 55%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'DM Serif Text', serif;
    font-weight: 400;
}

/* Glassmorphism Utility */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    position: relative;
}

.hero h1 {
    font-family: 'DM Serif Text', serif;
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.7;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.card h2 {
    font-family: 'DM Serif Text', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.75rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.card .btn {
    align-self: flex-start;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.88rem;
    background: transparent;
    border: 1px solid var(--border-strong);
    transition: all 0.2s ease;
    color: var(--text-secondary);
    text-decoration: none;
}

.card:hover .btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.card.disabled {
    opacity: 0.4;
    filter: grayscale(1);
    cursor: not-allowed;
}

/* Golf Page Specifics */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.scorecard {
    padding: 1rem 1.5rem;
    text-align: right;
}

.scorecard .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.scorecard .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.code-area {
    margin-bottom: 2rem;
}

.terminal {
    background: #070b12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.terminal-top {
    background: rgba(255,255,255,0.03);
    padding: 8px 16px;
    display: flex;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    margin-left: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

textarea.sql-editor {
    width: 100%;
    height: 200px;
    background: transparent;
    color: var(--secondary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    padding: 20px;
    border: none;
    resize: vertical;
    outline: none;
    line-height: 1.6;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-action {
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    border: none;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(77, 159, 214, 0.25);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: wait;
}

.results-panel {
    margin-top: 2rem;
    min-height: 200px;
}

.results-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

table.data-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 1px;
}

table.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(100, 140, 175, 0.07);
    color: var(--text-primary);
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-box {
    padding: 1.5rem;
}

.panel-box h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.schema-box {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.putt-zone {
    border: 1px solid var(--border-strong);
}

.putt-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.putt-input:focus {
    border-color: var(--primary-color);
}

#feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
}

.feedback-success {
    background: rgba(77, 159, 214, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(77, 159, 214, 0.25);
}

.feedback-error {
    background: rgba(220, 80, 70, 0.08);
    color: #e07070;
    border: 1px solid rgba(220, 80, 70, 0.25);
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--primary-color);
    vertical-align: middle;
    animation: pulse 1.1s infinite;
    border-radius: 1px;
}

/* Accordion / Grouped Menu */
.category-group {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
}

.category-header {
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.category-header .icon {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.category-header.active .icon {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.15);
}

.category-group.active .category-content {
    max-height: 3000px;
}

.bucket-list {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem;
}

.bucket-item {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.18s ease;
}

.bucket-item:hover {
    background: rgba(77, 159, 214, 0.06);
    border-color: rgba(77, 159, 214, 0.3);
    color: var(--primary-color);
    transform: translateX(3px);
}

.bucket-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.bucket-item.locked::after {
    content: '🔒';
    font-size: 0.8rem;
}

.bucket-item::after {
    content: '→';
    font-family: 'DM Sans', sans-serif;
    opacity: 0;
    transition: opacity 0.18s;
}

.bucket-item.completed {
    border-color: rgba(77, 159, 214, 0.3);
    background: rgba(77, 159, 214, 0.05);
    color: var(--primary-color);
}

.bucket-item.completed::before {
    content: "✓";
    margin-right: 0.8rem;
    font-weight: bold;
}

.bucket-item:hover::after {
    opacity: 1;
}

/* Tabbed Interface */
.tabs-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.7rem 1.3rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Calendar Style */
.calendar-bar {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.calendar-bar::-webkit-scrollbar {
    height: 4px;
}

.calendar-bar::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

.calendar-day {
    min-width: 160px;
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-strong);
}

.calendar-day.active {
    border-color: var(--primary-color);
    background: rgba(77, 159, 214, 0.05);
}

.calendar-day .date {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.calendar-day .title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

/* Notes / Writepad */
.notes-area {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.notes-area:focus {
    border-color: var(--border-strong);
}

/* User Bar */
.user-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 100;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#user-display {
    font-weight: 600;
    color: var(--text-primary);
}

.logout-link {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.logout-link:hover {
    border-color: #e07070;
    color: #e07070;
    background: rgba(220, 80, 70, 0.06);
}

/* ==========================================================================
   Segmented Language Mode Selector
   ========================================================================== */
.mode-selector-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}

.mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 5px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.mode-btn {
    padding: 0.8rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    letter-spacing: 0.2px;
}

.mode-btn.active {
    color: #fff !important;
}

.mode-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.mode-selector-bg {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: var(--primary-color);
    border-radius: var(--radius-pill);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

.mode-selector[data-active="python"] .mode-selector-bg {
    transform: translateX(100%);
}

/* ==========================================================================
   Full Calendar Month Grid
   ========================================================================== */
.calendar-card {
    padding: 2rem;
    margin-top: 1.5rem;
}

.calendar-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.calendar-title-display {
    font-family: 'DM Serif Text', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0;
}

.calendar-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 0.9rem;
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    text-align: center;
    margin-bottom: 0.6rem;
}

.calendar-weekday {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0.4rem 0;
}

.calendar-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-tile {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: all 0.18s ease;
    background: transparent;
    border: 1px solid rgba(100, 140, 175, 0.08);
    color: var(--text-secondary);
}

.calendar-day-tile.empty {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.calendar-day-tile.today {
    border-color: var(--primary-color) !important;
    color: var(--text-primary);
}

.calendar-day-tile:hover:not(.empty):not(.future) {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Solved States */
.calendar-day-tile.solved {
    background: rgba(77, 159, 214, 0.06);
    border-color: rgba(77, 159, 214, 0.3);
    color: var(--primary-color);
}

.calendar-day-tile.solved:hover {
    border-color: var(--primary-color) !important;
    background: rgba(77, 159, 214, 0.1);
}

.calendar-day-tile.solved::after {
    content: none;
}

/* Partially Solved State */
.calendar-day-tile.partially-solved {
    background: rgba(123, 184, 216, 0.05);
    border-color: rgba(123, 184, 216, 0.25);
    color: var(--secondary-color);
}

.calendar-day-tile.partially-solved:hover {
    border-color: var(--secondary-color) !important;
    background: rgba(123, 184, 216, 0.08);
}

.calendar-day-tile.partially-solved::after {
    content: none;
}

/* Unsolved Past State */
.calendar-day-tile.unsolved {
    border-style: dashed;
    border-color: rgba(100, 140, 175, 0.18);
}

/* Future State */
.calendar-day-tile.future {
    opacity: 0.22;
    cursor: not-allowed;
    background: transparent;
}

/* Solve count badge */
.solve-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
}

/* Active selection */
.calendar-day-tile.active-selection {
    background: rgba(77, 159, 214, 0.1) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Difficulty dots */
.tile-dots-container {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 3px;
}

.tile-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tile-dot.dot-easy {
    border: 1px solid #4db888;
}
.tile-dot.dot-easy.solved {
    background-color: #4db888;
}
.tile-dot.dot-easy.unsolved {
    background-color: transparent;
    opacity: 0.4;
}

.tile-dot.dot-medium {
    border: 1px solid #d4a843;
}
.tile-dot.dot-medium.solved {
    background-color: #d4a843;
}
.tile-dot.dot-medium.unsolved {
    background-color: transparent;
    opacity: 0.4;
}

.tile-dot.dot-hard {
    border: 1px solid #c96060;
}
.tile-dot.dot-hard.solved {
    background-color: #c96060;
}
.tile-dot.dot-hard.unsolved {
    background-color: transparent;
    opacity: 0.4;
}

/* Daily Details Preview card */
.daily-preview-card {
    transition: all 0.25s ease;
    animation: fadeIn 0.3s ease-out;
}

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

/* Difficulty & Tags styling */
.difficulty-dot {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.difficulty-dot.dot-easy  { background-color: #4db888; }
.difficulty-dot.dot-medium { background-color: #d4a843; }
.difficulty-dot.dot-hard  { background-color: #c96060; }

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid transparent;
}
.difficulty-badge.easy {
    background: rgba(77, 184, 136, 0.1);
    color: #4db888;
    border-color: rgba(77, 184, 136, 0.2);
}
.difficulty-badge.medium {
    background: rgba(212, 168, 67, 0.1);
    color: #d4a843;
    border-color: rgba(212, 168, 67, 0.2);
}
.difficulty-badge.hard {
    background: rgba(201, 96, 96, 0.1);
    color: #c96060;
    border-color: rgba(201, 96, 96, 0.2);
}

.tags-container-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all 0.18s;
}
.tag-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
}

/* ==========================================================================
   Button: Secondary Variant
   ========================================================================== */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}
.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.btn-secondary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   Responsive — Mobile (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 52px;
    }

    .user-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(9, 13, 21, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        padding: 0.55rem 1rem;
        gap: 0.75rem;
        justify-content: space-between;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .container {
        padding: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .terminal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .btn-action {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }

    .controls {
        flex-wrap: wrap;
    }

    .mode-selector {
        gap: 0;
    }

    .mode-btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.82rem;
    }

    .calendar-day-grid {
        gap: 0.3rem;
    }

    .calendar-day-tile {
        font-size: 0.78rem;
        border-radius: 6px;
    }

    .tile-dots-container {
        gap: 2px;
    }

    .tile-dot {
        width: 4px;
        height: 4px;
    }

    .solve-badge {
        font-size: 0.5rem;
        padding: 1px 2px;
    }

    .bucket-list {
        grid-template-columns: 1fr;
    }

    textarea.sql-editor {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   Responsive — Extra Small (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.9rem;
    }

    .container {
        padding: 0.75rem;
    }

    .scorecard .value {
        font-size: 1.8rem;
    }

    .calendar-day-tile {
        font-size: 0.7rem;
    }

    .calendar-day-grid {
        gap: 0.18rem;
    }

    .mode-btn {
        padding: 0.55rem 0.9rem;
        font-size: 0.76rem;
        letter-spacing: 0;
    }
}
