/* Self-hosted Montserrat font - prevents FOUT by loading with CSS */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: block;
    src: url('/fonts/montserrat-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: block;
    src: url('/fonts/montserrat-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: block;
    src: url('/fonts/montserrat-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 500;
    font-display: block;
    src: url('/fonts/montserrat-500-italic.woff2') format('woff2');
}

:root {
    --primary-blue: #1e3a5f;
    --primary-blue-light: #5dade2;
    --primary-orange: #e67e22;
    --primary-orange-hover: #d35400;
    --background-page: #d5dce4;
    --background-content: #ffffff;
    --background-card: #f8f9fa;
    --border-color: #dee2e6;
    --text-primary: #1e3a5f;
    --text-dim: #5a6268;
    --text-light: #3d4449;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Montserrat', sans-serif;
    --font-mono: 'Courier New', monospace;
    --content-max-width: 900px;
}

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

/* Hide Vue templates until mounted (prevents FOUC) */
[v-cloak] {
    display: none;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(to right,
        #b8c8d8 0%,
        #b8c8d8 calc(50% - 450px),
        var(--background-page) calc(50% - 450px),
        var(--background-page) calc(50% + 450px),
        #e8d0c0 calc(50% + 450px),
        #e8d0c0 100%
    );
    color: var(--text-primary);
    min-height: 100vh;
}

#app {
    max-width: var(--content-max-width);
    margin: 0 auto;
    background-color: var(--background-content);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(30, 58, 95, 0.15);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-content);
    border-bottom: 2px solid var(--primary-blue);
}

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

.nav-brand img {
    height: 40px;
    width: auto;
}

.nav-brand h1 {
    color: var(--primary-blue);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.9375rem;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.hamburger-btn svg {
    display: block;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s;
}

.dropdown-item:hover:not(:disabled) {
    background-color: var(--background-card);
}

.dropdown-item:disabled {
    color: var(--text-dim);
    cursor: not-allowed;
    opacity: 0.6;
}

.dropdown-item.active {
    color: var(--primary-orange);
}

.tagline {
    color: var(--primary-blue-light);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.5px;
    padding: 0.75rem 2rem;
    margin: 0;
}

.main-content {
    padding: 1.5rem 2rem;
}

.loading {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
}

.error {
    text-align: center;
    color: #ff4444;
    padding: 2rem;
}

.btn {
    background-color: var(--primary-orange);
    color: var(--background-light);
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.btn:hover {
    background-color: var(--primary-orange-hover);
}

.btn:disabled {
    background-color: var(--text-dim);
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--primary-blue);
    color: var(--background-light);
}

.btn-secondary:hover {
    background-color: var(--primary-blue-light);
}

.card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.08);
}

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

.card p {
    color: var(--text-light);
}

/* Typing Practice View */
.typing-practice-view {
    max-width: 900px;
    margin: 0 auto;
}

/* Sprint Bar - Play/Pause controls and timer */
.sprint-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.sprint-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-play {
    background-color: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.btn-play:hover:not(:disabled) {
    background-color: var(--primary-orange-hover);
    transform: scale(1.05);
}

.btn-reset {
    background-color: var(--primary-blue-light);
    color: white;
    box-shadow: 0 2px 8px rgba(93, 173, 226, 0.3);
}

.btn-reset:hover:not(:disabled) {
    background-color: #4a9fd4;
    transform: scale(1.05);
}

.btn-reset:disabled {
    background-color: #c5cdd4;
    color: white;
    box-shadow: none;
}

.sprint-hint {
    flex: 1;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.6875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 600;
}

.sprint-timer {
    display: flex;
    align-items: center;
}

.timer-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-variant-numeric: tabular-nums;
}

.typing-area {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem 1.5rem;
    background-color: var(--background-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08);
    transition: box-shadow 0.2s ease;
}

.typing-area:focus-within {
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.12);
}

.word-display {
    margin-bottom: 0.75rem;
    min-height: 8rem;
}

.input-area {
    text-align: center;
}

.word-row {
    display: flex;
    gap: 1ch;
    font-size: 2rem;
    font-family: var(--font-mono);
    align-items: baseline;
}

.word-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2rem;
    font-family: var(--font-mono);
    gap: 0.25rem;
}

