:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #fff;
    --easy-color: #00b8a3;
    --medium-color: #ffc01e;
    --hard-color: #ef4743;
    --primary-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

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

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

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

input[type="text"] {
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 25px;
    width: 60%;
    outline: none;
}

button {
    padding: 12px 25px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: #1a252f;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0 0 0;
}

.diff-easy {border-bottom: 5px solid var(--easy-color);}
.diff-medium {border-bottom: 5px solid var(--medium-color);}
.diff-hard {border-bottom: 5px solid var(--hard-color);}

.hidden {
    display: none !important;
}

.message-box {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

.loading {
    background-color: #e2e8f0;
    color: #475569;
}

.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #f87171;
}

.charts {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.chart-container {
    width: 300px;
    height: 300px;
}