* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(100, 116, 139, 0.2);
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.board-list {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.board-item {
    padding: 15px;
    margin-bottom: 8px;
    background-color: rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
}

.board-item:hover {
    background-color: rgba(71, 85, 105, 0.6);
    transform: translateX(5px);
}

.board-item.active {
    border-color: #06b6d4;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
}

.board-item-name {
    font-weight: 600;
    font-size: 1rem;
}

.board-item-progress {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 4px;
}

.delete-board-btn {
    background-color: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.delete-board-btn:hover {
    opacity: 1;
}

.board-item.active .delete-board-btn {
    color: rgba(255, 255, 255, 0.9);
}

.add-board-btn {
    margin: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.add-board-btn:hover {
    transform: translateY(-2px);
}

.plus-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-width: 250px;
}

.header-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.import-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.export-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.reset-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.reset-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    background-color: rgba(15, 23, 42, 0.4);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.bingo-square {
    aspect-ratio: 1;
    background-color: #1e293b;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.bingo-square:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.bingo-square.empty {
    background-color: rgba(51, 65, 85, 0.5);
    border: 2px dashed rgba(148, 163, 184, 0.5);
    color: #94a3b8;
}

.bingo-square.free {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: default;
    color: white;
}

.bingo-square.free:hover {
    transform: none;
}

.bingo-square.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.bingo-square.partial {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    color: white;
    border-color: #0284c7;
}

.square-text {
    font-size: 0.9rem;
    word-wrap: break-word;
    max-width: 100%;
}

.square-progress {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.9;
}

.completion-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #06b6d4;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background-color: #475569;
    color: white;
}

.btn-secondary:hover {
    background-color: #334155;
}

/* Interact Modal Content */
.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    margin: 20px 0;
    max-width: 100%;
}

.checkbox-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e293b;
    border: 2px solid #475569;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.checkbox-item:hover {
    background-color: #334155;
    transform: scale(1.05);
}

.checkbox-item.checked {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.checkbox-item::after {
    content: '✓';
    color: white;
    font-size: 2rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox-item.checked::after {
    opacity: 1;
}

.checkbox-item label {
    display: none;
}

.counter-display {
    text-align: center;
    margin: 30px 0;
}

.counter-value {
    font-size: 4rem;
    font-weight: bold;
    color: #06b6d4;
    margin: 20px 0;
}

.counter-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.counter-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.counter-btn.increment {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.counter-btn.increment:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.counter-btn.decrement {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.counter-btn.decrement:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.single-complete-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.single-complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.single-complete-btn.completed {
    background: #475569;
    color: #cbd5e0;
    cursor: default;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 200px;
    }

    .board-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
    }

    .board-item {
        min-width: 150px;
        flex-shrink: 0;
    }

    .add-board-btn {
        margin: 10px 15px;
    }

    .main-content {
        padding: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

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

    .bingo-square {
        padding: 5px;
    }

    .square-text {
        font-size: 0.7rem;
    }

    .square-progress {
        font-size: 0.6rem;
    }

    .counter-value {
        font-size: 3rem;
    }

    .counter-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Bonus Squares Section */
.bonus-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #cbd5e1;
}

.bonus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bonus-header h2 {
    font-size: 1.5em;
    color: #1e293b;
    margin: 0;
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(137px, 1fr));
    gap: 12px;
    margin-top: 20px;
    background-color: rgba(15, 23, 42, 0.4);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.delete-bonus-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #1e293b;
    background-color: #ef4444;
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.delete-bonus-btn:hover {
    background-color: #dc2626;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

.bingo-square.bonus-square {
    position: relative;
    overflow: visible;
}
