body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f0f4f8;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    padding: 10px;
    background-color: #f39c12;
    color: #fff;
}

h1 {
    margin: 0;
    font-size: 1em;
}

p {
    font-size: 1em;
    margin: 5px 0;
}

#theme-toggle {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    background-color: #f39c12;
    color: #fff;
    border: none;
    border-radius: 4px;
}

.bingo-board {
    margin: 10px auto;
    max-width: 500px; 
    display: flex;
    justify-content: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 5px;
    padding: 8px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.grid-item {
    background-color: #e0e7ff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.6em;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    height: 80px; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

.grid-item:hover {
    background-color: #c7d2fe;
    border-color: #a5b4fc;
}

.grid-item:active {
    transform: scale(0.95);
}

.grid-item.marked {
    background-color: #34d399;
    color: #fff;
    text-decoration: line-through;
    border-color: #059669;
}

body.dark-mode {
    background-color: #1e293b;
    color: #e2e8f0;
}

body.dark-mode header {
    background-color: #334155;
    color: #e2e8f0;
}

body.dark-mode #theme-toggle {
    background-color: #64748b;
    color: #e2e8f0;
}

body.dark-mode .grid-container {
    background-color: #334155;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .grid-item {
    background-color: #475569;
    border-color: #64748b;
    color: #e2e8f0;
}

body.dark-mode .grid-item:hover {
    background-color: #64748b;
}

body.dark-mode .grid-item.marked {
    background-color: #10b981;
    border-color: #059669;
    color: #1e293b;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5em;
    }

    #theme-toggle {
        font-size: 0.85em;
        padding: 6px 12px;
    }

    .grid-item {
        font-size: 0.6em; 
        height: 70px;
    }
}

footer {
    margin-top: 1px;
    padding: 1px;
    font-size: 0.9em;
    color: #6b7280;
}

.grid-item.marked {
    background-color: #34d399; 
    color: #fff; 
    text-decoration: none;
    border-color: #059669;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-top: 10px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color:  #34495e; 
    transition: 0.4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.sun-icon, .moon-icon {
    color: white;
    font-size: 1em;
    transition: opacity 0.4s;
}

.moon-icon {
    opacity: 0; 
}

input:checked + .slider {
    background-color: #f39c12; 
}

input:checked + .slider .sun-icon {
    opacity: 0; 
}

input:checked + .slider .moon-icon {
    opacity: 1; 
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider:before {
    transform: translateX(26px); 
}