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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#category-select {
    background: white;
    border: 3px solid rgba(255, 255, 255, 0.5);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 600;
    color: #667eea;
    min-width: 250px;
    outline: none;
}

#category-select:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

#category-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

optgroup {
    font-weight: bold;
    color: #764ba2;
}

option {
    padding: 10px;
}

.shuffle-btn {
    display: block;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 600;
}

.shuffle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.card-container {
    perspective: 1000px;
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.card-back {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: rotateY(180deg);
}

.card-content {
    text-align: center;
}

.card-front .card-content {
    color: #333;
}

.card-back .card-content {
    color: white;
}

.word {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.label {
    font-size: 0.9em;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

button {
    background: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 600;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

button:active {
    transform: translateY(0);
}

.counter {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hint {
    text-align: center;
    color: white;
    margin-top: 15px;
    opacity: 0.8;
    font-size: 0.9em;
}
