:root {
    --primary-color: #4f3ff0;
    --secondary-color: #d5deff;
    --player-red: #ff6b6b;
    --player-yellow: #feca57;
    --board-background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --board-shadow: rgba(37, 117, 252, 0.3);
}

body {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#main-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-grid {
    background: var(--board-background);
    border-radius: 15px;
    box-shadow: 
        0 10px 25px var(--board-shadow),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    padding: 20px;
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.game-grid .btn {
    aspect-ratio: 1/1;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-grid .btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at top left, 
        rgba(255, 255, 255, 0.3), 
        transparent 50%
    );
    transform: rotate(0deg);
    transition: transform 0.5s ease;
}

.game-grid .btn:hover::before {
    transform: rotate(180deg);
}

.game-grid .btn:hover:not(:disabled) {
    transform: scale(1.05) rotateY(10deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-grid .btn.disabled {
    background-color: rgba(224, 224, 224, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}

.game-grid .btn:disabled {
    pointer-events: none;
}

.game-grid .btn.player-1 {
    background-color: var(--player-red);
    box-shadow: 
        0 5px 15px rgba(255, 107, 107, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    animation: pulse-red 1.5s infinite alternate;
}

.game-grid .btn.player-2 {
    background-color: var(--player-yellow);
    box-shadow: 
        0 5px 15px rgba(254, 202, 87, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    animation: pulse-yellow 1.5s infinite alternate;
}

@keyframes pulse-red {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

@keyframes pulse-yellow {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

#player {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 15px;
    text-align: center;
}

#player-type {
    color: white;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #main-container {
        max-width: 95%;
        padding: 20px;
    }

    .game-grid {
        gap: 10px;
        padding: 15px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    #main-container {
        padding: 15px;
    }

    .game-grid {
        gap: 5px;
        padding: 10px;
    }
}

@media (max-width: 550px) {
    #player {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 450px) {
    #player {
        align-items: center;
        display: flex;
        border-width: 5px;
        justify-content: center;
        height: 30px;
        width: 78%;
    }

    #player-type {
        font-size: 1.2rem;
    }
}

/* Additional Animations */
@keyframes dropAnimation {
    0% { 
        opacity: 0;
        transform: translateY(-100px) scale(0.5); 
    }
    80% { 
        opacity: 0.8;
        transform: translateY(10px) scale(1.1); 
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1); 
    }
}

.game-grid .btn.drop-animation {
    animation: dropAnimation 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.mode-btn.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.difficulty-btn.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}