/* styles.css - Custom styles beyond Bootstrap */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    border-bottom: 0;
    padding: 1.25rem;
}

.game-cell {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #0d6efd;
    margin: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    position: relative;
}

.game-column {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.game-column:hover {
    transform: translateY(-10px);
}

.game-column:hover .game-cell.empty {
    background-color: rgba(13, 110, 253, 0.1);
}

.game-cell.red {
    background-color: #dc3545;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    transform: scale(0.95);
}

.game-cell.yellow {
    background-color: #ffc107;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
    transform: scale(0.95);
}

.game-cell.winning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(0.95); }
}

#game-board {
    background-color: #0d6efd;
    border-radius: 15px;
    padding: 15px;
    display: inline-block;
    margin: 0 auto;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Responsive styling for smaller screens */
@media (max-width: 768px) {
    .game-cell {
        width: 45px;
        height: 45px;
        margin: 3px;
    }
}

@media (max-width: 576px) {
    .game-cell {
        width: 35px;
        height: 35px;
        margin: 2px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .score .badge {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 400px) {
    .game-cell {
        width: 30px;
        height: 30px;
        margin: 2px;
    }
}

.score {
    font-size: 1.2rem;
}

.badge {
    font-size: 1rem;
}

/* Animations */
.drop-animation {
    animation: drop 0.5s ease-in-out;
}

@keyframes drop {
    0% { 
        transform: translateY(-300px);
        opacity: 0;
    }
    70% {
        transform: translateY(20px);
    }
    100% { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Make form controls more touch-friendly on mobile */
@media (max-width: 768px) {
    .form-control, .btn, .form-select {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }
}

#game-code-display {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-align: center;
}

/* Shadow effect at bottom of columns to enhance the "slot" feel */
.game-column::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: -1;
}

/* Add a slight hover effect for columns during player's turn */
.game-column.active-column:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Prevent click events when it's not player's turn */
.game-column.disabled {
    cursor: not-allowed;
}