/* Add Desired Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/* Body Styling */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0px;
    padding-top: 5px;
    background: linear-gradient(135deg, #1A1A2E, #16213E);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #FFFFFF;
    overflow-y: hidden;
}

/* Header Styling */
h1 {
    font-size: 32px;
    margin: 10px;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

/* Score Styling */
#score {
    font-size: 18px;
    margin: 5px auto 10px auto;
    color: #FFFFFF;
    background: rgba(76, 175, 80, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #4CAF50;
    letter-spacing: 1px;
}

/* General Button Styling */
button {
    padding: 12px 24px;
    font-size: 18px;
    margin-top: 10px;
    cursor: pointer;
    background-color: #4CAF50;
    color: #FFFFFF;
    border: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
button:hover {
    background-color: #45A049;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

/* Mode Buttons Styling */
#mode-buttons {
    text-align: center;
    margin-bottom: 10px;
}
#mode-buttons button {
    width: 175px;
    height: 40px;
    background-color: rgba(51, 51, 51, 0.95);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 10px;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
}
#mode-buttons button:hover {
    box-shadow: 0 0 10px 3px rgba(51, 51, 51, 0.95);
}
#mode-buttons.no-hover {
    pointer-events: none;
}

/* Game Board Wrapper Styling */
#game-board-wrapper {
    position: relative;
    display: inline-block;
}

/* Game Board Styling */
#game-board {
    background-color: rgba(51, 51, 51, 0.9);
    border: 3px solid #4CAF50;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

/* Instructions Button Styling */
#instructions-btn {
    margin-top: 20px;
}

/* Game Over Screen Styling */
.game-over {
    position: absolute;
    color: #FFFFFF;
    text-align: center;
    display: none;
    background: linear-gradient(135deg, #1A1A2E, #16213E);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #4CAF50;
    width: 200px;
    letter-spacing: 1px;
    font-size: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Popup Styling */
.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}
.popup-content {
    background: rgba(51, 51, 51, 0.95);
    margin: 5% auto;
    padding: 20px;
    border: 2px solid #4CAF50;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    color: white;
    text-align: center;
    line-height: 1.1;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 16px;
}
.popup-content h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}
.popup-content b {
    font-weight: 600;
    color: #FFD300;
}
.popup-content canvas {
    vertical-align: middle;
    margin-left: 10px;
}