/* ============================================
   Faraon Learning Platform - Main Styles
   ============================================ */

:root {
    --primary-black: #000000;
    --secondary-black: #1a1a1a;
    --dark-black: #0d0d0d;
    --primary-gold: #FFD700;
    --secondary-gold: #FFA500;
    --accent-gold: #FFC107;
    --light-gold: #FFE55C;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --border-gold: rgba(255, 215, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-black);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */

.header {
    background: linear-gradient(180deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    border-bottom: 2px solid var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8rem;
    color: var(--primary-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-gold);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-gold);
}

.nav-menu a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-gold);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 50%, var(--primary-black) 100%);
    overflow: hidden;
    padding: 100px 0 60px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 1;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--primary-gold) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--primary-gold) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-white);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-subtitle strong {
    color: var(--primary-gold);
    font-size: 1.4rem;
    font-weight: 700;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px;
    border: 1px solid var(--border-gold);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-item p {
    color: var(--text-white);
    margin: 0;
    text-align: left;
}

.feature-item strong {
    color: var(--primary-gold);
    display: block;
    margin-bottom: 0.3rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--primary-black);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-secondary:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-gold);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text-white);
    opacity: 0.8;
}

/* ============================================
   User Info
   ============================================ */

.user-info {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    animation: fadeInDown 0.5s ease;
}

.user-welcome {
    color: var(--text-white);
}

.user-welcome p {
    margin: 0.5rem 0;
}

.user-welcome strong {
    color: var(--primary-gold);
}

.user-score {
    font-size: 1.5rem;
    color: var(--primary-gold);
    font-weight: 700;
}

/* ============================================
   Mini Game Section
   ============================================ */

.minigame-section {
    padding: 80px 0;
    background: var(--secondary-black);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 3rem;
    font-weight: 700;
}

.minigame-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid var(--border-gold);
    border-radius: 15px;
    padding: 2rem;
}

.minigame-header {
    text-align: center;
    margin-bottom: 2rem;
}

.minigame-header h3 {
    color: var(--primary-gold);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.minigame-header p {
    color: var(--text-gray);
}

.minigame-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 2rem 0;
}

.minigame-card {
    aspect-ratio: 1;
    background: var(--primary-black);
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-gold);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.minigame-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-gold);
}

.minigame-card.flipped {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.minigame-card.matched {
    background: var(--primary-gold);
    opacity: 0.7;
    cursor: default;
}

.minigame-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.minigame-score {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
}

.minigame-score span {
    color: var(--primary-gold);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================
   Games Section
   ============================================ */

.games-section {
    padding: 80px 0;
    background: var(--primary-black);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: var(--secondary-black);
    border: 2px solid var(--border-gold);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: var(--primary-gold);
}

.game-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-card.locked::after {
    content: 'LOCKED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-gold);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-card.locked .game-image {
    filter: grayscale(100%);
}

.game-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.game-title {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.game-description {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.game-requirement {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.game-requirement strong {
    color: var(--primary-gold);
}

.game-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--primary-black);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: 80px 0;
    background: var(--secondary-black);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
}

.contact-item h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 1.1rem;
}

.contact-item a:hover {
    color: var(--primary-gold);
}

.map-container {
    margin-top: 3rem;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--border-gold);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, var(--secondary-black) 0%, var(--primary-black) 100%);
    margin: 5% auto;
    padding: 2rem;
    border: 2px solid var(--primary-gold);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    color: var(--primary-gold);
    cursor: pointer;
    transition: transform 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.register-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Notifications
   ============================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: var(--secondary-black);
    border: 2px solid var(--primary-gold);
    border-radius: 8px;
    color: var(--primary-gold);
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-color: #4CAF50;
    color: #4CAF50;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--dark-black);
    border-top: 2px solid var(--border-gold);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gold);
    color: var(--text-gray);
    font-size: 0.9rem;
}

.fs-note {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-gold);
}

.fs-note p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

.fs-note strong {
    color: var(--primary-gold);
}

/* ============================================
   Cookie Banner
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary-black);
    border-top: 2px solid var(--primary-gold);
    padding: 1.5rem;
    z-index: 1500;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    color: var(--text-white);
}

.cookie-text a {
    color: var(--primary-gold);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cookie-btn-accept {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

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

/* ============================================
   General Sections
   ============================================ */

.content-section {
    padding: 80px 0;
    background: var(--primary-black);
}

.content-section:nth-child(even) {
    background: var(--secondary-black);
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-white);
    line-height: 1.8;
}

