* {
    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;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

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

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

select, button, .link-btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

select {
    background: white;
    color: #333;
}

button {
    background: #4CAF50;
    color: white;
    font-weight: bold;
}

.link-btn {
    background: #FF9800;
    color: white;
    font-weight: bold;
}

.link-btn.detail {
    background: #9C27B0;
}

button:hover, .link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

.stats {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.card-container {
    perspective: 1000px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.card {
    flex: 1;
    height: 500px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

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

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

.card-front {
    background: white;
}

.card-front img {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
}

.hint {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(180deg);
}

.card-back h2 {
    font-size: 2rem;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.nav-arrow:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.nav-arrow svg {
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
    border-radius: 5px;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .card-container {
        gap: 10px;
    }
    
    .card {
        height: 400px;
    }
    
    .card-back h2 {
        font-size: 1.5rem;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
    }
    
    .nav-arrow svg {
        width: 30px;
        height: 30px;
    }
}
