/* =========================
   FOOTER POSITIONING FIX
========================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    background: #000000; /* Changed from gradient to solid black */
    color: #e0e0e0; /* Changed text color for better contrast on black */
    min-height: 100vh;
}

/* =========================
   MAIN CONTENT WRAPPER
========================= */
.content-wrapper {
    flex: 1 0 auto; /* This grows to take available space */
    display: flex;
    flex-direction: column;
}

/* =========================
   CATEGORY BUTTONS 
========================= */
#category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 20px;
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.cat-btn {
    background: #ffffff;
    color: #ffffff; /* Brighter white text */
    border: 1px solid #ffffff; /* White border */
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    min-width: 140px;
    text-align: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    background: #1a1a1a; /* Dark background for contrast */
}

.cat-btn:hover {
    background: #333333; /* Slightly lighter on hover */
    color: #ffffff; /* Keep white text */
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    #category-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .cat-btn {
        font-size: 14px;
        height: 45px;
        padding: 10px 6px;
    }
}

/* =========================
   DONATION BUTTON
========================= */
.donation-container {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}

.donate-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #ffffff;
    border: 2px solid #FBBF24;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Floating particles effect */
.donate-btn::after {
    content: '✦✦✦';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    letter-spacing: 8px;
    animation: floatParticles 3s infinite linear;
}

@keyframes floatParticles {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(40px) rotate(360deg); }
}

.donate-btn:hover {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.5);
    border-color: #FCD34D;
}

/* Heart beat animation for SVG */
.donate-btn svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    5% { transform: scale(1.1); }
    10% { transform: scale(1); }
    15% { transform: scale(1.1); }
    20% { transform: scale(1); }
    100% { transform: scale(1); }
}

.donate-btn:hover svg {
    animation: none;
    transform: scale(1.2) rotate(360deg);
    transition: transform 0.6s ease;
}

/* Inner glow */
.donate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.donate-btn:hover::before {
    width: 300px;
    height: 300px;
}


/* =========================
   FLASHCARD
========================= */
.flashcard {
    max-width: 780px;
    margin: 25px auto;
    background-color: #ffffff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
}

.question {
    font-size: 23px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    color: #ffffff; /* Brighter white */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Subtle shadow for readability */
}

/* =========================
   ANSWERS
========================= */
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.answers button {
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #ffffff; /* White border */
    background: #1a1a1a; /* Dark background */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #ffffff; /* Brighter white text */
}

.answers button:hover:not(:disabled) {
    background: #333333; /* Slightly lighter on hover */
    color: #ffffff; /* Keep white text */
}

.answers button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================
   RESULT & DEFINITION
========================= */
.result {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 15px 0;
    color: #ffffff; /* Brighter white for "Well Done!" and "Try Again" */
}

.definition {
    background: #000000; /* Dark black background */
    color: #ffffff; /* White text on black background */
    border-left: 4px solid #ffffff; /* White accent border */
    padding: 14px;
    border-radius: 6px;
    font-size: 15px;
    margin-top: 10px;
}

/* =========================
   NAVIGATION
========================= */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
}

.nav-btn,
.restart-btn {
    background: #ffffff; /* White background */
    color: #000000; /* Black text */
    border: 2px solid #ffffff; /* White border */
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600; /* Make text bold */
    transition: all 0.25s ease;
}

.nav-btn:hover,
.restart-btn:hover {
    background: #000000; /* Black on hover */
    color: #ffffff; /* White text on hover */
    border-color: #ffffff; /* Keep white border */
}

/* =========================
   PROGRESS BAR
========================= */
.progress-container {
    width: 100%;
    height: 8px;
    background: #e5e7ea;
    border-radius: 5px;
    margin: 18px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #1f3a5f;
    width: 0%;
    transition: width 0.3s ease;
}

.score {
    text-align: center;
    font-weight: 700;
    margin-top: 8px;
    color: #ffffff; /* Brighter white */
}

/* =========================
   FOOTER
========================= */
footer {
    background: #111827;
    color: #e5e7eb;
    padding: 26px 16px;
    margin-top: auto; /* This pushes footer to bottom */
    width: 100%;
    flex-shrink: 0; /* Prevents footer from shrinking */
}

.footer-inner {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.footer-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* =========================
   SOCIAL BUTTONS
========================= */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.svg-button {
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.svg-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.facebook { background: #1877f2; }
.x        { background: #000000; }
.whatsapp { background: #25d366; }
.linkedin { background: #0a66c2; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .answers {
        grid-template-columns: 1fr;
    }

    .flashcard {
        margin: 14px;
        padding: 24px;
    }

    .question {
        font-size: 20px;
    }
    
    #category-container {
        padding: 15px;
        gap: 10px;
    }
    
    .cat-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}
/* Add this to your existing CSS file */
.main-content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
.flashcard {
    max-width: 780px;
    margin: 25px auto;
    background-color: #1a1a1a; /* Darker background for cards */
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5); /* Stronger shadow */
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #ffffff; /* White text on cards */
}
/* For correct answer */
.result[style*="color: green"] {
    color: #4CAF50 !important; /* Brighter green */
}
/* For wrong answer */
.result[style*="color: red"] {
    color: #f44336 !important; /* Brighter red */
}
/* =========================
   BACK TO HOME BUTTON STYLES
========================= */

/* Container for the button */
p {
    text-align: center;
    margin: 20px 0;
}

/* Back to Home button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff; /* White background */
    color: #000000; /* Black text */
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #ffffff;
    transition: all 0.25s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: #000000; /* Black on hover */
    color: #ffffff; /* White text on hover */
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* SVG icon styling */
.btn svg {
    transition: fill 0.25s ease;
    fill: #000000; /* Black icon */
}

.btn:hover svg {
    fill: #ffffff; /* White icon on hover */
}

/* Responsive design */
@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn svg {
        height: 18px;
        width: 18px;
    }
}