* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

header {
    text-align: center;
    padding: 20px;
    background-color: #007bff;
    color: white;
}

.controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

select, button {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

#theme-toggle {
    background: none;
    font-size: 24px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

#flashcard-container {
    perspective: 1000px;
    width: 300px;
    height: 400px;
    position: relative;
}

.flashcard {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    transition: transform 0.6s, opacity 0.6s;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

body.dark .flashcard {
    background: #2c2c2c;
    color: #e0e0e0;
}

.flashcard.swiping-left {
    transform: translateX(-100%) rotate(-10deg);
    opacity: 0;
}

.flashcard.swiping-right {
    transform: translateX(100%) rotate(10deg);
    opacity: 0;
}

.flashcard h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.play-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 5px;
}

#progress {
    margin-top: 20px;
    font-size: 18px;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #007bff;
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
}

@media (max-width: 600px) {
    #flashcard-container {
        width: 90vw;
        height: 60vh;
    }
}