/* Vue transition-group for word stack drop effect */
.drop-enter-active,
.drop-move {
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.drop-enter-from {
    transform: translateY(-2rem);
    opacity: 0;
}

.drop-leave-active {
    display: none;
}

.word.current {
    color: var(--primary-orange);
    font-weight: 700;
    font-size: 2.75rem;
}

.word.current.repeat {
    color: var(--primary-blue-light);
}

.word.current.typing-error {
    color: #ff4444;
}

.word.upcoming {
    color: var(--text-dim);
    font-weight: 400;
}

.word.had-error::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: rgba(200, 80, 80, 0.5);
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.input-area input {
    width: 100%;
    max-width: 24ch;
    padding: 0.25rem 0;
    font-size: 2.75rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: center;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    background: transparent;
}

.input-area input:focus {
    outline: none;
    border-bottom-color: var(--primary-blue-light);
}

.input-area input:focus::placeholder {
    opacity: 0;
}

.input-area input::placeholder {
    font-style: italic;
    font-weight: 400;
    opacity: 0.55;
}

.input-area input.error {
    border-bottom-color: #ff4444;
}

.input-area input:disabled {
    color: var(--text-dim);
    cursor: not-allowed;
}

/* Shared panel styling for stats and controls */
.card-panel {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 2rem;
    margin: 1rem 0;
}

.panel-header {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
}

.stats-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 500;
    order: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    order: 0;
}

