/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --success-color: #10b981;
    --error-color: #ef4444;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Dynamic Mathematical Background */
.math-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.math-element {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    opacity: 0.2;
    font-weight: bold;
    animation: float 20s infinite ease-in-out;
    white-space: nowrap;
}

.equation-1 {
    top: 10%;
    left: 5%;
    font-size: 1.5rem;
    animation-delay: 0s;
}

.equation-2 {
    top: 20%;
    right: 10%;
    font-size: 1.2rem;
    animation-delay: 2s;
}

.equation-3 {
    top: 60%;
    left: 8%;
    font-size: 1.3rem;
    animation-delay: 4s;
}

.equation-4 {
    top: 70%;
    right: 15%;
    font-size: 1.4rem;
    animation-delay: 6s;
}

.equation-5 {
    top: 40%;
    left: 50%;
    font-size: 1.6rem;
    animation-delay: 8s;
}

.math-graph {
    position: absolute;
    opacity: 0.5;
    animation: float 25s infinite ease-in-out;
}

.graph-1 {
    top: 15%;
    left: 20%;
    width: 150px;
    height: 150px;
    animation-delay: 1s;
}

.graph-2 {
    top: 50%;
    right: 25%;
    width: 120px;
    height: 120px;
    animation-delay: 3s;
}

.graph-3 {
    top: 30%;
    right: 5%;
    width: 100px;
    height: 100px;
    animation-delay: 5s;
}

.graph-4 {
    bottom: 20%;
    left: 30%;
    width: 130px;
    height: 130px;
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-2deg);
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hidden {
    display: none;
}

/* Header */
header {
    background: var(--gradient-1);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    background-color: var(--dark-color);
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: var(--transition);
    position: relative;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
    transition: var(--transition);
}

nav ul li a:hover::before {
    width: 80%;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: var(--gradient-2);
    padding: 5rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: white;
    color: var(--accent-color);
    border: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

/* Quiz Section */
.quiz-container {
    background-color: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.game-info div {
    background: var(--gradient-1);
    color: white;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: bold;
    flex: 1;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 0.9rem;
}

.game-info div:hover {
    transform: translateY(-3px);
}

/* Timer Progress Bar */
.timer-container {
    margin: 0 0 1.5rem 0;
}
.timer-container.warning .timer-progress-bar {
background-color: rgba(239, 68, 68, 0.1);
}
.timer-container.warning .timer-progress {
background-color: var(--error-color);
}
.timer-progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.timer-progress {
    height: 100%;
    width: 100%;
    background: var(--gradient-2);
    border-radius: 5px;
    transition: width 1s linear;
}

.question-container {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

#question {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: bold;
    position: relative;
    display: inline-block;
}

#question::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: var(--gradient-2);
    transform: translateX(-50%);
    border-radius: 2px;
}

.feedback {
    font-size: 1.2rem;
    padding: 12px;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: bold;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback.correct {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.feedback.incorrect {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.answer-button {
    padding: 15px;
    font-size: 1.5rem;
    border: none;
    border-radius: 12px;
    background-color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    color: var(--dark-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.answer-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.answer-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: white;
}

.answer-button:hover::before {
    opacity: 1;
}

.answer-button.correct {
    background-color: var(--success-color);
    color: white;
}

.answer-button.incorrect {
    background-color: var(--error-color);
    color: white;
}

.game-controls {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.btn-secondary {
    background-color: var(--error-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background-color: #d63031;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.badges-container {
    margin-top: 1.5rem;
    text-align: center;
}

.badges-container h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
}

.badges-container h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-2);
    border-radius: 2px;
}

#badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 0.8rem;
}

.cat-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--light-color);
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
}

.cat-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.cat-badge:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-color);
}

.cat-badge:hover::after {
    opacity: 0.2;
}

.cat-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 80px;
    height: 3px;
    background: var(--gradient-1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.feature-grid, .level-grid, .badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card, .level-card, .badge-card {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before, .level-card::before, .badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
}

.feature-card:hover, .level-card:hover, .badge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-card h3, .level-card h3, .badge-card h3 {
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    font-size: 1.6rem;
    position: relative;
}

.example {
    background-color: var(--light-color);
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    margin-top: 1.2rem;
    text-align: center;
    font-size: 1.2rem;
    color: var(--dark-color);
    border: 1px dashed var(--primary-color);
}

.badge-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    display: block;
    border: 3px solid var(--light-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.badge-card:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-color);
}

/* Footer */

footer {
    background: var(--gradient-1);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

footer p {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-1);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
    transform: translateX(-50%) translateY(-20px);
    font-weight: bold;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Design */
/* Responsive Design */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .quiz-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    #question {
        font-size: 2.2rem;
    }
    
    .answer-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .answer-button {
        font-size: 1.4rem;
        padding: 12px;
    }
    
    .feature-grid, .level-grid, .badge-grid {
        grid-template-columns: 1fr;
    }
    
    .game-info div {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    .timer-container {
        margin-bottom: 1.2rem;
    }
    
    .cat-badge {
        width: 45px;
        height: 45px;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .content-section h2 {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        padding: 0.8rem 0;
    }
    
    nav ul li {
        margin: 0.3rem 0;
    }
    
    .game-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .game-info div {
        width: 100%;
        text-align: center;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .content-section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    #question {
        font-size: 1.8rem;
    }
    
    .answer-button {
        font-size: 1.2rem;
        padding: 12px;
    }
    
    .cat-badge {
        width: 40px;
        height: 40px;
    }
    
    .feature-card, .level-card, .badge-card {
        padding: 1.5rem;
    }
    
    .feature-card h3, .level-card h3, .badge-card h3 {
        font-size: 1.4rem;
    }
    
    .example {
        font-size: 1.1rem;
        padding: 10px;
    }
    
    .badge-card img {
        width: 80px;
        height: 80px;
    }
    
    .btn-primary {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    .btn-secondary {
        padding: 8px 18px;
        font-size: 0.95rem;
    }
    
    footer {
        padding: 2rem 0;
    }
}

@media screen and (max-width: 320px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .quiz-container {
        padding: 1rem;
    }
    
    #question {
        font-size: 1.6rem;
    }
    
    .answer-button {
        font-size: 1.1rem;
        padding: 10px;
    }
    
    .cat-badge {
        width: 35px;
        height: 35px;
    }
    
    .game-info div {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .timer-progress-bar {
        height: 8px;
    }
}
.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
/* Blog Page Styles */
.blog-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.blog-post {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-style: italic;
}

.blog-excerpt {
    margin: 1rem 0;
    flex-grow: 1;
}

.blog-excerpt p {
    color: #475569;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: auto;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    align-self: flex-start;
}

.read-more:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.blog-cta {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 20px;
}

.blog-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.blog-cta p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

nav ul li a.active {
    color: var(--accent-color);
}

nav ul li a.active::before {
    width: 80%;
}

/* Responsive adjustments for blog */
@media screen and (max-width: 768px) {
    .blog-intro {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .blog-meta {
        font-size: 0.85rem;
    }
    
    .blog-excerpt p {
        font-size: 0.95rem;
    }
    
    .blog-cta {
        padding: 1.5rem;
        margin-top: 3rem;
    }
    
    .blog-cta h3 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .blog-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .blog-meta {
        font-size: 0.8rem;
    }
    
    .blog-excerpt p {
        font-size: 0.9rem;
    }
    
    .blog-cta {
        padding: 1.2rem;
        margin-top: 2rem;
    }
    
    .blog-cta h3 {
        font-size: 1.3rem;
    }
    
    .blog-cta p {
        font-size: 1rem;
    }
}


