/* General Styles */
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Press Start 2P', sans-serif;
    background: linear-gradient(to bottom, #000428, #004e92);
    color: white;
}

/* Social Buttons */
#socialButtons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

#socialButtons a {
    margin: 0 5px;
    text-decoration: none;
}

#socialButtons img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px #00e6ff);
    transition: transform 0.3s;
}

#socialButtons img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px #00e6ff);
}

/* Canvas Styles */
#gameCanvas {
    display: none;
    margin: 0;
    background: url('background.png') no-repeat center center fixed;
    background-size: cover;
    width: 100vw;
    height: 80vh;
    border: 5px solid #00e6ff;
    box-shadow: 0 0 20px #00e6ff;
    transition: all 0.5s ease;
}

/* Chaos Meter Styles */
#chaosMeter {
    display: none;
    width: 100vw;
    height: 10vh;
    background-color: rgba(34, 34, 34, 0.9);
    color: white;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    position: relative;
}

#chaosMeter h3 {
    margin: 0;
    font-size: 2em;
    animation: glow 2s infinite alternate;
}

#chaosEffects {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

.effectIcon {
    margin: 0 10px;
    font-size: 2em;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow {
    from { text-shadow: 0 0 10px #fff; }
    to { text-shadow: 0 0 20px #00e6ff; }
}

/* Menu and Modal Styles */
#menu, .modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.85) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#menu h1 {
    font-size: 6vw;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00e6ff, 0 0 20px #00e6ff;
    animation: neonGlow 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from { text-shadow: 0 0 10px #00e6ff, 0 0 20px #00e6ff; }
    to { text-shadow: 0 0 20px #00e6ff, 0 0 30px #00e6ff; }
}

#menu button, .modal button {
    font-size: 3vw;
    margin: 10px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #00e6ff;
    color: #00e6ff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#menu button:hover, .modal button:hover {
    background: #00e6ff;
    color: #000;
    box-shadow: 0 0 10px #00e6ff, 0 0 20px #00e6ff;
}

.modal {
    display: none;
}

/* Win Screen Styles */
#winScreen {
    display: none;
}

#winScreen h2 {
    font-size: 4vw;
    margin-bottom: 20px;
    color: #00e6ff;
    text-shadow: 0 0 10px #00e6ff, 0 0 20px #00e6ff;
}

/* Marquee Styles */
.marquee {
    position: absolute;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    background: none;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marqueeScroll 60s linear infinite;
    font-size: 2vw;
    color: yellow;
    text-shadow: 0 0 5px #00e6ff, 0 0 10px #00e6ff;
}

@keyframes marqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Responsive Styles */
@media (orientation: portrait) {
    #menu h1 {
        font-size: 8vw;
    }
    #menu button, .modal button {
        font-size: 5vw;
    }
    .marquee-content {
        font-size: 4vw;
    }
}

/* Inverted colors effect */
.inverted {
    filter: invert(1);
}

/* Color scheme changes */
.color-scheme-1 {
    background-color: #ff7e5f;
    color: #fff;
}

.color-scheme-2 {
    background-color: #00c6ff;
    color: #fff;
}

/* Chromatic Aberration Effect */
.chromatic-aberration {
    filter: url(#chromaticAberrationFilter);
}

/* Flash White Effect */
.flash-white {
    animation: flashWhite 0.1s;
}

@keyframes flashWhite {
    0% { background-color: rgba(255, 255, 255, 0.8); }
    100% { background-color: transparent; }
}

/* Paddle Glow and Shadow Trail */
.paddle-glow {
    filter: drop-shadow(0 0 20px #00e6ff);
}

/* Glitch effect */
.glitch {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% {
        clip-path: inset(0 0 80% 0);
    }
    33% {
        clip-path: inset(20% 0 40% 0);
    }
    66% {
        clip-path: inset(60% 0 10% 0);
    }
    100% {
        clip-path: inset(0 0 80% 0);
    }
}

/* Paddle and Ball Styles */
.paddle {
    fill: #fff;
    stroke: #00e6ff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 10px #00e6ff);
}

.ball {
    fill: #fff;
    stroke: #ff0055;
    stroke-width: 2px;
    filter: drop-shadow(0 0 10px #ff0055);
}

/* Paddle Hit Animation */
@keyframes paddleHit {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(2);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.paddle-hit {
    animation: paddleHit 0.3s;
}

/* Button Press Animation */
button:active {
    transform: scale(0.95);
}

/* Additional Visual Effects */
#gameCanvas.flash {
    animation: flashEffect 0.5s;
}

@keyframes flashEffect {
    0% { background-color: rgba(255, 255, 255, 0.5); }
    100% { background-color: transparent; }
}

/* Rainbow Mode */
.rainbow {
    animation: rainbowEffect 5s linear infinite;
}

@keyframes rainbowEffect {
    0% { background-color: red; }
    16% { background-color: orange; }
    33% { background-color: yellow; }
    50% { background-color: green; }
    66% { background-color: blue; }
    83% { background-color: indigo; }
    100% { background-color: violet; }
}

/* Neon Outline Mode */
.neon-outline {
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    animation: neonOutlineGlow 1s infinite alternate;
}

@keyframes neonOutlineGlow {
    from { box-shadow: 0 0 10px #fff, 0 0 20px #fff; }
    to { box-shadow: 0 0 20px #fff, 0 0 40px #fff; }
}
