:root {
    --bg-dark: #212121;
    --bg-sidebar: #171717;
    --bg-card: #2f2f2f;
    --text-main: #ececec;
    --text-muted: #b4b4b4;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-primary: #10a37f;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    background: transparent;
    padding: 0.5rem;
    border-radius: 8px;
    color: white;
}

.brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-links {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item.active {
    background: var(--bg-card);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.social-links a:hover {
    color: white;
}

.dev-credit {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
    width: 100%;
}

/* Game Main Area */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    width: 100%;
}

.canvas-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(16, 163, 127, 0.4), 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.canvas-wrapper:hover {
    box-shadow: 0 0 45px rgba(16, 163, 127, 0.6), 0 20px 50px rgba(0, 0, 0, 0.5);
}

#canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.6; transform: scale(0.98); }
}

.game-info {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
    animation: pulse 2s infinite ease-in-out;
}

.game-info strong {
    color: var(--text-main);
}

.mobile-footer {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-bottom: 3rem;
    width: 100%;
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        display: none;
    }
    .game-main {
        padding: 1rem 0.5rem;
        justify-content: flex-start;
    }
    .canvas-wrapper {
        width: 100%;
        max-width: 100%;
        border-width: 2px;
        border-radius: 8px;
    }
    #canvas {
        width: 100% !important;
        height: auto !important;
        max-height: 75vh;
    }
    .mobile-footer {
        display: flex;
    }
    .social-links svg {
        width: 24px;
        height: 24px;
    }
}