.stat-value-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    order: 0;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.control-row.with-divider {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-label {
    font-size: 0.6875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 500;
}

/* Segmented Control (for Duration) */
.segmented-control {
    display: flex;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.segmented-control button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.segmented-control button:hover:not(.active):not(:disabled) {
    background-color: rgba(30, 58, 95, 0.05);
    color: var(--text-primary);
}

.segmented-control button.active {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 1px 3px rgba(30, 58, 95, 0.2);
}

.segmented-control button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chip Select (for Wordlists) */
.chip-select {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--background-content);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.chip:hover:not(.active):not(:disabled) {
    border-color: var(--primary-blue-light);
    color: var(--primary-blue);
}

.chip.active {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toggle checkbox */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox {
    position: relative;
    appearance: none;
    width: 2.5rem;
    height: 1.25rem;
    background-color: var(--border-color);
    border-radius: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toggle-checkbox::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle-checkbox:checked {
    background-color: var(--primary-blue);
}

.toggle-checkbox:checked::before {
    transform: translateX(1.25rem);
}

.toggle-checkbox:focus {
    outline: 2px solid var(--primary-blue-light);
    outline-offset: 2px;
}

.toggle-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

/* Algorithm sliders */
.algorithm-sliders {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.slider-label-left,
.slider-label-right {
    color: var(--text-dim);
    flex: 1;
}

.slider-label-left {
    text-align: left;
}

.slider-label-right {
    text-align: right;
}

.slider-name {
    color: var(--primary-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: var(--primary-blue-light);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    background: var(--primary-blue-light);
}

.slider-value {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-orange);
}

.slider-explanation {
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin: 0;
    text-align: center;
}

/* Button variants */
.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    border: 2px solid var(--primary-orange);
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-orange-hover);
    border-color: var(--primary-orange-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--text-dim);
    color: var(--text-primary);
}

/* Profile View */
.word-list-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.word-list-section h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.word-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.word-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.15s;
}

.word-list-item:hover {
    background-color: var(--background-content);
}

.word-list-word {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    flex: 1;
}

.word-list-stat {
    font-size: 0.875rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-right: 0.5rem;
}

.btn-reset-word {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
    opacity: 0.5;
}

.btn-reset-word:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    opacity: 1;
}

.reset-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Delete Account Section */
.delete-account-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-delete-account {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-delete-account:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Confirmation Modal */
.confirm-modal {
    max-width: 400px;
    text-align: left;
}

.confirm-modal h3 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.confirm-modal p {
    color: var(--text-dim);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.confirm-modal-actions .btn-secondary {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.confirm-modal-actions .btn-secondary:hover {
    background: var(--background-card);
    color: var(--text-primary);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Delete Account Modal */
.delete-account-modal {
    max-width: 450px;
    text-align: left;
}

.delete-account-modal h3 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.delete-warning {
    color: #dc3545;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 500;
}

.delete-instruction {
    color: var(--text-dim);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.delete-confirm-input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    background: var(--background-card);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: monospace;
}

.delete-confirm-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* About View */
.about-view {
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-view h2 {
    color: var(--primary-blue);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-view .intro {
    color: var(--text-dim);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.about-view h3 {
    color: var(--primary-blue);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-orange);
    display: inline-block;
}

.about-view h3:first-child {
    margin-top: 0;
}

.about-view p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.about-view ol,
.about-view ul {
    color: var(--text-light);
    margin: 0 0 1rem 1.5rem;
}

.about-view li {
    margin-bottom: 0.5rem;
}

.about-view a {
    color: var(--primary-blue-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.about-view a:hover {
    border-bottom-color: var(--primary-blue-light);
}

.about-view .tip {
    background: var(--background-card);
    border-left: 3px solid var(--primary-orange);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9375rem;
}

.about-view .wordlist-name {
    color: var(--primary-blue);
    font-weight: 600;
}

.about-view .contact-buttons {
    font-style: italic;
    margin-top: 1.5rem;
}

.about-view .contact-btn {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-style: normal;
    font-weight: 500;
    margin: 0 0.25rem;
    transition: opacity 0.2s;
}

.about-view .contact-btn:hover {
    opacity: 0.85;
    border-bottom: none;
}

.about-view .contact-btn.email {
    background: var(--primary-orange);
}

.about-view .contact-btn.twitter {
    background: var(--primary-blue-light);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 95, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--background-content);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.2);
    text-align: center;
}

.modal h2 {
    color: var(--primary-blue);
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-actions .btn-primary {
    text-decoration: none;
    text-align: center;
}

.modal-actions .btn-secondary {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-actions .btn-secondary:hover {
    border-color: var(--text-dim);
    color: var(--text-primary);
}

.modal-btn:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Error Panel */
.error-panel {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.error-panel .error-message {
    margin-bottom: 1rem;
}

.error-panel .btn-retry {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.error-panel .btn-retry:hover {
    background: #c82333;
}

/* Sprint Complete Modal */
.sprint-complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.sprint-complete-modal {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.sprint-complete-modal h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
}

.sprint-complete-modal .stats-summary {
    margin-bottom: 1.5rem;
}

.sprint-complete-modal .stat-primary {
    margin-bottom: 1rem;
}

.sprint-complete-modal .stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.sprint-complete-modal .stat-value-large {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.sprint-complete-modal .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.sprint-complete-modal .stats-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.sprint-complete-modal .modal-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}

.sprint-complete-modal .btn-break {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sprint-complete-modal .btn-break:hover {
    background: #5a6268;
}

.sprint-complete-modal .btn-new-sprint {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sprint-complete-modal .btn-new-sprint:hover {
    background: #0069d9;
}

/* Debug Panel (dev mode only) */
.debug-panel {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
}

.debug-panel h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.debug-panel .debug-section {
    margin-bottom: 1rem;
}

.debug-panel .debug-global {
    margin-top: 1rem;
}

.debug-panel .debug-indent {
    padding-left: 1rem;
}

.debug-panel .debug-muted {
    color: #666;
}

.debug-panel .debug-divider {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.debug-panel .debug-priority-list {
    margin-top: 0.25rem;
}

.debug-panel .debug-priority-item {
    display: flex;
    gap: 0.5rem;
    line-height: 1.4;
}

.debug-panel .debug-priority-rank {
    width: 1.5rem;
    text-align: right;
    color: #666;
}

.debug-panel .debug-priority-word {
    width: 5rem;
    font-weight: bold;
}

.debug-panel .debug-priority-prob {
    width: 3.5rem;
    text-align: right;
    color: var(--accent-color);
    font-weight: bold;
}

.debug-panel .debug-priority-score {
    width: 3rem;
    text-align: right;
}

.debug-panel .debug-priority-stats {
    color: #666;
}

.debug-panel .btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.debug-panel .btn-danger:hover {
    background: #c82333;
}

/* Toast */
.toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
    z-index: 1001;
    animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
