/* =========================
   VARIABLES (COLOR PALETTE)
   ========================= */
:root {
    --primary-1: #667eea;
    --primary-2: #764ba2;

    --black: #000000;
    --gray: #727272;

    --dark-1: #2c3e50;
    --dark-2: #34495e;
    --light-1: #f8f9fa;
    --light-2: #f5f7fa;
    --light-3: #c3cfe2;
    --light-4: #e9ecef;
    --light-5: #fff3cd;
    --text-dark: #333;
    --shadow-1: rgba(0, 0, 0, 0.3);
    --shadow-2: rgba(0, 0, 0, 0.2);
    --code-bg: #282c34;
    --code-text: #abb2bf;
    --code-keyword: #c678dd;
    --code-string: #98c379;
    --code-comment: #5c6370;
    --code-function: #61afef;
    --code-type: #e5c07b;
    --highlight-1: #ffeaa7;
    --highlight-2: #fdcb6e;
    --border-1: #e9ecef;
    --border-2: #ffc107;

    /* Elite additions */
    --gold: #ffd700;
    --gold-dark: #d4af37;
    --silver: #c0c0c0;
    --royal-purple: #6a0dad;
    --deep-black: #0a0a0a;
}

/* =========================
   GLOBAL RESET & BASE STYLES
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gray) 0%, var(--black) 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 20px;
}

/* =========================
   CONTAINER & LAYOUT
   ========================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-1);
    overflow: hidden;
}

/* =========================
   HEADER SECTION
   ========================= */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

header {
    position: relative;
    background: linear-gradient(135deg,
            rgba(26, 26, 46, 0.95) 0%,
            rgba(106, 13, 173, 0.9) 50%,
            rgba(22, 33, 62, 0.95) 100%);
    color: white;
    padding: 35px;
    text-align: center;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 215, 0, 0.05) 50%,
            transparent 70%);
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30px;
    padding: 2px;

    /* WebKit support */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;

    /* Standard property (for compatibility) */
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;

    opacity: 0.4;
    pointer-events: none;
}


header h1 {
    position: relative;
    font-size: 4.5em;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg,
            var(--gold) 0%,
            #fff 25%,
            var(--gold-dark) 50%,
            #fff 75%,
            var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite, slideDown 0.8s ease-out;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

header h1::before,
header h1::after {
    position: absolute;
    font-size: 0.4em;
    top: 50%;
    transform: translateY(-50%);
    animation: glow 2s ease-in-out infinite;
}

header h1::before {
    content: '♔';
    left: -60px;
    color: var(--gold);
}

header h1::after {
    content: '♚';
    right: -60px;
    color: var(--silver);
}

header p {
    position: relative;
    font-size: 1.4em;
    opacity: 0.95;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.8s ease-out 0.2s backwards;
}

.github-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 5px;
    padding: 13px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--deep-black);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    animation: slideDown 0.8s ease-out 0.4s backwards;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.github-btn:hover::before {
    width: 300px;
    height: 300px;
}

.github-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 15px 30px rgba(255, 215, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 0 25px rgba(255, 215, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
}

.github-btn:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 15px 30px rgba(255, 215, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.github-btn img,
svg {
    position: relative;
    width: 25px;
    height: 25px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.github-btn:hover img {
    transform: rotate(360deg) scale(1.1);
}

.github-btn span {
    position: relative;
    z-index: 1;
}

/* Decorative elements */
.chess-piece {
    position: absolute;
    font-size: 80px;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.piece-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.piece-2 {
    top: 70%;
    left: 10%;
    animation-delay: 1s;
}

.piece-3 {
    top: 20%;
    right: 8%;
    animation-delay: 2s;
}

.piece-4 {
    bottom: 15%;
    right: 5%;
    animation-delay: 3s;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 50px 30px;
        border-radius: 20px;
    }

    header h1 {
        font-size: 2.5em;
    }

    header h1::before,
    header h1::after {
        font-size: 0.5em;
        left: -40px;
    }

    header h1::after {
        right: -40px;
    }

    header p {
        font-size: 1.1em;
    }

    .github-btn {
        padding: 15px 30px;
        font-size: 1em;
    }

    .github-btn img {
        width: 28px;
        height: 28px;
    }
}

/* =========================
   NAVIGATION / TABS
   ========================= */
.nav-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    box-shadow:
        0 5px 15px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow:
        0 8px 20px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--deep-black);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Navigation Tabs */
.nav-tabs {
    position: relative;
    display: flex;
    background: linear-gradient(180deg, rgba(248, 249, 250, 1) 0%, rgba(255, 255, 255, 1) 100%);
    border-bottom: 3px solid transparent;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) var(--light-1);
    padding: 10px 20px 0 20px;
}

.nav-tabs::-webkit-scrollbar {
    height: 6px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: var(--light-1);
    border-radius: 10px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 10px;
}

.nav-tabs::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 100%);
}

