:root {
    --bg-color: #0b0f19;
    --panel-bg: #1a2235;
    --text-main: #aee9ff;
    --text-outline: #1f4ed8;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0b0f19 0%, #16102b 100%);
    color: white;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

/* Bubble Text Effect */
.bubble-title {
    font-family: 'Titan One', cursive;
    font-size: 80px;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

.letter {
    color: var(--text-main);
    -webkit-text-stroke: 3px var(--text-outline);
    display: inline-block;
    position: relative;
    text-shadow: 0 6px 0 var(--text-outline), 0 10px 15px rgba(0,0,0,0.4);
    animation: float 3s infinite ease-in-out;
    cursor: pointer;
}

.drip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background-color: var(--text-main);
    border: 3px solid var(--text-outline);
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: -1;
    animation: dripAnim 2.5s infinite ease-in;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

@keyframes dripAnim {
    0% { height: 10px; opacity: 1; }
    70% { height: 40px; opacity: 1; }
    100% { height: 45px; opacity: 0; }
}

.bubble-sub {
    font-family: 'Titan One', cursive;
    font-size: 35px;
    color: #ffd166;
    -webkit-text-stroke: 2px #d97706;
    margin-top: -10px;
    text-shadow: 0 4px 0 #d97706;
    animation: pulseSub 2s infinite alternate;
}

@keyframes pulseSub {
    0% { transform: scale(1); }
    100% { transform: scale(1.05) rotate(-1deg); }
}

/* Game Selector Navbar */
.game-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.game-btn {
    background: #0f172a;
    border: 2px solid #1f4ed8;
    color: #aee9ff;
    font-family: 'Titan One', cursive;
    font-size: 20px;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 2px 0 #1f4ed8;
    box-shadow: 0 4px 0 #1f4ed8;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1f4ed8, 0 10px 20px rgba(31,78,216,0.5);
    background: #1e293b;
}

.game-btn.active {
    background: #1f4ed8;
    color: white;
    border-color: #aee9ff;
    text-shadow: 0 2px 0 #0f172a;
    box-shadow: 0 0 20px rgba(174, 233, 255, 0.6), inset 0 0 10px rgba(255,255,255,0.3);
    transform: translateY(2px);
}

/* Sections */
.game-section {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.game-section.active {
    display: flex;
}

/* Layout */
.lab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1200px;
    width: 90%;
    margin-bottom: 40px;
}

.game-wrapper {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255,255,255,0.1);
}

canvas {
    background: #000;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(174, 233, 255, 0.2);
    display: block;
}

.controls-wrapper {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255,255,255,0.1);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.controls-wrapper h2 {
    margin-top: 0;
    color: #ffd166;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #aee9ff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: #0f172a;
    height: 10px;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #aee9ff;
    cursor: pointer;
    box-shadow: 0 0 10px #aee9ff;
}

input[type="color"] {
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #0f172a;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #1f4ed8; }
input:checked + .slider:before { transform: translateX(22px); }

/* Code Panel */
.code-panel {
    width: 90%;
    max-width: 1080px;
    background: var(--panel-bg);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 80px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.code-header {
    background: #0f172a;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #aee9ff;
    user-select: none;
}

.code-header:hover {
    background: #1e293b;
}

.code-content {
    display: none;
    padding: 20px;
    background: #0b0f19;
    color: #10b981;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
}

.code-footer {
    padding: 12px 20px;
    background: #0f172a;
    border-top: 1px solid rgba(174, 233, 255, 0.1);
    font-size: 13px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-footer a {
    color: #aee9ff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.code-footer a:hover {
    opacity: 0.7;
}

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

.watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'Titan One', cursive;
    color: rgba(174, 233, 255, 0.3);
    font-size: 20px;
    pointer-events: none;
    animation: floatWatermark 4s infinite ease-in-out;
    z-index: 1000;
    text-shadow: 1px 1px 0 rgba(31, 78, 216, 0.3);
}

@keyframes floatWatermark {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-5px); opacity: 0.6; }
}

footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
    background: #05080f;
    width: 100%;
}

.kw { color: #c678dd; } 
.fn { color: #61afef; } 
.str { color: #98c379; } 
.num { color: #d19a66; } 
.cmt { color: #5c6370; font-style: italic; } 
