﻿            .sopa-container {
                margin: 0 auto;
                padding: 10px;
                position: relative;
            }

            .cifras-board {
                margin: 0 auto;
                background: #eee;
                padding: 15px;
                border-radius: 10px;
                border: 1px solid #ddd;
                position: relative;
            }

            .screen-area {
                height: 50px;
                background: #222;
                padding: 15px;
                border-radius: 8px;
                margin-bottom: 12px;
                box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .timer-display {
                font-size: 2rem;
                color: #dc3545;
                font-family: 'Courier New', Courier, monospace;
                font-weight: bold;
                background: #000;
                padding: 5px 15px;
                border-radius: 4px;
                border: 1px solid #444;
            }

            .status-text {
                font-size: 1.4rem;
                color: #ffff00;
                font-family: 'Courier New', Courier, monospace;
                font-weight: bold;
                text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
                min-height: 2.2em;
                display: flex;
                align-items: center;
                justify-content: center;
                text-align: center;
                max-width: 70%;
                line-height: 1.1;
            }

            /* Layout for grid and list */
            .game-wrapper {
                display: flex;
                flex-direction: column;
                gap: 10px;
                align-items: center;
            }

            .grid-sopa {
                display: grid;
                grid-template-columns: repeat(9, 1fr);
                gap: 2px;
                background: #ddd;
                border: 2px solid #ccc;
                border-radius: 8px;
                padding: 2px;
                aspect-ratio: 1 / 1;
                touch-action: none;
                position: relative;
                user-select: none;
                max-width: 550px;
                min-width: 310px;
                width: 100%;
            }

            .tile-sopa {
                background: #fff;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.2rem;
                font-weight: bold;
                text-transform: uppercase;
                color: #333;
                cursor: pointer;
                transition: background 0.2s;
                border-radius: 4px;
                aspect-ratio: 1/1;
            }

            .tile-sopa.selected {
                background: #fff59d;
                color: #000;
                box-shadow: inset 0 0 0 2px #ffeb3b;
            }

            .tile-sopa.sticky {
                background: #ffeb3b;
                color: #000;
                border: 2px solid #f0ad4e;
                box-shadow: 0 0 8px rgba(240, 173, 78, 0.5);
            }

            .tile-sopa.found {
                /* No background or color change */
            }

            /* SVG Styles for Lines */
            .line-found-0 {
                stroke: rgba(165, 214, 167, 0.4);
            }

            /* Green */
            .line-found-1 {
                stroke: rgba(255, 245, 157, 0.4);
            }

            /* Yellow */
            .line-found-2 {
                stroke: rgba(144, 202, 249, 0.4);
            }

            /* Blue */
            .line-found-3 {
                stroke: rgba(239, 154, 154, 0.4);
            }

            /* Red */
            .line-found-4 {
                stroke: rgba(206, 147, 216, 0.4);
            }

            /* Purple */
            .line-found-5 {
                stroke: rgba(255, 204, 128, 0.4);
            }

            /* Orange */

            .words-list-container {
                background: #eee;
                padding: 15px;
                border-radius: 10px;
                border: 1px solid #ddd;
                width: 100%;
                max-width: 500px;
                box-sizing: border-box;
            }

            .words-list {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
                list-style: none;
                padding: 0;
                margin: 0;
                text-align: center;
            }

            .word-item {
                font-weight: bold;
                color: #555;
                text-decoration: none;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8px;
                font-size: 0.85rem;
                padding: 4px;
                border-radius: 4px;
            }

            .word-item.found {
                text-decoration: line-through;
                opacity: 1;
                color: #000 !important;
            }

            .found-0 {
                background-color: #e8f5e9;
                text-decoration-color: #2e7d32;
            }

            .found-1 {
                background-color: #fff9c4;
                text-decoration-color: #f9a825;
            }

            .found-2 {
                background-color: #e3f2fd;
                text-decoration-color: #1565c0;
            }

            .found-3 {
                background-color: #ffebee;
                text-decoration-color: #c62828;
            }

            .found-4 {
                background-color: #f3e5f5;
                text-decoration-color: #6a1b9a;
            }

            .found-5 {
                background-color: #fff3e0;
                text-decoration-color: #ef6c00;
            }

            @media (min-width: 551px) {
                .game-wrapper {
                    flex-direction: row;
                    align-items: flex-start;
                    justify-content: center;
                }

                .words-list-container {
                    max-width: 250px;
                    margin-top: 0;
                }

                .words-list {
                    grid-template-columns: 1fr;
                }
            }

            .overlay-box {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 85%;
                max-width: 400px;
                text-align: center;
                background: white;
                padding: 30px;
                border-radius: 15px;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
                border: 1px solid #e2e8f0;
                z-index: 100;
            }

            .overlay-box h2 {
                color: #1e293b;
                margin-top: 0;
                font-size: 1.8rem;
            }

            .overlay-box p {
                color: #64748b;
                font-size: 1.1rem;
                line-height: 1.5;
                margin: 15px 0;
            }

            .win-message {
                color: #10b981 !important;
                font-weight: 800;
                font-size: 1.6rem !important;
                text-transform: uppercase;
            }

            .share-btn {
                background: #25d366;
                color: white;
                border: none;
                padding: 12px 24px;
                border-radius: 8px;
                font-weight: bold;
                font-size: 1.1rem;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                gap: 8px;
                text-decoration: none;
                margin-top: 10px;
                transition: transform 0.2s;
            }

            .share-btn:hover {
                transform: scale(1.05);
                background: #128c7e;
            }

            .start-button {
                font-size: 1.5em;
                padding: 12px 25px;
                margin-bottom: 12px;
                border-radius: 30px;
                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
                transition: transform 0.1s;
                background: #007bff;
                color: white;
                border: none;
                cursor: pointer;
                font-weight: bold;
                width: 100%;
                max-width: 400px;
                display: inline-block;
                text-decoration: none;
                box-sizing: border-box;
            }

            .start-button:hover {
                transform: scale(1.02);
                background: #0069d9;
            }

            .more-games-section {
                margin-top: 25px;
                border-top: 1px solid #ddd;
                padding-top: 15px;
            }

            .more-games-section h3 {
                font-size: 0.9rem;
                color: #666;
                margin-bottom: 12px;
                letter-spacing: 1px;
            }

            .more-games-grid {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .btn-more-small {
                background: #64748b;
                color: white;
                padding: 8px;
                border-radius: 6px;
                font-size: 0.8rem;
                text-decoration: none;
                font-weight: bold;
                transition: all 0.2s;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                display: block;
            }

            .btn-more-small:hover {
                background: #475569;
                transform: translateY(-1px);
            }

            .common-description {
                text-align: left;
                background: #f8f9fa;
                padding: 20px;
                border-radius: 12px;
                color: #444;
                border: 1px solid #e9ecef;
                margin-top: 10px;
                line-height: 1.5;
            }

            .common-description h3 {
                margin-top: 0;
                margin-bottom: 15px;
                color: #2c3e50;
                font-size: 1.1em;
                text-transform: uppercase;
                letter-spacing: 1px;
                text-align: center;
                border-bottom: 2px solid #ddd;
                padding-bottom: 10px;
            }

            .common-description p {
                margin-bottom: 12px;
            }

            .instructions-list {
                padding-left: 0;
                list-style: none;
                margin: 0;
            }

            .instructions-list li {
                margin-bottom: 12px;
            }

            .hidden {
                display: none !important;
            }

            .selection-svg {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                pointer-events: none;
                z-index: 5;
            }

            .selection-line {
                stroke: rgba(255, 235, 59, 0.4);
                stroke-width: 0.65;
                stroke-linecap: round;
                fill: none;
            }

            .found-line {
                stroke-width: 0.65;
                stroke-linecap: round;
                fill: none;
                mix-blend-mode: multiply;
            }


            @media (max-width: 500px) {
                .tile-sopa {
                    font-size: 1rem;
                }

                .status-text {
                    font-size: 1.2rem;
                }
            }

            .lifelines {
                margin-top: 15px;
                background: #f4f4f4;
                padding: 10px;
                border-radius: 8px;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 10px;
                width: 100%;
                box-sizing: border-box;
                border: 1px solid #ddd;
                border-top: 1px dashed #ccc;
            }

            .lifelines-title {
                font-size: 0.75rem;
                text-transform: uppercase;
                color: #666;
                font-weight: bold;
                margin: 0;
                letter-spacing: 1px;
            }

            .lifelines-buttons {
                display: flex;
                justify-content: center;
                gap: 8px;
                width: 100%;
            }

            button.comodines {
                background-color: #f0ad4e;
                color: white;
                border: none;
                padding: 8px 12px;
                font-size: 0.85rem;
                font-weight: bold;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.1s;
                text-transform: uppercase;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                width: 100%;
            }

            button.comodines:hover:not(:disabled) {
                background-color: #ec971f;
                transform: scale(1.02);
            }

            button.comodines:active:not(:disabled) {
                transform: scale(0.98);
            }

            button.comodines:disabled {
                background-color: #ccc;
                cursor: not-allowed;
                opacity: 0.7;
                box-shadow: none;
            }

            button.comodines span.count {
                background: rgba(0, 0, 0, 0.15);
                padding: 2px 8px;
                border-radius: 12px;
                font-size: 0.8em;
            }



            @media (min-width: 551px) {
                .lifelines {
                    margin-top: 20px;
                }
            }

            .tile-sopa.empty {
                background: transparent;
                border: 1px dashed #ccc;
                visibility: hidden;
            }