/* Theme Variables */
:root {
    /* Default theme variables */
    --primary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --background-color: #2f2f2f;
    --card-background: #3f3f3f;
    --text-color: #ffffff;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    --border-radius: 10px;
}

/* Theme: Retro */
body.retro {
    --primary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --background-color: #2f2f2f;
    --card-background: #3f3f3f;
    --text-color: #ffffff;
}

/* Theme: Cyber */
body.cyber {
    --primary-color: #00ff00;
    --accent-color: #0099ff;
    --background-color: #000033;
    --card-background: #001a33;
    --text-color: #00ff00;
}

/* Theme: Fantasy */
body.fantasy {
    --primary-color: #ffd700;
    --accent-color: #9b4dca;
    --background-color: #2a0845;
    --card-background: #3a1a5e;
    --text-color: #ffd700;
}

/* Theme: Neon */
body.neon {
    --primary-color: #ff00ff;
    --accent-color: #00ffff;
    --background-color: #000000;
    --card-background: #1a1a1a;
    --text-color: #ffffff;
}

/* Style Variations */
[data-style="pixelated"] .game-card {
    image-rendering: pixelated;
    border: 4px solid var(--primary-color);
    clip-path: polygon(
        0% 5px,
        5px 0%,
        calc(100% - 5px) 0%,
        100% 5px,
        100% calc(100% - 5px),
        calc(100% - 5px) 100%,
        5px 100%,
        0% calc(100% - 5px)
    );
}

[data-style="rounded"] .game-card {
    border-radius: 30px;
    border: 2px solid var(--accent-color);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.5s ease;
    color: var(--text-color);
}

/* Customizer */
.customizer {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.customizer-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: var(--card-background);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 2;
}

.customizer-toggle:hover {
    transform: scale(1.1);
}

.customizer-toggle span {
    position: absolute;
    right: 70px;
    background: var(--card-background);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.6em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.customizer-toggle:hover span {
    opacity: 1;
    transform: translateX(0);
}

.customizer-panel {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    background: var(--card-background);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid var(--accent-color);
    z-index: 1000;
}

.customizer.active .customizer-panel {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) scale(1);
}

.panel-section {
    margin-bottom: 20px;
}

.panel-section h3 {
    font-size: 0.8em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.theme-buttons,
.style-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.theme-btn,
.style-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--card-background);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
}

.theme-btn span,
.style-btn span {
    position: absolute;
    background: var(--card-background);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.6em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    z-index: 1100;
}

.theme-btn span {
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
}

.style-btn span {
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
}

.theme-btn:hover span,
.style-btn:hover span {
    opacity: 1;
}

.theme-btn:hover,
.style-btn:hover {
    transform: scale(1.05);
    background: var(--accent-color);
    color: var(--card-background);
    z-index: 1050;
}

.theme-btn.active,
.style-btn.active {
    background: var(--primary-color);
    color: var(--card-background);
    box-shadow: 0 0 10px var(--primary-color);
}

@media (max-width: 768px) {
    .customizer {
        right: 20px;
        bottom: 20px;
        top: auto;
        transform: none;
    }

    .customizer-panel {
        position: fixed;
        right: 20px;
        bottom: 80px;
        top: auto;
        transform: scale(0.95);
        max-width: calc(100vw - 40px);
    }

    .customizer.active .customizer-panel {
        transform: scale(1);
    }

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

/* Theme and Style Switchers */
.theme-switcher,
.style-switcher {
    position: fixed;
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--card-background);
    border-radius: 50px;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid var(--accent-color);
}

.theme-switcher {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
}

.style-switcher {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
}

.theme-btn,
.style-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    padding: 12px;
    border: none;
    border-radius: 50%;
    background: var(--card-background);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.theme-btn span,
.style-btn span {
    position: absolute;
    background: var(--card-background);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.6em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.theme-btn span {
    left: 60px;
    transform: translateX(10px);
}

.style-btn span {
    right: 60px;
    transform: translateX(-10px);
}

.theme-btn:hover span,
.style-btn:hover span {
    opacity: 1;
    transform: translateX(0);
}

.theme-btn:hover,
.style-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
    color: var(--card-background);
}

.theme-btn.active,
.style-btn.active {
    background: var(--primary-color);
    color: var(--card-background);
    box-shadow: 0 0 10px var(--primary-color);
}

@media (max-width: 768px) {
    .theme-switcher,
    .style-switcher {
        position: fixed;
        flex-direction: row;
        bottom: 20px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px;
    }

    .theme-switcher {
        bottom: 90px;
    }

    .theme-btn,
    .style-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
        font-size: 0.6em;
    }

    .theme-btn span,
    .style-btn span {
        display: none;
    }
}

/* Rest of your existing CSS */
.container {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2.5em;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.game-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    color: var(--primary-color);
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

.game-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 1s;
}

.game-icon {
    font-size: 3em;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.1);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

p {
    color: var(--secondary-color);
    font-size: 0.8em;
    line-height: 1.6;
}

.add-game {
    border: 3px dashed var(--accent-color);
    background: var(--card-background);
    cursor: default;
}

.add-game:hover {
    transform: none;
    box-shadow: var(--card-shadow);
}

footer {
    margin-top: auto;
    padding: 20px;
    color: var(--primary-color);
    font-size: 0.7em;
    text-align: center;
}

/* Animations */
@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px var(--accent-color),
                     0 0 10px var(--accent-color),
                     0 0 15px var(--primary-color);
    }
    to {
        text-shadow: 0 0 10px var(--accent-color),
                     0 0 20px var(--accent-color),
                     0 0 30px var(--primary-color);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .game-card {
        padding: 20px;
    }
}