/* Global Styles */
body {
    margin: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #020714;
    color: #ffffff;
    padding-top: 50px;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(100, 255, 218, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 65, 108, 0.1) 0%, transparent 40%);
    min-height: 100vh;
    position: relative;
}

/* Game Board Styling */
#game-board {
    display: grid;
    grid-template-columns: repeat(7, 60px);
    gap: 8px;
    padding: 20px;
    background: linear-gradient(45deg, #0a192f, #172a45);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.2),
                inset 0 0 20px rgba(100, 255, 218, 0.1);
    position: relative;
    z-index: 1;
}

/* Cell Styling */
.cell {
    width: 60px;
    height: 60px;
    background: #0d2538;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid rgba(100, 255, 218, 0.2);
}

.cell:hover {
    background: #153450;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
}

.cell.red {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    box-shadow: 0 0 20px rgba(255, 65, 108, 0.4);
    border-color: rgba(255, 65, 108, 0.6);
}

.cell.yellow {
    background: linear-gradient(135deg, #64ffda, #48c9b0);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
    border-color: rgba(100, 255, 218, 0.6);
}

/* Status Display */
#status {
    margin: 20px 0;
    padding: 15px 30px;
    background: rgba(10, 25, 47, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.15);
    font-size: 1.2em;
    border: 1px solid rgba(100, 255, 218, 0.2);
    backdrop-filter: blur(5px);
}

#current-player {
    font-weight: bold;
    color: #64ffda;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

#thinking-time {
    font-family: monospace;
    background: rgba(23, 42, 69, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

/* Button Styling */
button {
    padding: 12px 24px;
    font-size: 1em;
    cursor: pointer;
    background: linear-gradient(135deg, #0a192f, #172a45);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 5px;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.1);
}

button:hover {
    background: linear-gradient(135deg, #172a45, #0a192f);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.5);
}

#restart-btn {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    border-color: rgba(255, 65, 108, 0.3);
}

#restart-btn:hover {
    background: linear-gradient(135deg, #ff4b2b, #ff416c);
    border-color: rgba(255, 65, 108, 0.5);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 7, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #0a192f, #172a45);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(100, 255, 218, 0.2);
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.modal-content h2 {
    color: #64ffda;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

/* File Input Section */
.file-input-section {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    background: rgba(10, 25, 47, 0.5);
    border-radius: 10px;
}

.file-input-section h3 {
    margin-bottom: 10px;
    color: #64ffda;
}
.save-file{
    margin-top: 10px;
    cursor: pointer;
    z-index: 1000;
}

.file-format-info {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

#move-file {
    width: 100%;
    padding: 8px;
    background: rgba(23, 42, 69, 0.8);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 4px;
    margin-bottom: 10px;
    color: white;
}

/* Difficulty Form */
.difficulty-selects {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

select {
    width: 100%;
    padding: 8px;
    background: rgba(23, 42, 69, 0.8);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 4px;
    margin: 5px 0;
    color: white;
}
.winning {
    animation: glow 0.5s infinite;
    border-color: rgba(100, 255, 218, 0.8);
}
/* Animations */
@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(100, 255, 218, 0.2); }
    50% { box-shadow: 0 0 30px rgba(100, 255, 218, 0.4); }
    100% { box-shadow: 0 0 20px rgba(100, 255, 218, 0.2); }
}


/* Star field effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 80px 120px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 110px 130px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 140px 80px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: stars 8s linear infinite;
    opacity: 0.4;
    z-index: 0;
}

@keyframes stars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .difficulty-selects {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    #game-board {
        grid-template-columns: repeat(7, 45px);
        gap: 6px;
    }
    
    .cell {
        width: 45px;
        height: 45px;
    }
}