:root {
  --dark-blue: #0a192f;
  --light-blue: #172a45;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--dark-blue);
    margin: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Update floating objects styles */
.floating-objects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    perspective: 1000px;
}

.floating-object {
    position: absolute;
    background: linear-gradient(
        45deg,
        rgba(100, 255, 218, 0.08),  /* Changed from white to teal with low opacity */
        rgba(0, 123, 255, 0.05)      /* Changed from white to blue with low opacity */
    );
    border: 1px solid rgba(100, 255, 218, 0.1);  /* Changed from white to teal */
    border-radius: 15px;
    animation: float 20s infinite linear;
    transform-style: preserve-3d;
    box-shadow: 
        0 0 20px rgba(100, 255, 218, 0.05),    /* Changed glow to teal */
        inset 0 0 20px rgba(0, 123, 255, 0.05); /* Changed inner glow to blue */
    backdrop-filter: blur(5px);
}

.floating-object::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(100, 255, 218, 0.08) 0%,    /* Changed from white to teal */
        transparent 50%,
        rgba(0, 123, 255, 0.05) 100%      /* Changed from white to blue */
    );
    border-radius: inherit;
}

@keyframes float {
    0% {
        transform: translateZ(0) rotate(0deg) translateX(0) translateY(0);
    }
    25% {
        transform: translateZ(100px) rotate(90deg) translateX(30px) translateY(-20px);
    }
    50% {
        transform: translateZ(50px) rotate(180deg) translateX(50px) translateY(30px);
    }
    75% {
        transform: translateZ(150px) rotate(270deg) translateX(10px) translateY(-40px);
    }
    100% {
        transform: translateZ(0) rotate(360deg) translateX(0) translateY(0);
    }
}

#game-container, .game-menu {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    width: 350px;
    max-width: 90%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px 0;
}

.game-menu h1 {
    margin-bottom: 30px;
}

.game-menu button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 15px;
    font-size: 1.2em;
}

h1 {
    color: #fff;
    margin-bottom: 20px;
}

#instructions {
    font-size: 1.1em;
    margin-bottom: 20px;
    min-height: 2em; /* To prevent layout shift */
}

#target-area {
    width: 200px;
    height: 200px;
    background-color: lightcoral; /* Initial/Waiting color */
    margin: 20px auto;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    color: white;
    font-weight: bold;
    user-select: none;
}

#target-area.disabled {
    cursor: not-allowed;
    background-color: #aaa !important;
}

#result {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    min-height: 1.5em; /* To prevent layout shift */
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2),
                0 0 30px rgba(255, 0, 0, 0.1);
}

button:hover {
    background-color: #0056b3;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4),
                0 0 40px rgba(255, 0, 0, 0.2),
                0 0 60px rgba(255, 0, 0, 0.1);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

button.secondary {
    background-color: #6c757d;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.15),
                0 0 30px rgba(255, 0, 0, 0.1);
}

button.secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3),
                0 0 40px rgba(255, 0, 0, 0.15),
                0 0 60px rgba(255, 0, 0, 0.1);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#leaderboard {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#leaderboard h2 {
    margin-bottom: 15px;
    color: #fff;
}

.record {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 1em;
}

.record strong {
    color: #fff;
}

.record span {
    color: #64ffda;
    font-weight: bold;
}

/* Add new styles for the main title */
.main-title {
    font-size: 3em;
    background: linear-gradient(45deg, #64ffda, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
    margin-bottom: 40px;
    text-align: center;
}

/* Update menu styles */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-menu h2 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 25px;
}

/* New Menu Styles */
.game-menu-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-menu {
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}

.updates-panel {
    width: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.update-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.update-header h2 {
    margin: 0;
    color: #64ffda;
    font-size: 1.4em;
}

.update-badge {
    background: #64ffda;
    color: var(--dark-blue);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.updates-content {
    color: rgba(255, 255, 255, 0.8);
}

.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.update-dot {
    width: 8px;
    height: 8px;
    background: #64ffda;
    border-radius: 50%;
}

.update-item p {
    margin: 0;
    font-size: 0.95em;
}

.update-note {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Make menu responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5em;
        margin-bottom: 30px;
    }

    .game-menu-container {
        flex-direction: column;
        align-items: stretch;
        max-width: 90%;
        gap: 20px;
    }

    .updates-panel {
        width: auto;
    }
}

/* Multiplayer Styles */
.player-list {
    margin-top: 20px;
    text-align: left;
}

.player-list h3 {
    text-align: center;
    color: #555;
    margin-bottom: 10px;
}

.player {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.player.winner {
    background-color: #d4edda; /* Light green */
    border: 1px solid #c3e6cb;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.player-info {
    flex-grow: 1;
}

.player-name {
    font-weight: bold;
}

.player-status, .player-time {
    font-size: 0.9em;
    color: #666;
}

.player-time {
    font-weight: bold;
    color: #007bff;
}

/* Battle Request Styles */
.battle-button {
    padding: 5px 15px;
    font-size: 0.9em;
    margin: 0;
    background-color: #dc3545;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3),
                0 0 30px rgba(255, 0, 0, 0.15);
}

.battle-button:hover {
    background-color: #c82333;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
                0 0 40px rgba(255, 0, 0, 0.25),
                0 0 60px rgba(255, 0, 0, 0.15);
}

.battle-status {
    font-size: 0.9em;
    font-style: italic;
}

.battle-status.pending {
    color: #ffc107;
}

.battle-status.accepted {
    color: #28a745;
}

.battle-status.declined {
    color: #dc3545;
}

.battle-requests {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    max-width: calc(100vw - 40px);
    z-index: 1000;
}

.battle-request {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.battle-request img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.battle-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.accept-button, .decline-button {
    flex: 1;
    padding: 8px;
    font-size: 0.9em;
    margin: 0;
}

.accept-button {
    background-color: #28a745;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2),
                0 0 30px rgba(255, 0, 0, 0.1);
}

.accept-button:hover {
    background-color: #218838;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4),
                0 0 40px rgba(255, 0, 0, 0.2),
                0 0 60px rgba(255, 0, 0, 0.1);
}

.decline-button {
    background-color: #dc3545;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3),
                0 0 30px rgba(255, 0, 0, 0.15);
}

.decline-button:hover {
    background-color: #c82333;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
                0 0 40px rgba(255, 0, 0, 0.25),
                0 0 60px rgba(255, 0, 0, 0.15);
}

/* Adjust player status container */
.player-status {
    margin-top: 5px;
}

/* Add these new styles */
.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* Add Grid Reaction Game styles */
.grid-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px auto;
}

.grid-light {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.grid-light:hover {
    transform: scale(1.05);
}

/* Add Moving Targets styles */
.moving-targets-container {
    width: 300px;
    height: 300px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
}

.moving-target {
    width: 30px;
    height: 30px;
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.moving-target:hover {
    transform: scale(1.1) translate(-45%, -45%);
}

@media (max-width: 500px) {
    .grid-container {
        gap: 10px;
    }
    
    .grid-light {
        width: 50px;
        height: 50px;
    }

    .moving-targets-container {
        width: 250px;
        height: 250px;
    }
    
    .moving-target {
        width: 25px;
        height: 25px;
    }
}