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

body {
    font-family: 'Arial', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #34495e;
    background: #34495e;
}

.sidebar-header h1 {
    font-size: 24px;
    margin: 0;
    color: #ecf0f1;
}

.sidebar-menu {
    padding: 30px 20px;
}

.sidebar-menu h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-btn {
    width: 100%;
    background: transparent;
    border: 2px solid #34495e;
    color: white;
    padding: 20px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mode-btn:hover {
    background: #34495e;
    border-color: #3498db;
}

.mode-btn.active {
    background: #3498db;
    border-color: #3498db;
}

.mode-number {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

.mode-btn.active .mode-number {
    color: white;
}

.mode-name {
    font-size: 16px;
    font-weight: bold;
}

.mode-desc {
    font-size: 12px;
    opacity: 0.8;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background: #f5f5f5;
}

h2 {
    text-align: center;
    color: #2E7D32;
    margin-bottom: 30px;
    font-size: 2em;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    width: 100%;
}

.cards-section {
    width: 100%;
}

.answer-section {
    width: 100%;
    text-align: center;
}

h2 {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
}

.hand-container {
    margin-bottom: 20px;
}

.all-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 40px 20px;
    margin-bottom: 40px;
    min-height: 150px;
}

.card {
    width: 110px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}


.btn-new-cards {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-new-cards:hover {
    background: #45a049;
}

.score-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.score-btn {
    padding: 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.score-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.score-btn.correct {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.score-btn.wrong {
    background: #f44336;
    color: white;
    border-color: #f44336;
}


.stats {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 20px;
    border-radius: 15px;
    font-weight: bold;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
}

.stats div {
    text-align: center;
    padding: 10px;
}

.stats span {
    display: block;
    font-size: 24px;
    color: #3498db;
    margin-top: 5px;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
        padding: 30px;
    }
    
    .all-cards {
        gap: 15px;
    }
    
    .card {
        width: 95px;
        height: 130px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .all-cards {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .card {
        width: 80px;
        height: 110px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .all-cards {
        gap: 10px;
        padding: 30px 10px;
    }
    
    .card {
        width: 70px;
        height: 95px;
    }
    
    .score-buttons {
        gap: 10px;
    }
    
    .score-btn {
        padding: 15px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .all-cards {
        gap: 8px;
        padding: 20px 5px;
    }
    
    .card {
        width: 60px;
        height: 80px;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .score-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .score-btn {
        width: 200px;
        padding: 12px;
    }
}