:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f6fa;
}

.progress-bar {
    background-color: #ecf0f1;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
}

.question-card {
    background: white;
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

textarea {
    width: 100%;
    padding: 10px;
    min-height: 100px;
    margin: 10px 0;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.admin-panel {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--primary-color);
    color: white;
    padding: 20px;
}

.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-container input[type="text"],
.auth-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
}

.error {
    color: var(--danger-color);
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
}

.admin-panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.admin-panel th, .admin-panel td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.admin-panel tr:hover {
    background-color: #f8f9fa;
}

.pagination {
    margin: 20px 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.edit-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.main-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.main-footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Error Pages */
.error-container {
    text-align: center;
    padding: 50px 20px;
    max-width: 800px;
    margin: 100px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-container h1 {
    color: var(--danger-color);
    font-size: 3em;
    margin-bottom: 20px;
}

.error-container p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Settings Page Styles */
.admin-content .form-group {
    margin-bottom: 20px;
}

.admin-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.admin-content input[type="text"],
.admin-content input[type="email"],
.admin-content input[type="number"],
.admin-content textarea,
.admin-content select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.admin-content textarea {
    min-height: 100px;
}

.btn-save {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-save:hover {
    background-color: #218838;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.levels-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.level-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.level-card.locked {
    background: #f4f4f4;
    color: #999;
}

.level-card h3 {
    margin: 0 0 10px;
}

.level-card button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.level-card button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.text-muted {
    color: #6c757d !important;
}

.btn-update {
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.btn-update:hover {
    background: #2980b9;
}


/* Main Content Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-content {
    display: flex;
    gap: 20px;
    width: 100%;
}

/* Instructions Column */
.instructions {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.instructions h2 {
    margin-top: 0;
    color: #3498db;
}

.instructions ol {
    padding-left: 20px;
}

.instructions ol li {
    margin-bottom: 10px;
}

 /* Level Card Styles */
 .level-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.level-card.locked {
    background: #f4f4f4;
    color: #999;
}

.level-card h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: #3498db;
}

.level-card p {
    margin: 0 0 15px;
    font-size: 1rem;
    color: #666;
}

.level-card button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.level-card button:hover {
    background: #2980b9;
}

.level-card button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Footer Styles */
footer {
    background: #3498db;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */

@media (max-width: 768px) {
    .levels-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

   
    .header-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .header-buttons a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .level-card h3 {
        font-size: 1.25rem;
    }
}

/* Carousel Styles */
.carousel {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin-bottom: 20px;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel img.active {
    opacity: 1;
}

/* Header Styles */
header {
    background: #3498db;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: whitesmoke;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-buttons a {
    background: white;
    color: #3498db;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.header-buttons a:hover {
    background: #2980b9;
    color: white;
}

/* Levels Container */
.levels-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
padding: 1rem;
flex: 3;
}

.level-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1rem;
border: 2px solid #ddd;
border-radius: 8px;
text-decoration: none;
color: #333;
background-color: #f9f9f9;
transition: all 0.3s ease;
}

.level-card:hover {
transform: translateY(-5px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.level-card.locked {
background-color: #e9e9e9;
color: #999;
cursor: not-allowed;
}

.level-card.locked:hover {
transform: none;
box-shadow: none;
}

.level-card h3 {
margin: 0;
font-size: 1.5rem;
}

.level-card p {
margin: 0.5rem 0 0;
font-size: 0.9rem;
}

.progress-summary {
text-align: center;
margin-bottom: 1.5rem;
font-size: 1.1rem;
color: #555;
}