/* Active Tab Indicator */
.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-1) 50%, var(--gold) 100%);
    background-size: 200% 100%;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 3px 3px 0 0;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        0 -2px 10px rgba(102, 126, 234, 0.4);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* Tab Buttons */
.nav-tab {
    position: relative;
    padding: 18px 30px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    z-index: 1;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(102, 126, 234, 0) 0%,
            rgba(102, 126, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-1), transparent);
    transition: transform 0.3s ease;
}

.nav-tab:hover {
    color: var(--primary-1);
    transform: translateY(-3px);
}

.nav-tab:hover::before {
    opacity: 1;
}

.nav-tab:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Icon for each tab */
.nav-tab .icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.2em;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab:hover .icon {
    transform: scale(1.2) rotate(5deg);
}

/* Active Tab State */
.nav-tab.active {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.95) 100%);
    color: var(--primary-1);
    box-shadow:
        0 -5px 20px rgba(102, 126, 234, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    font-weight: 700;
}

.nav-tab.active::before {
    opacity: 1;
    background: linear-gradient(180deg,
            rgba(255, 215, 0, 0.1) 0%,
            rgba(102, 126, 234, 0.1) 100%);
}

.nav-tab.active .icon {
    color: var(--gold);
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

/* Glow effect for active tab */
.nav-tab.active::after {
    transform: translateX(-50%) scaleX(1);
    background: linear-gradient(90deg,
            transparent,
            var(--gold),
            var(--primary-1),
            var(--gold),
            transparent);
    height: 3px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Tab Content Area */
.tab-content {
    display: none;
    padding: 40px;
    background: white;
    border-radius: 0 0 20px 20px;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h2 {
    color: var(--dark-1);
    margin-bottom: 20px;
    font-size: 2em;
    background: linear-gradient(135deg, var(--primary-1), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tab-content p {
    color: #666;
    line-height: 1.8;
    font-size: 1.1em;
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
    .nav-tabs {
        padding: 10px 15px 0 15px;
    }

    .nav-tab {
        padding: 16px 20px;
        font-size: 0.95em;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-container {
        border-radius: 15px;
    }

    .nav-tabs {
        flex-direction: column;
        padding: 60px 0 0 0;
        max-height: 0;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        overflow: hidden;
        border-bottom: none;
    }

    .nav-tabs.mobile-open {
        max-height: 600px;
        opacity: 1;
        padding: 60px 15px 15px 15px;
    }

    .nav-tab {
        width: 100%;
        text-align: left;
        padding: 18px 25px;
        border-radius: 12px;
        margin-bottom: 8px;
        border-bottom: none;
    }

    .nav-tab.active {
        transform: translateY(0);
        margin-bottom: 8px;
    }

    .tab-indicator {
        display: none;
    }

    .tab-content {
        padding: 30px 20px;
    }

    .tab-content h2 {
        font-size: 1.6em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 10px;
    }

    .nav-tab {
        padding: 16px 20px;
        font-size: 0.9em;
    }

    .nav-tab .icon {
        font-size: 1.1em;
    }

    .tab-content {
        padding: 25px 15px;
    }

    .tab-content h2 {
        font-size: 1.4em;
    }

    .tab-content p {
        font-size: 1em;
    }
}

/* =========================
   CONTENT SECTION
   ========================= */
.content {
    padding: 40px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   PROJECT OVERVIEW:
   ========================= */
.chess-project-overview-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light-1);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-1);
    overflow: hidden;
}

.chess-project-header-section {
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    padding: 60px 40px;
    color: var(--light-1);
    text-align: center;
}

.chess-project-main-title {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px var(--shadow-2);
}

.chess-project-description-text {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

.chess-project-features-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.chess-project-feature-card-item {
    background: linear-gradient(135deg, var(--light-2) 0%, var(--light-3) 100%);
    padding: 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.chess-project-feature-card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-2);
    border-color: var(--primary-1);
}

.chess-project-feature-icon-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.chess-project-feature-description-paragraph {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95em;
}

.chess-project-section-heading-secondary {
    font-size: 2em;
    color: var(--text-dark);
    margin: 50px 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-1);
}

.chess-project-file-structure-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    box-shadow: 0 10px 40px var(--shadow-2);
    border-radius: 15px;
    overflow: hidden;
    background: var(--light-1);
}

.chess-project-table-header-row {
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    color: var(--light-1);
}

.chess-project-table-header-cell {
    padding: 10px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
}

.chess-project-table-data-row {
    background: var(--light-1);
    transition: all 0.3s ease;
    position: relative;
}

.chess-project-table-data-row:nth-child(even) {
    background: var(--light-2);
}

.chess-project-table-data-row:hover {
    background: var(--light-5);
    transform: translateX(5px);
    box-shadow: -5px 0 0 var(--primary-1);
}

.chess-project-table-data-row:hover .chess-project-filename-emphasis {
    color: var(--primary-2);
    transform: scale(1.05);
}

.chess-project-table-data-cell {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-1);
    color: var(--gray);
    vertical-align: middle;
    transition: all 0.3s ease;
}

.chess-project-table-data-row:last-child .chess-project-table-data-cell {
    border-bottom: none;
}

.chess-project-filename-emphasis {
    color: var(--primary-1);
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1.05em;
    display: inline-block;
    transition: all 0.3s ease;
    padding: 5px 12px;
    background: var(--light-4);
    border-radius: 6px;
    border-left: 3px solid var(--primary-1);
}

.chess-project-code-count-text {
    color: var(--code-string);
    font-weight: 600;
    /* font-size: 1em; */
    display: inline-block;
    padding: 0px 8px;
    background: var(--light-4);
    border-radius: 20px;
    border: 2px solid var(--code-string);
}

@media (max-width: 768px) {
    .chess-project-main-title {
        font-size: 2em;
    }

    .chess-project-header-section {
        padding: 40px 20px;
    }

    .chess-project-content-wrapper {
        padding: 30px 20px;
    }

    .chess-project-features-grid-container {
        grid-template-columns: 1fr;
    }

    .chess-project-file-structure-table {
        font-size: 0.9em;
    }

    .chess-project-table-header-cell,
    .chess-project-table-data-cell {
        padding: 12px 10px;
    }
}

/* =========================
   HEADINGS
   ========================= */
h2 {
    color: var(--dark-1);
    font-size: 2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-1);
}

