/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body, html {
    background: linear-gradient(90deg, #1f2833, #0b0c10); /* Updated gradient background */
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 3rem;
    color: #38ef7d;
}

header p {
    font-size: 1.2rem;
    color: #c5c6c7;
}

/* Modal Styles */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal-content {
    background: #1f2833;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    text-align: center;
    width: 100%;
    max-width: 400px;
    z-index: 1001;
}

h2 {
    color: #38ef7d;
    margin-bottom: 20px;
    font-size: 2rem;
}

p {
    font-size: 1rem;
    color: #c5c6c7;
}

.mode-button {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    font-size: 1.2rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #0b0c10;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mode-button:hover {
    transform: scale(1.08);
}

/* Game Container */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: transparent; /* Make container transparent to show full-page gradient */
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 0 auto;
    transform: translateY(-100vh); /* Initially move out of view */
    opacity: 0; /* Initially invisible */
    transition: transform 0.6s ease, opacity 0.6s ease; /* Smooth slide down */
}

.game-container.visible {
    transform: translateY(0); /* Slide into view */
    opacity: 1; /* Fade in */
}

#game-board {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    background-color: #1f2833;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

#ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #38ef7d;
    border-radius: 50%;
}

.paddle {
    position: absolute;
    width: 10px;
    height: 100px;
    background-color: #38ef7d;
}

#paddle-left {
    left: 0;
}

#paddle-right {
    right: 0;
}

#refresh-message {
    margin-top: 20px;
    font-size: 1rem;
    color: #c5c6c7;
}

.hidden {
    display: none !important;
}
