:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-bg: #2c3e50;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

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

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
}

.hero-section .btn-light {
    font-weight: 600;
    padding: 12px 35px;
    border-radius: 30px;
    transition: all var(--transition-speed) ease;
}

.hero-section .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    background: #fff;
    height: 100%;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
}

.riddle-card .card-header,
.puzzle-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.difficulty-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-easy {
    background: #27ae60;
    color: white;
}

.difficulty-medium {
    background: #f39c12;
    color: white;
}

.difficulty-hard {
    background: #e74c3c;
    color: white;
}

.card-body {
    padding: 20px;
}

.riddle-text,
.puzzle-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
}

.answer-toggle {
    width: 100%;
    padding: 10px 20px;
    background: var(--light-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    transition: all var(--transition-speed) ease;
    margin-top: 10px;
}

.answer-toggle:hover {
    background: var(--accent-color);
    color: white;
}

.answer-content {
    display: none;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid var(--accent-color);
}

.answer-content.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#about {
    background: var(--light-bg);
    border-radius: 12px;
    margin-top: 40px;
}

footer {
    margin-top: 60px;
}

footer img {
    opacity: 0.8;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--primary-color);
        padding: 15px;
        border-radius: 0 0 10px 10px;
        margin-top: 10px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 60px 0 40px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .difficulty-badge {
        font-size: 0.65rem;
    }
}