        :root {

            --bg-color: #f0f2f5;
            --primary-color: #4A90E2;
            --success-color: #4caf50;
            --text-color: #333;
            --text-color-secondary: #535353;
            --btn-bg: #ffffff;
            --btn-select: #e1f0ff;
            --hamburger-slice-color: #313030;

            --light: #d8dbe0;
            --dark: #28292c;    
            --switch-width: 4rem;

            --slice-height: 6px;
            --size: 48px;
            --sidebar-width:240px
        }

        .dark-mode {
            --bg-color: #242424;
            --primary-color: #4A90E2;
            --success-color: #3e9142;
            --text-color: #f7f7f7;
            --text-color-secondary: #d8d8d8;
            --btn-bg: #303030;
            --btn-select: #5a5f64;
            --hamburger-slice-color: #f7f7f7;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            margin: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            user-select: none;
            touch-action: manipulation;
        }

        h1 { margin-top: 20px; font-size: 1.5rem; }

        .game-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            width: 90%;
            max-width: 400px;
            margin-top: 30px;
        }

        .column {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .word-btn {
            background: var(--btn-bg);
            border: 2px solid transparent;
            padding: 15px 10px;
            border-radius: 12px;
            text-align: center;
            font-size: 1.1rem;
            font-weight: 600;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 140px;
            min-height: 50px;
            max-height: 50px;
        }

        /* Selected State */
        .word-btn.selected {
            border-color: var(--primary-color);
            background-color: var(--btn-select);
            transform: scale(1.05);
        }

        /* Correct Match State */
        .word-btn.correct {
            background-color: var(--success-color) !important;
            color: white;
            border-color: var(--success-color);
            pointer-events: none; /* Deactivate */
            opacity: 0.7;
        }

        .stats { 
            margin-top: 32px; 
            margin-bottom: 60px;
            font-size: 0.9rem; 
            color: #666; 
            text-align: center; 
        }

        #reset-btn {
            position: fixed;
            bottom: 16px;
            left: 16px;
            font-size: 0.85rem;
            background: none; 
            border: none; 
            color: #ff4d4d; 
            text-decoration: underline; 
            cursor: pointer;
        }

        /* Animation for feedback */
        @keyframes shake {
            0%, 100% {transform: translateX(0);}
            25% {transform: translateX(-5px);}
            75% {transform: translateX(5px);}
        }
        .error { animation: shake 0.3s ease-in-out; }


        /* Dark mode switch */
        .toggle-switch {
            position: absolute;
            top:1.2rem;
            right:24px;
            width: var(--switch-width);
        }

        .toggle-switch-label {
            position: absolute;
            width: var(--switch-width);
            height: calc(var(--switch-width)/2);
            background-color: var(--dark);
            border-radius: calc(var(--switch-width)/4);
            cursor: pointer;
        }

        .toggle-switch-label > input {
            display: none;
        }


        .slider {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: var(--switch-width);
            transition: 0.3s;
        }

        input:checked ~ .slider {
            background-color: var(--light);
        }

        .slider::before {
            content: "";
            position: absolute;
            top: calc(var(--switch-width)*.05);
            left: calc(var(--switch-width)*.05);
            width: calc(var(--switch-width)*.4);
            height: calc(var(--switch-width)*.4);
            border-radius: var(--switch-width);
            box-shadow: inset calc(var(--switch-width)*.2) 0px 0px 0px var(--light);
            background-color: var(--dark);
            transition: 0.3s;
        }

        input:checked ~ .slider::before {
            transform: translateX(calc(var(--switch-width)*.5));
            background-color: var(--dark);
            box-shadow: none;
        }


        /* Modal */
        /* Import words */
        #btn-import {
            position: absolute;
            bottom: 20px; 
            right: 60px;
            height: 64px;
            padding: 16px 32px;
            border: none;
            border-radius: 16px;
            color: #ffffff;
            background: var(--primary-color); 
            font-size: 16px;
            font-weight: 700;            
            cursor: pointer;
        }

        .modal-overlay {
            display: none; /* Hidden by default */
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.6);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        /* The Modal Box */
        .modal-content {
            background: var(--btn-bg);
            padding: 25px;
            border-radius: 15px;
            width: 85%;
            max-width: 350px;
            text-align: center;
            color: var(--text-color);
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        }
        .modal-content p {
           color: var(--text-color-secondary); 
        }


        /* New Styles for Toggle and Hidden State */
        .column-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .col-toggle {
            background: #ddd;
            border: none;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: bold;
            cursor: pointer;
            text-transform: uppercase;
            transition: background 0.2s;
        }

        .col-toggle.active {
            background: var(--primary-color);
            color: white;
        }

        /* The 'hidden' state for buttons */
        .word-btn.is-hidden {
            color: transparent !important;
        }

        /* The 'disabled' state for the column */
        .column.is-disabled {
            pointer-events: none; 
            opacity: 0.6;
        }


        /* Code snippet styling inside modal */
        code {
            display: block;
            background: #f4f4f4;
            color: #555;
            padding: 10px;
            margin: 10px 0;
            border-radius: 5px;
            font-family: monospace;
            text-align: left;
            white-space: pre;
            user-select: text;
        }

        @media (max-width: 768px) {

            :root {
                --switch-width: 3rem;
            }

            #btn-import{
                position: fixed;                
                bottom: 10px;
                right: 10px;
                height: 40px;
                padding: 12px 18px;
                border-radius: 12px;
                font-size: 16px;
                width: fit-content;
            }

            .toggle-switch{
                top: 0.8rem;
                right: 16px;
            }
    
        }

                
        /* Hamburger */
        #hamburger-toggle {
            opacity: 0;
            cursor: pointer;
            position: absolute;
        }
        #navigation {
            position: fixed;
            z-index: 100;
            right: 20px;
        }
        #hamburger {
            display: block;
            padding: 0.5rem;
            cursor: pointer;
            width: var(--size);
            height: var(--size);
            box-sizing: content-box;            
        }
        #hamburger .slice {
            display: block;
            position: relative;
            width: 100%;
            height: var(--slice-height, 2px);
            border-radius: var(--slice-height);
            transition: all 0.2s ease;
            background-color: var(--hamburger-slice-color);
            opacity: 90%;
        }
        #hamburger .slice {
            margin-top: 22%; /* Fallback to produce something hamburger-ish if calc is not available */
            margin-top: calc(33% - var(--slice-height));
            top: calc((33% - var(--slice-height)) / -2);
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            width: var(--sidebar-width);
            height: 100%;
            right: calc(var(--sidebar-width)*-1);
            background-color: var(--btn-bg);
            z-index: 200;
            box-shadow: -4px 0px 18px 0px #04040454;
            transition: right 0.25s ease;
        }
        .sidebar-item-container{
            display: grid;
            grid-template-columns: auto;
        }
        .item-close{
            font-size: 4em;
            text-align: start;
            color: var(--hamburger-slice-color);
        }
        .bar-item {
            height: 100px;
            background-color: var(--bg-color);
            border: 1px solid black;
            padding: 10px;
            font-size: 18px;
            text-align: center;
        }
        .bar-item:hover{
            background-color:var(--primary-color);;
        }
        

