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

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #e8d5c4;
    position: relative;
}

/* Main Content Container */
.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
    margin: 20px;
    margin-top: 20px;
    border: 1px solid rgba(184, 134, 11, 0.2);
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5em;
    color: #daa520;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2em;
    color: #d4af37;
    margin-bottom: 20px;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #e8d5c4;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.back-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3);
}

/* Flashcard Container */
.flashcard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b8860b 0%, #daa520 100%);
    transition: width 0.5s ease;
    width: 2.5%;
}

/* Card Counter */
.card-counter {
    font-size: 1.2em;
    color: #d4af37;
    margin-bottom: 20px;
}

.counter-current {
    color: #daa520;
    font-weight: bold;
    font-size: 1.3em;
}

/* Flashcard */
.flashcard {
    width: 100%;
    max-width: 600px;
    height: 350px;
    position: relative;
    perspective: 1000px;
    margin-bottom: 30px;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(218, 165, 32, 0.3);
}

.flashcard-front {
    background: linear-gradient(135deg, #2874a6 0%, #1b5e8f 100%);
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, #1e8449 0%, #145a32 100%);
    color: white;
    transform: rotateY(180deg);
}

.word-text {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.word-pos {
    font-size: 1.3em;
    font-style: italic;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
}

.synonyms-container {
    text-align: center;
}

.synonyms-label {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.synonyms-text {
    font-size: 1.8em;
    line-height: 1.6;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.flip-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.9em;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 15px;
}

/* Control Buttons */
.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    background: rgba(40, 40, 40, 0.8);
    color: #e8d5c4;
    border: 2px solid rgba(184, 134, 11, 0.3);
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn:hover:not(:disabled) {
    background: rgba(184, 134, 11, 0.2);
    border-color: #b8860b;
    transform: scale(1.05);
}

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

.control-btn.primary {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: #1a1a1a;
    border: none;
}

.control-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    transform: scale(1.05);
}

/* Study Mode Toggle */
.study-mode {
    background: rgba(40, 40, 40, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(184, 134, 11, 0.3);
}

.mode-title {
    font-size: 1.2em;
    color: #daa520;
    margin-bottom: 15px;
}

.mode-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    background: rgba(26, 26, 26, 0.8);
    color: #e8d5c4;
    border: 2px solid rgba(184, 134, 11, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(184, 134, 11, 0.2);
    border-color: #b8860b;
}

.mode-btn.active {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: #1a1a1a;
    border-color: #daa520;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        border-radius: 15px;
        margin-top: 60px;
    }

    h1 {
        font-size: 2em;
    }

    .flashcard {
        height: 300px;
    }

    .word-text {
        font-size: 2em;
    }

    .controls {
        gap: 10px;
    }

    .control-btn {
        padding: 12px 20px;
        font-size: 1em;
    }

}