body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

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

.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
}

footer {
    background: #35424a;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Universal Button Reset and Base Styles */
button {
    /* Reset browser defaults */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    background: none;
    margin: 0;
    padding: 0;
    
    /* Standard button styles */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 44px; /* Fixed height for consistency */
    padding: 0 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Default theme */
    background: #35424a;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: #2c3e50;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

button:disabled:hover {
    background: #35424a;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

    button {
        width: 100%;
    }
}

#app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
    padding: 20px;
    max-width: 1200px;
}

#app-header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Game Tabs */
#game-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#game-tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 60px; /* Taller for icon + text */
    min-width: 80px;
    padding: 8px 12px;
    background: transparent;
    color: #6c757d;
    font-size: 12px;
    border-radius: 8px;
    box-shadow: none;
}

.tab-button:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.tab-button.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.tab-icon {
    font-size: 20px;
    display: block;
}

.tab-name {
    font-weight: 500;
    font-size: 11px;
}

/* Game Container */
#game-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.game-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-panel.active {
    display: flex;
}

#game-grid {
    display: grid;
    grid-template-columns: repeat(6, 60px);
    gap: 4px;  /* Even smaller gap */
    background-color: #ebedf0;  /* Slightly darker background */
    padding: 8px;
    border-radius: 8px;
    margin: 20px auto;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    background: white;
    border: 1px solid #e1e4e8;  /* Changed from 0.5px to 1px for consistency */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Static Invalid Cell Highlighting - NO ANIMATIONS */
.cell.invalid {
    border: 3px solid #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.3) !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6) !important;
}

/* Different violation types get different colors - NO ANIMATIONS */
.cell.invalid-consecutive-horizontal,
.cell.invalid-consecutive-vertical {
    border-color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.35) !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.7) !important;
}

.cell.invalid-constraint {
    border-color: #9b59b6 !important;
    background-color: rgba(155, 89, 182, 0.3) !important;
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.6) !important;
}

.cell.invalid-row-balance,
.cell.invalid-column-balance {
    border-color: #f39c12 !important;
    background-color: rgba(243, 156, 18, 0.3) !important;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.6) !important;
}

/* Remove all transitions from cells to prevent lag */
.cell {
    /* Removed all transitions */
    user-select: none;
    -webkit-user-select: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto; /* Allow scrolling if content is too tall */
    padding: 20px 0; /* Add padding to prevent modal from touching edges */
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 85vh; /* Prevent modal from being too tall */
    overflow-y: auto; /* Allow scrolling within modal if needed */
}

.game-row {
    display: flex;
}

.cell-container {
    position: relative;
    width: 60px;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell.fixed {
    background-color: #fafbfc;
    border-color: #e1e4e8;
    cursor: not-allowed;
}

.constraint-symbol {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    z-index: 1;
    font-size: 16px;  /* Increased font size */
    width: 20px;  /* Updated width */
    height: 20px; /* Updated height */
    text-align: center;
    line-height: 1;
    background: white;
    pointer-events: none;
}

.constraint-symbol.right {
    left: calc(100% + 2px);  /* Account for border and gap */
    top: 50%;
    transform: translate(-50%, -50%);  /* Center between cells */
}

.constraint-symbol.bottom {
    left: 50%;
    top: calc(100% + 2px);  /* Account for border and gap */
    transform: translate(-50%, -50%);  /* Center between cells */
}

#showAnswerBtn {
    background-color: #e74c3c;
}

#showAnswerBtn:hover {
    background-color: #c0392b;
}

#game-controls,
.game-controls {
    display: flex;
    gap: 12px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    padding: 0 10px;
}

#answer-control {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Sudoku Styles */
#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    gap: 1px;
    background-color: #2c3e50;
    padding: 2px;
    border-radius: 8px;
    margin: 20px auto;
}

.sudoku-cell {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sudoku-cell:nth-child(3n):not(:nth-child(9n)) {
    border-right: 2px solid #2c3e50;
}

.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #2c3e50;
}

