:root {
            --primary-color: #ffffff;
            --secondary-color: #ffffff;
            --bg-color: #f3f4f6;
            --board-bg: #ffffff;
            --cell-border: #374151;
            --cell-size: 32px;
            --highlight-clue: #dbeafe;
            --highlight-word: #eff6ff;
            --correct: #22c55e;
            --wrong: #ef4444;
            --text-color: #1f2937;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }

        body {
            background-color: #ffffff;
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            align-items: center;
            /* min-height: 100vh; */
            padding: 0px;
        }

        header { text-align: center; margin-bottom: 15px; max-width: 800px; }
        h1 { color: var(--secondary-color); font-size: 2rem; margin-bottom: 5px; }
        .subtitle { color: #666; font-size: 1rem; }

        .game-area {
            display: flex;
            gap: 20px;
            background: var(--board-bg);
            /* padding: 20px; */
            border-radius: 0px;
            max-width: 100%;
            overflow: hidden;
            /* flex-wrap: wrap; */
            justify-content: center;
            margin-bottom: 40px;
        }

        .crossword-board {
            display: grid;
            grid-template-columns: repeat(15, var(--cell-size));
            grid-template-rows: repeat(15, var(--cell-size));
            gap: 1px;
            background-color: var(--cell-border);
            border: 2px solid var(--cell-border);
            user-select: none;
            flex-shrink: 0;
        }

        .cell {
            background-color: #fff;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            font-weight: bold;
            text-transform: uppercase;
            cursor: pointer;
            transition: background-color 0.1s;
        }

        .cell.black { background-color: #000; cursor: default; }

        .cell input {
            width: 100%; height: 100%;
            border: none; text-align: center;
            font-size: 1.1rem; font-weight: bold;
            text-transform: uppercase; background: transparent;
            padding: 0; margin: 0; outline: none;
            cursor: pointer; z-index: 2;
        }

        .cell input:focus { background-color: var(--highlight-word); }
        .cell.highlight-word { background-color: var(--highlight-word); }
        .cell.correct { background-color: var(--correct) !important; color: white; }
        .cell.wrong { background-color: var(--wrong) !important; color: white; }
        .cell-number {
            position: absolute; top: 2px; left: 2px;
            font-size: 9px; line-height: 1;
            color: #333; z-index: 1; pointer-events: none;
        }

        .clues-container {
            width: 300px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            height: 510px; 
            overflow: hidden;
        }

        .clue-scroll {
            overflow-y: auto;
            flex: 1;
            /* padding-right: 5px; */
        }

        .clue-section h3 {
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 5px; margin-bottom: 8px;
            color: var(--secondary-color); font-size: 1.1rem;
            position: sticky; top: 0; background: white; z-index: 10;
        }

        .clue-list { list-style: none; }
        .clue-item {
            padding: 6px 8px; margin-bottom: 4px;
            border-radius: 4px; cursor: pointer;
            font-size: 0.9rem; transition: background 0.2s;
        }
        .clue-item:hover { background-color: #f0f0f0; }
        .clue-item.active {
            background-color: var(--highlight-clue);
            border-left: 3px solid var(--primary-color); font-weight: 600;
        }

        .controls { margin-top: 20px; display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }

        button {
            padding: 10px 20px; font-size: 1rem;
            border: none; border-radius: 6px;
            cursor: pointer; font-weight: 600; color: white;
        }
        button:active { transform: translateY(1px); }
        .btn-check { background-color: var(--primary-color); }
        .btn-reset { background-color: #ef4444; } 
        .btn-help { background-color: #6b7280; }

        /* Article Styles - UPDATED */
        .article-container {
            width: 100%; /* Changed from max-width: 800px */
            max-width: 100%; /* Ensures full width */
            background: white;
            padding: 40px;
            border-radius: 12px;
            margin-bottom: 50px;
            line-height: 1.8;
        }
        
        .article-container h2 {
            color: #000000; /* Changed to Black */
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 1.8rem;
        }
        
        .article-container h3 {
            color: #000000; /* Changed to Black */
            margin-top: 20px;
            margin-bottom: 10px;
            font-size: 1.4rem;
        }
        
        .article-container p {
            margin-bottom: 15px;
            color: #4b5563;
            font-size: 1.1rem;
        }
        
        .article-container strong {
            color: #1f2937;
            font-weight: 700;
        }
        
        .article-container ul {
            margin-left: 20px;
            margin-bottom: 20px;
            color: #4b5563;
        }
        
        .article-container li {
            margin-bottom: 8px;
        }

        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.5); display: none;
            justify-content: center; align-items: center; z-index: 1000;
        }
        .modal {
            background: white; padding: 30px; border-radius: 12px;
            text-align: center; max-width: 400px; width: 90%;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .modal h2 { color: var(--secondary-color); margin-bottom: 10px; }
        .modal p { margin-bottom: 20px; color: #4b5563; line-height: 1.5; }
        .btn-close { background-color: var(--secondary-color); width: 100%; }

        @media (max-width: 768px) {
            .game-area {flex-direction: column;align-items: center;/* padding: 10px; */}
            .clues-container { width: 100%; height: 300px; }
            :root { --cell-size: 26px; } 
            .crossword-board { width: fit-content; }
            .clue-item { font-size: 0.85rem; }
            h1 { font-size: 1.5rem; }
            .article-container { padding: 20px; }
            .article-container h2 { font-size: 1.5rem; }
        }
:root {
    --primary-color: #3b82f6;
    --secondary-color: #000000;
    /* --bg-color: #257bec; */
    --board-bg: #ffffff;
    --cell-border: #2b2b2b;
    --cell-size: 30px;
    --highlight-clue: #dbeafe;
    --highlight-word: #eff6ff;
    --correct: #22c55e;
    --wrong: #ef4444;
    --text-color: #000000;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    /* background-color: var(--bg-color); */
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* padding: 15px; */
}

/* Header */
header {
    text-align: center;
    margin-bottom: 15px;
}

h1 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #000000;
    font-size: 0.95rem;
}

/* Game Layout */
.game-area {
    display: flex;
    gap: 15px;
    background: #ffffff;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 25px;
}

/* Crossword Board */
.crossword-board {
    display: grid;
    grid-template-columns: repeat(15, var(--cell-size));
    grid-template-rows: repeat(15, var(--cell-size));
    gap: 1px;
    background-color: var(--cell-border);
    border: 2px solid var(--cell-border);
    user-select: none;
}

/* Cells */
.cell {
    background-color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.cell.black {
    background-color: #000;
}

.cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    background: transparent;
    color: transparent;
    text-shadow: 0 0 0 #000;
    outline: none;
}

.cell input:focus {
    background-color: var(--highlight-word);
}

.cell.highlight-word {
    background-color: var(--highlight-word);
}

.cell.correct {
    background-color: var(--correct) !important;
    color: white;
}

.cell.correct input {
    text-shadow: 0 0 0 white;
}

.cell.wrong {
    background-color: var(--wrong) !important;
    color: white;
}

.cell.wrong input {
    text-shadow: 0 0 0 white;
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 9px;
    color: #333;
}

/* Clues Section */
.clues-container {
    width: 300px;
    max-height: 480px;
    overflow-y: auto;
}

.clue-section h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 1rem;
}

.clue-list {
    list-style: none;
}

.clue-item {
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.clue-item:hover {
    background-color: #f0f0f0;
}

.clue-item.active {
    background-color: var(--highlight-clue);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

/* Buttons */
.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

button {
    padding: 10px 18px;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-check { background-color: var(--primary-color); }
.btn-reset { background-color: #ef4444; }
.btn-help { background-color: #6b7280; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    max-width: 350px;
    width: 90%;
}

/* Responsive */
@media (max-width: 1700px) {
    :root {
        --cell-size: 38px;
    }
}
@media (max-width: 1024px) {
    :root {
        --cell-size: 38px;
    }
}

@media (max-width: 768px) {

    :root {
        --cell-size: 27px;
    }

    .game-area {
        flex-direction: column;
        align-items: center;
        /* padding: 10px; */
    }

    .clues-container {
        width: 100%;
        max-height: 250px;
    }

    h1 {
        font-size: 1.4rem;
    }
}