h3 {
    color: var(--dark-2);
    font-size: 1.5em;
    margin: 25px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid var(--primary-1);
}

/* =========================
   MODULE CARD
   ========================= */
.module-card {
    background: linear-gradient(135deg, var(--light-2) 0%, var(--light-3) 100%);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-2);
}

/* =========================
   MODULE HEADER
   ========================= */
.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.module-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
    margin-right: 15px;
}

.module-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--dark-1);
}

/* =========================
   FUNCTION LIST
   ========================= */
.function-list {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.function-item {
    padding: 12px;
    margin: 8px 0;
    background: var(--light-1);
    border-left: 4px solid var(--primary-1);
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.function-item:hover {
    background: var(--light-4);
}

/* =========================
   CODE BLOCK
   ========================= */
.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.code-block .keyword {
    color: var(--code-keyword);
}

.code-block .string {
    color: var(--code-string);
}

.code-block .comment {
    color: var(--code-comment);
    font-style: italic;
}

.code-block .function {
    color: var(--code-function);
}

.code-block .type {
    color: var(--code-type);
}

/* =========================
   ARCHITECTURE DIAGRAM
   ========================= */
.architecture-diagram {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.flow-box {
    display: inline-block;
    padding: 15px 25px;
    margin: 10px;
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.arrow {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.5em;
    color: var(--primary-1);
}

/* =========================
   FEATURES GRID
   ========================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-box {
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-box:hover {
    transform: scale(1.05);
}

.feature-box h4 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

/* =========================
   TABLE STYLES
   ========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

th {
    background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-1);
}

tr:hover {
    background: var(--light-1);
}

/* =========================
   HIGHLIGHT & BADGE
   ========================= */
.highlight {
    background: linear-gradient(135deg, var(--highlight-1) 0%, var(--highlight-2) 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-1);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    margin-left: 10px;
}

/* =========================
   FOOTER
   ========================= */
footer {
    background: linear-gradient(135deg, var(--deep-black) 0%, var(--royal-purple) 50%, var(--primary-2) 100%);
    position: relative;
    overflow: hidden;
    padding: 30px;
    border-top: 2px solid var(--primary-1);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.12) 0%, transparent 50%);
    animation: shift 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shift {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(25%);
    }
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(212,175,55,0.04)" stroke-width="0.5"/></pattern></defs><rect width="60" height="60" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.footer-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    text-align: center;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.footer-subtitle {
    font-size: 0.9rem;
    color: var(--light-3);
    margin-bottom: 15px;
}

.footer-tech {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
    border: 1px solid var(--gold);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    border-color: var(--gold);
}

.footer-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 15px auto;
}

.footer-credit {
    font-size: 0.8rem;
    color: var(--light-3);
    letter-spacing: 0.3px;
}

.footer-credit strong {
    color: var(--gold);
    font-weight: 600;
}

@media (max-width: 768px) {
    footer {
        padding: 40px 20px;
    }

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

    .footer-subtitle {
        font-size: 0.85rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .footer-credit {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 15px;
    }

    .footer-title {
        font-size: 1rem;
    }

    .footer-subtitle {
        font-size: 0.8rem;
    }

    .footer-tech {
        gap: 8px;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

/* =========================
   COMPILE SECTION
   ========================= */
.compile-section {
    background: var(--light-5);
    border: 2px solid var(--border-2);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.compile-section h3 {
    color: #856404;
    border-left-color: var(--border-2);
}

/* =========================
   ADDITIONAL MEDIA QUERIES FOR RESPONSIVENESS
   ========================= */

/* Large desktops (1200px and up) - Base styles already cover this */

/* Desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    .chess-project-overview-container {
        max-width: 960px;
    }

    .chess-project-main-title {
        font-size: 2.8em;
    }

    .chess-project-features-grid-container {
        gap: 20px;
    }

    .chess-project-feature-card-item {
        padding: 25px;
    }

    .content {
        padding: 35px;
    }

    .module-card {
        padding: 20px;
    }

    .architecture-diagram {
        padding: 25px;
    }

    .feature-grid {
        gap: 15px;
    }

    .feature-box {
        padding: 20px;
    }

    th,
    td {
        padding: 12px;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    .chess-project-overview-container {
        max-width: 720px;
    }

    body {
        padding: 15px;
    }

    header {
        padding: 30px;
    }

    header h1 {
        font-size: 3.5em;
    }

    header p {
        font-size: 1.2em;
    }

    .github-btn {
        padding: 18px;
        font-size: 1.1em;
    }

    .github-btn img {
        width: 30px;
        height: 30px;
    }

    .chess-project-header-section {
        padding: 50px 30px;
    }

    .chess-project-main-title {
        font-size: 2.5em;
    }

    .chess-project-description-text {
        font-size: 1em;
    }

    .chess-project-features-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .chess-project-feature-card-item {
        padding: 25px;
    }

    .chess-project-section-heading-secondary {
        font-size: 1.8em;
    }

    .chess-project-table-header-cell,
    .chess-project-table-data-cell {
        padding: 15px;
    }

    .content {
        padding: 30px;
    }

    .tab-content {
        padding: 30px;
    }

    .tab-content h2 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.3em;
    }

    .module-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }

    .module-title {
        font-size: 1.2em;
    }

    .function-item {
        padding: 10px;
        font-size: 0.9em;
    }

    .code-block {
        padding: 15px;
        font-size: 0.85em;
    }

    .flow-box {
        padding: 12px 20px;
        margin: 8px;
    }

    .arrow {
        margin: 0 8px;
        font-size: 1.3em;
    }

    .feature-box {
        padding: 20px;
    }

    .feature-box h4 {
        font-size: 1.1em;
    }

    th,
    td {
        padding: 10px 12px;
    }

    .compile-section {
        padding: 15px;
    }
}

/* Mobile landscape (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }

    .chess-project-overview-container {
        max-width: 540px;
    }

    header h1 {
        font-size: 3em;
    }

    header p {
        font-size: 1.1em;
    }

    .github-btn {
        padding: 15px;
        font-size: 1em;
        gap: 10px;
    }

    .github-btn img {
        width: 28px;
        height: 28px;
    }

    .chess-project-header-section {
        padding: 40px 20px;
    }

    .chess-project-main-title {
        font-size: 2.2em;
    }

    .chess-project-description-text {
        font-size: 0.95em;
    }

    .chess-project-features-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chess-project-feature-card-item {
        padding: 20px;
    }

    .chess-project-section-heading-secondary {
        font-size: 1.6em;
        margin: 40px 0 20px;
    }

    .chess-project-file-structure-table {
        font-size: 0.9em;
    }

    .chess-project-table-header-cell,
    .chess-project-table-data-cell {
        padding: 12px 15px;
    }

    .chess-project-filename-emphasis {
        font-size: 1em;
        padding: 4px 10px;
    }

    .chess-project-code-count-text {
        font-size: 0.95em;
        padding: 4px 6px;
    }

    .content {
        padding: 25px;
    }

    .tab-content {
        padding: 25px;
    }

    .tab-content h2 {
        font-size: 1.6em;
    }

    .tab-content p {
        font-size: 1em;
    }

    h2 {
        font-size: 1.6em;
        padding-bottom: 8px;
    }

    h3 {
        font-size: 1.2em;
        padding-left: 10px;
    }

    .module-card {
        padding: 20px;
        margin: 15px 0;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .function-list {
        padding: 12px;
    }

    .function-item {
        padding: 10px;
        margin: 6px 0;
    }

    .code-block {
        padding: 15px;
        border-radius: 8px;
    }

    .architecture-diagram {
        padding: 20px;
    }

    .flow-box {
        display: block;
        margin: 10px auto;
        padding: 10px 15px;
    }

    .arrow {
        display: block;
        margin: 5px auto;
        transform: rotate(90deg);
    }

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

    .feature-box {
        padding: 20px;
    }

    table {
        font-size: 0.9em;
    }

    th,
    td {
        padding: 10px;
    }

    .compile-section {
        padding: 15px;
        margin: 15px 0;
    }

    .compile-section h3 {
        font-size: 1.2em;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 479px) {
    .container {
        max-width: 100%;
        border-radius: 15px;
    }

    .chess-project-overview-container {
        max-width: 100%;
    }

    body {
        padding: 10px;
    }

    header {
        padding: 25px 15px;
    }

    header h1 {
        font-size: 2.5em;
        letter-spacing: 1px;
    }

    header h1::before,
    header h1::after {
        font-size: 0.4em;
        left: -30px;
    }

    header h1::after {
        right: -30px;
    }

    header p {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .github-btn {
        padding: 12px 20px;
        font-size: 0.9em;
        gap: 8px;
        letter-spacing: 1px;
    }

    .github-btn img {
        width: 25px;
        height: 25px;
    }

    .chess-project-header-section {
        padding: 30px 15px;
    }

    .chess-project-main-title {
        font-size: 1.8em;
    }

    .chess-project-description-text {
        font-size: 0.9em;
    }

    .chess-project-feature-icon-title {
        font-size: 1.3em;
    }

    .chess-project-feature-description-paragraph {
        font-size: 0.9em;
    }

    .chess-project-section-heading-secondary {
        font-size: 1.4em;
        margin: 30px 0 15px;
    }

    .chess-project-table-header-cell,
    .chess-project-table-data-cell {
        padding: 10px;
        font-size: 0.85em;
    }

    .chess-project-filename-emphasis {
        font-size: 0.95em;
        padding: 3px 8px;
    }

    .chess-project-code-count-text {
        font-size: 0.9em;
        padding: 3px 5px;
    }

    .content {
        padding: 20px;
    }

    .tab-content {
        padding: 20px;
    }

    .tab-content h2 {
        font-size: 1.4em;
    }

    .tab-content p {
        font-size: 0.95em;
    }

    h2 {
        font-size: 1.4em;
    }

    h3 {
        font-size: 1.1em;
    }

    .module-card {
        padding: 15px;
    }

    .module-title {
        font-size: 1.1em;
    }

    .module-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .function-list {
        padding: 10px;
    }

    .function-item {
        padding: 8px;
        font-size: 0.85em;
    }

    .code-block {
        padding: 12px;
        font-size: 0.8em;
    }

    .architecture-diagram {
        padding: 15px;
    }

    .flow-box {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .feature-box {
        padding: 15px;
    }

    .feature-box h4 {
        font-size: 1em;
    }

    table {
        font-size: 0.85em;
    }

    th,
    td {
        padding: 8px 10px;
    }

    .highlight {
        padding: 1px 4px;
        font-size: 0.8em;
    }

    .badge {
        padding: 4px 10px;
        font-size: 0.8em;
        margin-left: 5px;
    }

    .compile-section {
        padding: 12px;
    }

    .compile-section h3 {
        font-size: 1.1em;
    }
}

/* Extra small mobile (320px and below) */
@media (max-width: 319px) {
    body {
        padding: 5px;
    }

    header {
        padding: 20px 10px;
    }

    header h1 {
        font-size: 2em;
    }

    header p {
        font-size: 0.9em;
    }

    .github-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }

    .chess-project-main-title {
        font-size: 1.6em;
    }

    .chess-project-description-text {
        font-size: 0.85em;
    }

    .chess-project-feature-card-item {
        padding: 15px;
    }

    .chess-project-table-header-cell,
    .chess-project-table-data-cell {
        padding: 8px;
        font-size: 0.8em;
    }

    .content {
        padding: 15px;
    }

    .tab-content {
        padding: 15px;
    }

    .code-block {
        padding: 10px;
        font-size: 0.75em;
    }
}