body {
    font-family: 'Roboto', sans-serif;
    background-color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background-color 0.3s;
}

body.dark-mode {
    background-color: #333;
    color: #fff;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
}

.container.dark-mode {
    background-color: #444;
    color: #fff;
}

.status {
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 10px;
}

#cardCounter {
    flex: 1;
    text-align: left;
}

.icon-buttons {
    display: flex;
    gap: 10px;
}

.icon-buttons button {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 1.5em;
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    background-color: #ccc;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress {
    height: 20px;
    width: 0;
    background-color: #4CAF50;
    transition: width 0.3s;
}

.flashcard {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    color: #333;
    font-size: 2em;
    border-radius: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.6s;
}

.flashcard.fade {
    opacity: 0;
}

body.dark-mode .flashcard {
    background-color: #555;
    color: #fff;
    border: 1px solid #888;
}

.flashcard:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.controls {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.controls button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    font-size: 1em;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    flex: 1;
    min-width: 0;
}

.controls button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.controls button:active {
    transform: scale(0.95);
}

/* Specific button colors */
#restartBtn {
    background-color: #f44336; /* Red */
}

#restartBtn:hover {
    background-color: #e53935;
}

#toggleDirectionBtn {
    background-color: #2196F3; /* Blue */
}

#toggleDirectionBtn:hover {
    background-color: #1976D2;
}

#loadCards1Btn {
    background-color: #FF5733; /* Orange */
}

#loadCards1Btn:hover {
    background-color: #E74C3C; /* Darker Orange */
}

#loadCards2Btn {
    background-color: #FFC300; /* Yellow */
}

#loadCards2Btn:hover {
    background-color: #FFB000; /* Darker Yellow */
}

#loadCards3Btn {
    background-color: #8E44AD; /* Purple */
}

#loadCards3Btn:hover {
    background-color: #7D3C98; /* Darker Purple */
}

.active-card-pack {
    border: 2px solid #FFD700; /* Gold border for the active card pack */
    box-shadow: 0 0 10px #FFD700;
}

#feedbackArea {
    margin-top: 20px;
    font-size: 1em;
    color: #333;
}

body.dark-mode #feedbackArea {
    color: #fff;
}

/* Success GIF styling */
#successGif {
    position: absolute;
    top: 140px;
    right: 20px;
    width: 150px;
    display: none;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
    }
}