/* Pacman Redesign CSS */

body.pacman-redesign {
    background-color: #000;
    color: #e0e0e0;
    font-family: 'Source Sans Pro', sans-serif;
    overflow-x: hidden;
    /* Subtle grid pattern background */
    background-image: 
        linear-gradient(rgba(255, 255, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Header & Nav */
#nav {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 0, 0.2);
    padding: 1.5em 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

#nav ul {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav ul li a {
    color: #ccc;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s;
    font-size: 1em;
    border: none;
}

#nav ul li a:hover {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

/* Dropdown Menu Style */
#nav > ul > li > ul {
    background: #111;
    border: 1px solid rgba(255, 255, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 8px;
    padding: 1em 0;
}

#nav > ul > li > ul > li > a {
    color: #bbb;
    padding: 0.5em 1.5em;
    display: block;
    font-size: 0.9em;
    text-transform: none;
}

#nav > ul > li > ul > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 0, 0.1);
}

.projects-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* TOC Section */
.toc-section {
    position: fixed;
    left: 2em;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    text-align: left;
    padding: 1.5em;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 0, 0.3);
    border-radius: 8px;
    z-index: 100;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.toc-title {
    color: #ffff00;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5em;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 0, 0.2);
    padding-bottom: 0.5em;
}

.toc-links {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    list-style: none;
    padding: 0;
}

.toc-links li a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    display: block;
    border: none;
}

.toc-links li a:hover, .toc-links li a.active {
    color: #ffff00;
    text-shadow: 0 0 8px #ffff00;
    transform: translateX(5px);
}

.toc-links li a.active {
    border-left: 2px solid #ffff00;
    padding-left: 10px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3em 1em; /* Reduced for better proportion */
    background: radial-gradient(circle at center, rgba(255, 255, 0, 0.1) 0%, rgba(0,0,0,0) 70%);
}

.hero-title {
    font-size: 3em;
    font-weight: 800;
    color: #ffff00;
    text-transform: uppercase;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ff0000;
    margin-bottom: 0.3em;
    letter-spacing: 5px;
    font-family: 'Courier New', monospace;
}

.hero-subtitle {
    font-size: 1.1em;
    color: #aaa;
    max-width: 800px;
    margin: 0 auto 2em;
    line-height: 1.6;
}

/* Game Container */
.game-container {
    display: flex;
    justify-content: center;
    margin: 0 auto 4em auto; /* Centered */
    padding: 0 1em;
    max-width: 1000px;
}

.game-frame {
    border: 4px double #0033ff;
    box-shadow: 0 0 20px rgba(0, 51, 255, 0.6);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    width: 100%;
}

.game-frame iframe {
    width: 100%;
    display: block;
}

/* Animation Grid */
.animation-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for max width */
    gap: 30px;
    margin-top: 2em;
    width: 100%;
}

.animation-grid .image-container {
    border: 2px solid #ffff00;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.2);
}

.animation-grid img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.animation-grid img:hover {
    transform: scale(1.01);
}

/* Content Sections */
.content-section {
    max-width: 1000px;
    margin: 0 auto 4em auto; /* Centered globally */
    padding: 2em;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
}

/* Responsive adjustments */
@media screen and (max-width: 1400px) {
    .toc-section {
        left: 1em;
        width: 150px;
    }
}

@media screen and (max-width: 1280px) {
    .toc-section {
        position: static;
        width: auto;
        max-width: 800px;
        margin: 0 auto 3em;
        transform: none;
        text-align: center;
    }
    
    .toc-links {
        flex-direction: row;
        justify-content: center;
        gap: 2em;
    }
}


.content-section h2 {
    color: #ffff00;
    font-size: 2em;
    border-left: 5px solid #ffff00;
    padding-left: 0.5em;
    margin-bottom: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.content-section p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 1.5em;
}

/* Code Blocks */
pre[class*="language-"] {
    border: 1px solid #333;
    background: #111 !important;
    margin: 1.5em 0 !important;
}

code[class*="language-"] {
    text-shadow: none !important;
    color: #ccc;
}

/* Footer */
#footer {
    background: #111;
    padding: 1.5em 0; /* Reduced from 3em */
    text-align: center;
    border-top: 2px solid #0033ff;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    list-style: none;
    padding: 0;
    margin-bottom: 1em; /* Reduced from 2em */
}

.social-icons li a {
    color: #fff;
    font-size: 1.5em;
    transition: transform 0.2s, color 0.2s;
}

.social-icons li a:hover {
    color: #ffff00;
    transform: scale(1.1);
}

.copyright {
    color: #666;
    font-size: 0.9em;
}

.copyright a {
    color: #ffff00;
    text-decoration: none;
}