.sudoku-cell.fixed {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.sudoku-cell.selected {
    background-color: #3498db;
    color: white;
}

.sudoku-cell.invalid {
    background-color: #e74c3c;
    color: white;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 20px;
    max-width: 300px;
}

.number-btn {
    width: 50px;
    height: 50px;
    min-width: 50px; /* Override default min-width */
    padding: 0; /* Override default padding */
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.number-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.number-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.erase-btn {
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.1);
}

.erase-btn:hover {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

/* Nonogram Styles */
#nonogram-grid {
    display: grid;
    gap: 1px;
    background-color: #2c3e50;
    padding: 2px;
    border-radius: 8px;
    margin: 20px auto;
}

.nonogram-cell {
    width: 25px;
    height: 25px;
    background: white;
    border: 1px solid #bdc3c7;
    cursor: pointer;
    transition: all 0.1s ease;
}

.nonogram-cell.filled {
    background: #2c3e50;
}

.nonogram-cell.marked {
    background: white;
    position: relative;
}

.nonogram-cell.marked::after {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e74c3c;
    font-size: 16px;
    font-weight: bold;
}

.nonogram-clue {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
}

.drawing-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.draw-mode {
    height: 44px; /* Match standard button height */
    padding: 0 15px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    font-size: 14px;
    min-width: 90px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.draw-mode:hover,
.draw-mode.active {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

/* Bridges Styles */
#bridges-grid {
    display: grid;
    gap: 0;
    margin: 20px auto;
    position: relative;
}

.bridge-island {
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.bridge-connection {
    position: absolute;
    background: #2c3e50;
    z-index: 1;
}

.bridge-connection.horizontal {
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.bridge-connection.vertical {
    width: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.bridge-connection.double {
    background: repeating-linear-gradient(
        90deg,
        #2c3e50,
        #2c3e50 8px,
        transparent 8px,
        transparent 12px
    );
}

.bridge-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.bridge-mode {
    height: 44px; /* Match standard button height */
    padding: 0 15px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    font-size: 14px;
    min-width: 90px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.bridge-mode:hover,
.bridge-mode.active {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

/* Sequence Styles */
#sequence-display {
    background: white;
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sequence-numbers {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    letter-spacing: 8px;
}

.sequence-question {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.sequence-pattern {
    font-size: 14px;
    color: #95a5a6;
    font-style: italic;
}

#sequence-input {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

#sequence-answer {
    padding: 12px 20px;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    width: 150px;
    outline: none;
}

#sequence-answer:focus {
    border-color: #2980b9;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

#sequence-submit {
    background: #3498db;
    color: white;
    font-size: 16px;
    min-width: 100px;
    height: 44px; /* Match input height */
}

#sequence-submit:hover {
    background: #2980b9;
}

.answer-button {
    background-color: #e74c3c;
    color: white;
    font-size: 16px;
    min-width: 120px;
}

.answer-button:hover {
    background-color: #c0392b;
}

#timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #35424a;
    font-family: monospace;
    display: flex;
    justify-content: center;
    background: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#game-header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Add new responsive grid calculations */
:root {
    --cell-size: 60px;
    --grid-size: 6;
}

#game-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-size), var(--cell-size));
    gap: 4px;
    background-color: #ebedf0;
    padding: 8px;
    border-radius: 8px;
    margin: 20px auto;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cell-container {
    position: relative;
    width: var(--cell-size);
    height: var(--cell-size);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Update media queries */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }

    /* Mobile button adjustments - maintain consistency */
    button {
        height: 40px; /* Slightly smaller for mobile */
        padding: 0 16px;
        min-width: 80px;
        font-size: 13px;
    }
    
    :root {
        --cell-size: 45px;  /* Smaller cells for mobile */
    }

    #game-controls,
    .game-controls {
        gap: 5px;
        padding: 0 10px;
    }

    #timer {
        font-size: 1.2em;
        padding: 3px 10px;
    }

    /* Tab adjustments */
    #game-tabs {
        gap: 3px;
        padding: 3px;
    }

    .tab-button {
        height: 55px; /* Slightly smaller for mobile */
        padding: 6px 10px;
        min-width: 70px;
    }

    .tab-icon {
        font-size: 16px;
    }

    .tab-name {
        font-size: 10px;
    }

    /* Game-specific mobile adjustments */
    .sudoku-cell {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    #sudoku-grid {
        grid-template-columns: repeat(9, 35px);
    }

    .number-btn {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 16px;
    }

    .number-pad {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        max-width: 280px;
    }

    .draw-mode,
    .bridge-mode {
        height: 40px;
        min-width: 80px;
        padding: 0 12px;
        font-size: 13px;
    }

    .nonogram-cell {
        width: 20px;
        height: 20px;
    }

    .bridge-island {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    #bridges-grid {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
    }

    #sequence-display {
        padding: 20px;
        margin: 15px 0;
    }

    .sequence-numbers {
        font-size: 20px;
        letter-spacing: 4px;
    }

    .sequence-question {
        font-size: 16px;
    }

    #sequence-answer {
        width: 120px;
        padding: 10px 15px;
        font-size: 16px;
        height: 40px;
    }

    #sequence-submit {
        height: 40px;
        font-size: 14px;
    }

    .close-modal {
        height: 40px;
        font-size: 14px;
    }
}

