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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Screen Management */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px var(--shadow-light);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Verb Grid */
.verb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.verb-card {
    background: var(--bg-card);
    border-radius: var(--radius-large);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 
        0 4px 12px var(--shadow-light),
        0 2px 4px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.verb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    border-radius: var(--radius-large);
    transition: opacity var(--transition-smooth);
}

.verb-card:nth-child(6n+1)::before { background: var(--gradient-1); }
.verb-card:nth-child(6n+2)::before { background: var(--gradient-2); }
.verb-card:nth-child(6n+3)::before { background: var(--gradient-3); }
.verb-card:nth-child(6n+4)::before { background: var(--gradient-4); }
.verb-card:nth-child(6n+5)::before { background: var(--gradient-5); }
.verb-card:nth-child(6n+6)::before { background: var(--gradient-6); }

.verb-card:hover {
    transform: translateY(-8px) scale(var(--hover-scale));
    box-shadow: 
        0 12px 24px var(--shadow-medium),
        0 6px 12px var(--shadow-light);
}

.verb-card:hover::before {
    opacity: 0.2;
}

.verb-card:active {
    transform: translateY(-4px) scale(var(--active-scale));
}

.verb-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* Detail Header */
.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-2);
    border: none;
    border-radius: var(--radius-medium);
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.back-arrow {
    font-size: 1.3rem;
    font-weight: bold;
}

.current-verb {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    background: var(--gradient-4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Conjugation Section */
.conjugation-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 
        0 8px 24px var(--shadow-light),
        0 4px 8px var(--shadow-light);
}

.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

/* Conjugation Table */
.conjugation-table {
    margin-bottom: 32px;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    margin-bottom: 16px;
}

.header-cell {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-medium);
}

.table-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conjugation-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
}

.conjugation-row:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.conjugation-row.selected {
    border-color: var(--primary-lavender);
    background: var(--primary-lavender);
    background-opacity: 0.1;
}

.pronoun {
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conjugation-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.conjugation-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.example-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.example-preview {
    flex: 1;
    color: var(--text-secondary);
}

.flag-buttons {
    display: flex;
    gap: 8px;
}

/* Audio Buttons */
.audio-button {
    background: var(--gradient-3);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 1rem;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.audio-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.audio-button:active {
    transform: scale(0.95);
}

.audio-button.playing {
    animation: pulse 1s infinite;
}

/* Selected Example */
.selected-example {
    background: var(--bg-hover);
    border-radius: var(--radius-large);
    padding: 24px;
    margin-top: 24px;
}

.example-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.example-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.example-sentence {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-medium);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.flag {
    font-size: 1.5rem;
    min-width: 32px;
}

.sentence-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
}

.german .sentence-text {
    color: var(--text-primary);
}

.spanish .sentence-text {
    color: var(--text-secondary);
}

/* Loading Indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 24px var(--shadow-medium);
    text-align: center;
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-lavender);
    border-top: 4px solid var(--accent-coral);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading p {
    font-weight: 600;
    color: var(--text-secondary);
}