.section-content h2 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.section-content p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--secondary-black);
        flex-direction: column;
        padding: 1.5rem 2rem;
        transition: left 0.3s ease;
        border-top: 2px solid var(--border-gold);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-menu a {
        display: block;
        padding: 0.9rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.4rem;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .nav-menu a.active {
        background: rgba(255, 215, 0, 0.15);
        color: var(--primary-gold);
        border-left: 4px solid var(--primary-gold);
        font-weight: 600;
    }

    .nav-menu a.active::after {
        display: none;
    }

    .nav-menu a:hover {
        background: rgba(255, 215, 0, 0.1);
        padding-left: 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .minigame-board {
        grid-template-columns: repeat(3, 1fr);
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
    }

    .map-container iframe {
        height: 300px;
    }

    .table-container {
        overflow-x: visible;
    }

    /* Convert tables to cards on mobile */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tbody tr {
        background: var(--secondary-black);
        border: 2px solid var(--border-gold);
        border-radius: 15px;
        margin-bottom: 1.5rem;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    tbody tr:hover {
        background: rgba(255, 215, 0, 0.1);
        border-color: var(--primary-gold);
    }

    td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        padding-right: 0 !important;
        text-align: left;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--primary-gold);
        font-size: 0.9rem;
    }

    table {
        font-size: 0.9rem;
        border: none;
        background: transparent;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 0 10px;
    }

    .facts-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
        margin: 1rem 0 !important;
        padding: 0 !important;
    }

    .games-grid {
        gap: 0.8rem !important;
        margin: 1rem 0 !important;
        padding: 0 !important;
        grid-template-columns: 1fr !important;
    }

    .article-grid {
        gap: 0.8rem !important;
        margin: 1rem 0 !important;
        padding: 0 !important;
        grid-template-columns: 1fr !important;
    }

    /* Reduce card sizes on mobile */
    .fact-card {
        padding: 0 !important;
        margin: 0 0 1rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .fact-image {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }

    .fact-content {
        padding: 0.6rem !important;
    }

    .fact-content h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
        line-height: 1.2 !important;
    }

    .fact-content p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    .game-card {
        padding: 0.6rem !important;
        margin: 0 0 1rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .game-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
        margin-bottom: 0.5rem !important;
    }

    .game-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
        line-height: 1.2 !important;
    }

    .game-description {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .game-requirement {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .game-card .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.75rem !important;
    }

    .article-card {
        padding: 0.6rem !important;
        margin: 0 0 1rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .article-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
        line-height: 1.2 !important;
    }

    .article-card p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    .article-card .article-meta {
        font-size: 0.7rem !important;
        margin-top: 0.4rem !important;
    }

    /* Convert tables to cards on mobile */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: var(--secondary-black);
        border: 2px solid var(--border-gold);
        border-radius: 15px;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        text-align: left;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--primary-gold);
    }

    .table-container {
        overflow-x: visible;
    }
}

/* ============================================
   Facts Cards
   ============================================ */

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.fact-card {
    background: var(--secondary-black);
    border: 2px solid var(--border-gold);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: var(--primary-gold);
}

.fact-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.fact-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fact-content h3 {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.fact-content p {
    color: var(--text-white);
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .minigame-board {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Further reduce card sizes on very small screens */
    .facts-grid,
    .games-grid,
    .article-grid {
        gap: 0.6rem !important;
        margin: 0.8rem 0 !important;
    }

    .fact-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }

    .fact-content {
        padding: 0.5rem !important;
    }

    .fact-content h3 {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
    }

    .fact-content p {
        font-size: 0.7rem !important;
    }

    .game-image {
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }

    .game-card {
        padding: 0.5rem !important;
    }

    .game-title {
        font-size: 0.85rem !important;
    }

    .game-description,
    .game-requirement {
        font-size: 0.65rem !important;
    }

    .game-card .btn {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.7rem !important;
    }

    .article-card {
        padding: 0.5rem !important;
    }

    .article-card h3 {
        font-size: 0.85rem !important;
    }

    .article-card p {
        font-size: 0.7rem !important;
    }

    .game-card {
        padding: 0.6rem;
    }

    .game-image {
        height: 100px;
    }

    .game-title {
        font-size: 0.9rem;
    }

    .game-description,
    .game-requirement {
        font-size: 0.7rem;
    }

    .game-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .game-title {
        font-size: 1.1rem;
    }

    .game-description {
        font-size: 0.8rem;
    }

    .article-card {
        padding: 1rem;
    }

    .article-card h3 {
        font-size: 1.1rem;
    }

    .article-card p {
        font-size: 0.85rem;
    }
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--secondary-black);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
}

table thead {
    background: rgba(255, 215, 0, 0.1);
}

table th {
    padding: 1rem;
    text-align: left;
    color: var(--primary-gold);
    font-weight: 600;
    border-bottom: 2px solid var(--border-gold);
}

table td {
    padding: 1rem;
    color: var(--text-white);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

table tbody tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

table tbody tr:last-child td {
    border-bottom: none;
}

.rank-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary-gold);
    color: var(--primary-black);
}

.rank-badge.pharaoh {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.rank-badge.high-priest {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    color: var(--text-white);
}

.rank-badge.noble {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: var(--text-white);
}

/* ============================================
   Accordion
   ============================================ */

.accordion {
    margin: 2rem 0;
}

.accordion-item {
    background: var(--secondary-black);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 215, 0, 0.1);
}

.accordion-header h3 {
    color: var(--primary-gold);
    margin: 0;
    font-size: 1.2rem;
}

.accordion-icon {
    color: var(--primary-gold);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-white);
    line-height: 1.8;
}

.accordion-body p {
    margin-bottom: 1rem;
}

.accordion-body ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

/* ============================================
   Article Cards
   ============================================ */

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.article-card {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
    border-color: var(--primary-gold);
}

.article-meta {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-card h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-card p {
    color: var(--text-white);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: var(--light-gold);
    text-decoration: underline;
}

/* ============================================
   Stats Cards
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.stat-card-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stat-card-label {
    color: var(--text-gray);
    font-size: 1rem;
}

