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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #0f0f0f;
    color: #f0f0f0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.header p {
    color: #a0a0a0;
    font-size: 1.1rem;
    font-weight: 400;
}

.card {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #3a3a3a;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.tabs {
    display: flex;
    background: #262626;
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #3a3a3a;
}

.tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #b0b0b0;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.tab.active {
    background: #ffffff;
    color: #000000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #f0f0f0;
    font-size: 0.95rem;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 0.875rem;
    background: #0f0f0f;
    border: 1.5px solid #3a3a3a;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.textarea {
    resize: vertical;
    min-height:  120px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn-success {
    background: #22c55e;
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: #16a34a;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: #3a3a3a;
    color: #f0f0f0;
    border: 1px solid #4a4a4a;
}

.btn-secondary:hover {
    background: #4a4a4a;
    border-color: #5a5a5a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1rem;
    background: #0f0f0f;
    border-radius: 8px;
    border: 1.5px solid #3a3a3a;
    transition: all 0.2s ease;
}

.radio-item:hover {
    background: #1a1a1a;
    border-color: #4a4a4a;
}

.radio-item.active {
    background: #1a1a1a;
    border-color: #ffffff;
}

.radio-dot {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid #666;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
}

.radio-item.active .radio-dot {
    border-color: #ffffff;
}

.radio-item.active .radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background: #ffffff;
    border-radius: 50%;
}

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

.stat-card {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.stat-label {
    color: #a0a0a0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flashcard {
    background: #1c1c1c;
    border: 2px solid #2a2a2a;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.flashcard:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.flashcard.flipped {
    border-color: #22c55e;
    background: #1a1f1a;
}

.flashcard-word {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.flashcard-translation {
    font-size: 1.25rem;
    color: #a0a0a0;
    font-weight: 500;
}

.answer-input {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    font-size: 1.125rem;
    text-align: center;
    background: #0f0f0f;
    border: 2px solid #3a3a3a;
    border-radius: 10px;
    color: #f0f0f0;
    margin-top: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.answer-input.correct {
    border-color: #22c55e;
    background: #0a1a0a;
}

.answer-input.incorrect {
    border-color: #ef4444;
    background: #1a0a0a;
}

.feedback {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feedback.correct {
    color: #22c55e;
}

.feedback.incorrect {
    color: #ef4444;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.session-complete {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.session-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.review-cards {
    max-height: 280px;
    overflow-y: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.review-card {
    background: #1c1c1c;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.review-card strong {
    color: #f59e0b;
    font-weight: 600;
}

.section {
    /* Animations removed for classic feel */
}

.icon {
    width: 1.125rem;
    height: 1.125rem;
}

.table-container {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.table-search {
    padding: 1.5rem;
    border-bottom: 1px solid #2a2a2a;
}

.search-input {
    width: 100%;
    padding: 0.875rem;
    background: #0f0f0f;
    border: 1.5px solid #3a3a3a;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.flashcard-table {
    width: 100%;
    border-collapse: collapse;
}

.flashcard-table th {
    background: #262626;
    color: #f0f0f0;
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 1px solid #3a3a3a;
}

.flashcard-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2a2a2a;
    color: #e0e0e0;
    vertical-align: top;
}

.flashcard-table tbody tr:hover {
    background: #222222;
}

.flashcard-table tbody tr:last-child td {
    border-bottom: none;
}

.swedish-text {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.05rem;
}

.english-text {
    color: #b0b0b0;
    line-height: 1.5;
}

.table-stats {
    padding: 1rem 1.5rem;
    background: #262626;
    border-top: 1px solid #3a3a3a;
    color: #a0a0a0;
    font-size: 0.9rem;
    text-align: center;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
}

.stats-compact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    background: #181818;
    border-radius: 1em;
    padding: 0.5em 1em;
    margin: 1.2em auto 1.5em auto;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px #0002;
    min-width: 0;
    width: fit-content;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .flashcard {
        padding: 2rem;
        min-height: 220px;
    }

    .flashcard-word {
        font-size: 1.75rem;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .start-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Start Tab Grid Layout */
.start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.start-grid .card {
    margin-bottom: 0;
}

.start-button-container {
    grid-column: 1 / -1;
    text-align: center;
}