/* Extra small mobile devices */
@media (max-width: 425px) {
    :root {
        --cell-size: 35px;  /* Smaller cells */
    }

    #app-container {
        padding: 10px 5px;
        margin: 10px auto;
    }

    .cell {
        font-size: 0.9rem;
        padding: 2px;
        overflow: hidden;
        line-height: 1;
    }

    .constraint-symbol {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }

    .constraint-symbol.right {
        left: calc(100% + 1px);
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .constraint-symbol.bottom {
        left: 50%;
        top: calc(100% + 1px);
        transform: translate(-50%, -50%);
    }

    #game-controls,
    .game-controls {
        gap: 4px;
    }

    /* Extra small button adjustments */
    button {
        height: 36px;
        padding: 0 12px;
        min-width: 70px;
        font-size: 12px;
    }

    .tab-button {
        height: 50px;
        padding: 4px 8px;
        min-width: 65px;
    }

    .number-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 14px;
    }

    .draw-mode,
    .bridge-mode {
        height: 36px;
        min-width: 70px;
        padding: 0 10px;
        font-size: 12px;
    }

    #sequence-answer {
        height: 36px;
        width: 100px;
        font-size: 14px;
    }

    #sequence-submit {
        height: 36px;
        font-size: 12px;
    }
}

.ad-container {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    min-height: 90px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 728px) {
    .ad-container {
        max-width: 320px;
        min-height: 50px;
    }
}

/* Stats Modal Styles */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.stat-label {
    font-weight: 500;
    color: #2c3e50;
}

.stat-value {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1em;
}

/* Difficulty Selector Styles */
.difficulty-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.difficulty-btn {
    padding: 15px 20px;
    border: 2px solid #e1e4e8;
    background: white;
    color: #2c3e50;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
}

.difficulty-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.difficulty-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.difficulty-btn small {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.close-modal {
    background: #3498db;
    color: white;
    font-size: 16px;
    min-width: 100px;
}

.close-modal:hover {
    background: #2980b9;
}

/* Rules Modal Enhancements */
.rules-section {
    margin: 20px 0;
}

.rules-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.rules-section ul {
    margin: 0;
    padding-left: 20px;
}

.rules-section li {
    margin: 8px 0;
    line-height: 1.4;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    color: #2c3e50;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Game Legend Styles */
#game-legend {
    max-width: 500px;
    margin: 30px auto 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
}

#game-legend h3 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

#game-legend ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

#game-legend li {
    margin: 5px 0;
    line-height: 1.4;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid;
    flex-shrink: 0;
}

.legend-color.red {
    background-color: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.legend-color.purple {
    background-color: rgba(155, 89, 182, 0.3);
    border-color: #9b59b6;
}

.legend-color.orange {
    background-color: rgba(243, 156, 18, 0.3);
    border-color: #f39c12;
}

/* Mobile optimizations for new modals */
@media (max-width: 600px) {
    .stats-container {
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px;
        font-size: 14px;
    }
    
    .difficulty-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .modal {
        padding: 10px 0;
    }
    
    .modal-buttons {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .close-modal {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 80px;
    }
    
    #game-controls {
        gap: 8px;
        margin: 20px 0;
        padding: 0 5px;
    }
    
    #game-controls button {
        flex: 1;
        min-width: 70px;
        max-width: 120px;
    }

    .rules-section h3 {
        font-size: 1em;
    }

    .rules-section li {
        font-size: 14px;
        margin: 6px 0;
    }

    kbd {
        font-size: 0.8em;
        padding: 1px 4px;
    }

    #game-legend {
        margin: 20px 10px;
        padding: 15px;
        font-size: 13px;
    }

    #game-legend h3 {
        font-size: 14px;
    }

    .legend-items {
        gap: 6px;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }
}

/* Loading Indicator Styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 18px;
    color: #2c3e50;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

.loading-indicator::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e1e4e8;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .loading-indicator {
        height: 150px;
        font-size: 16px;
        padding: 15px;
    }
    
    .loading-indicator::after {
        width: 30px;
        height: 30px;
        border-width: 3px;
        margin-top: 10px;
    }
}