        :root {
            --primary-color: #3498db;
            --secondary-color: #f0f0f0;
            --text-color: #333;
            --border-color: #ccc;
            --success-color: #2ecc71;
            --warning-color: #f39c12;
            --error-color: #e74c3c;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 10px; /* Reduced from 20px */
            background-color: #eef1f5;
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .container {
            display: flex;
            flex-wrap: wrap;
            width: 100%;
            max-width: 600px; /* Reduced from 1200px */
            gap: 10px; /* Reduced from 20px */
            justify-content: center;
        }
        
        .controls, .display {
            background-color: white;
            padding: 10px; /* Reduced from 20px */
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .controls {
            flex: 1 1 175px; /* Reduced from 350px */
        }

        .display {
            flex: 2 1 300px; /* Reduced from 600px */
            display: flex;
            justify-content: center;
            align-items: center;
        }

        h1 {
            color: var(--primary-color);
            text-align: center;
            width: 100%;
            margin-bottom: 10px; /* Reduced from 20px */
            font-size: 1.25em; /* Reduced */
        }

        h2 {
            font-size: 1em; /* Reduced from 1.2em */
            margin-top: 0;
            margin-bottom: 8px; /* Reduced from 15px */
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 5px; /* Reduced from 10px */
        }

        .form-group {
            margin-bottom: 8px; /* Reduced from 15px */
        }

        label {
            display: block;
            margin-bottom: 3px; /* Reduced from 5px */
            font-weight: bold;
            font-size: 0.8em; /* Reduced */
        }

        select {
            width: 100%;
            padding: 5px; /* Reduced from 10px */
            border: 1px solid var(--border-color);
            border-radius: 4px;
            box-sizing: border-box;
            background-color: var(--secondary-color);
            font-size: 0.8em; /* Reduced */
        }

        select:disabled {
            background-color: #ddd;
            color: #666;
        }

        .button-group {
            display: flex;
            gap: 5px; /* Reduced from 10px */
            margin-top: 10px; /* Reduced from 20px */
        }

        button {
            flex: 1;
            padding: 6px; /* Reduced from 12px */
            font-size: 12px; /* Reduced from 16px */
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.1s;
            font-weight: bold;
        }

        button:hover:not(:disabled) {
            transform: translateY(-2px);
        }

        button:disabled {
            background-color: #95a5a6 !important;
            cursor: not-allowed;
        }
        
        #hint-button {
            background-color: var(--success-color);
            color: white;
        }

        #hint-button:hover:not(:disabled) {
            background-color: #27ae60;
        }

        #reset-button {
            background-color: #e74c3c;
            color: white;
        }

        #reset-button:hover:not(:disabled) {
            background-color: #c0392b;
        }

        #status-message {
            margin-top: 10px; /* Reduced from 20px */
            text-align: center;
            font-weight: bold;
            padding: 5px; /* Reduced from 10px */
            border-radius: 4px;
            min-height: 10px; /* Reduced from 20px */
            font-size: 0.8em; /* Reduced */
        }
        
        .board-container {
            position: relative;
        }

        #watermark-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-45deg);
            font-size: 35px; /* Reduced from 70px */
            font-family: 'Consolas', 'Courier New', monospace;
            font-weight: bold;
            color: rgba(0, 0, 0, 0.08);
            pointer-events: none;
            z-index: 1;
            display: none; /* Hidden by default */
        }

        canvas {
            border: 1px solid var(--border-color);
            background-color: var(--secondary-color);
            display: block;
            position: relative;
            z-index: 0;
        }

        .canvas-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column; /* To stack text */
            justify-content: center;
            align-items: center;
            text-align: center;
            color: #555;
            pointer-events: none;
            background-color: rgba(255, 255, 255, 0.7);
            z-index: 2;
        }

        .overlay-text {
            font-size: 0.9em; /* Reduced from 1.5em */
            font-weight: bold;
        }

        .solution-count {
            font-size: 1.25em; /* Reduced from 2.5em */
            font-weight: bold;
            color: var(--primary-color);
            margin-top: 5px; /* Reduced from 10px */
        }
        
        a:link {
            color: rgb(215, 228, 215);
            background-color: transparent;
            text-decoration: none;
        }

 
        a:visited {
            color: rgb(20, 68, 241);
            background-color: transparent;
            text-decoration: none;
        }

 
        a:hover {
            color: rgb(30, 255, 0);
            background-color: transparent;
            text-decoration: underline;
        }

 
        a:active {
            color: yellow;
            background-color: transparent;
            text-decoration: underline;
        }