/* ===== CAT TRAP GAME - PÕHISTIILID ===== */

/* Üldised stiilid */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Konteinerid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Nupud */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Kaardid */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Mängu elemendid */
.game-area {
    position: relative;
    background: #2c3e50;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #34495e;
}

/* Statistika kaardid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Edetabel */
.leaderboard {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9ff;
    border-radius: 10px;
    transition: background 0.3s;
}

.leaderboard-item:hover {
    background: #eef1ff;
}

.leaderboard-rank {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    min-width: 50px;
    text-align: center;
}

.leaderboard-name {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.leaderboard-score {
    font-size: 22px;
    font-weight: 700;
    color: #764ba2;
    min-width: 80px;
    text-align: right;
}

/* Responsive disain */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .leaderboard-rank,
    .leaderboard-name,
    .leaderboard-score {
        min-width: auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animatsioonid */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utility klassid */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.p-4 { padding: 40px; }

.hidden { display: none; }
.visible { display: block; }

/* Scrollbar stiilid */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Print stiilid */
@media print {
    .no-print {
        display: none !important;
    }
    
    .game-area,
    .touch-controls {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        color: #fff;
    }
    
    .stat-value {
        color: #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}