        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Comic Sans MS', 'Segoe UI', Tahoma, sans-serif;
            background: linear-gradient(135deg, #5DADE2 0%, #82E0AA 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
            animation: fadeIn 1s;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .dark-mode-toggle {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.15);
            border: 2px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
            backdrop-filter: blur(10px);
        }

        .dark-mode-toggle:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .dark-mode-toggle span {
            font-size: 1em;
        }

        .header h1 {
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            margin-bottom: 10px;
            width: 100%;
        }

        .header p {
            font-size: 1.2em;
            opacity: 0.9;
            width: 100%;
        }

        .selector-panel {
            background: #FAFAFA;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            margin-bottom: 30px;
            animation: slideUp 0.5s;
        }

        .category-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 30px;
            justify-content: center;
        }

        .category-tab {
            padding: 12px 25px;
            background: #E5E8E8;
            border: none;
            border-radius: 25px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .category-tab:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
            background: #82E0AA;
        }

        .category-tab.active {
            background: linear-gradient(135deg, #5DADE2 0%, #82E0AA 100%);
            color: white;
            font-weight: bold;
        }

        .selector-panel h2 {
            color: #5DADE2;
            margin-bottom: 20px;
            text-align: center;
        }

        .topics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
            min-height: 200px;
        }

        .topic-btn {
            background: linear-gradient(135deg, #5DADE2 0%, #82E0AA 100%);
            color: white;
            border: none;
            padding: 15px;
            border-radius: 15px;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .topic-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(93, 173, 226, 0.4);
        }

        .topic-btn.selected {
            background: linear-gradient(135deg, #F7DC6F 0%, #F5B041 100%);
            transform: scale(1.05);
        }

        .topic-icon {
            font-size: 2.5em;
        }

        .generate-btn {
            width: 100%;
            background: linear-gradient(135deg, #F5B041 0%, #F7DC6F 100%);
            color: white;
            border: none;
            padding: 18px;
            border-radius: 15px;
            font-size: 1.3em;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
        }

        .generate-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(245, 176, 65, 0.4);
        }

        .generate-btn:disabled {
            background: #E5E8E8;
            cursor: not-allowed;
            transform: none;
            color: #999;
            text-shadow: none;
        }

        .worksheet {
            background: #FAFAFA;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            animation: fadeIn 0.5s;
            display: none;
        }

        .worksheet.active {
            display: block;
        }

        .worksheet-header {
            text-align: center;
            border: 3px dashed #5DADE2;
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 30px;
        }

        .worksheet-title {
            color: #5DADE2;
            font-size: 2em;
            margin-bottom: 10px;
        }

        .content-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        .text-content {
            font-size: 1.1em;
            line-height: 1.8;
            color: #333;
            text-align: justify;
        }

        .topic-illustration {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10em;
            animation: bounce 2s infinite;
        }

        .questions {
            margin-top: 30px;
        }

        .question {
            margin-bottom: 20px;
            padding: 15px;
            background: #E5E8E8;
            border-radius: 10px;
            border-left: 4px solid #5DADE2;
        }

        .question-text {
            font-weight: bold;
            color: #5DADE2;
            margin-bottom: 10px;
        }

        .answer-input {
            width: 100%;
            padding: 10px;
            border: 2px solid #E5E8E8;
            border-radius: 8px;
            font-size: 1em;
            font-family: inherit;
            transition: border-color 0.3s;
            background: #FAFAFA;
        }

        .answer-input:focus {
            outline: none;
            border-color: #5DADE2;
        }

        .word-search {
            margin-top: 30px;
            padding: 25px;
            background: #E5E8E8;
            border-radius: 15px;
        }

        .word-search h3 {
            color: #5DADE2;
            margin-bottom: 15px;
            text-align: center;
        }

        .search-grid {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 5px;
            margin-bottom: 20px;
            justify-items: center;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }

        .letter-cell {
            width: 100%;
            aspect-ratio: 1;
            max-width: 45px;
            max-height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #FAFAFA;
            border: 2px solid #5DADE2;
            border-radius: 8px;
            font-weight: bold;
            color: #5DADE2;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
            font-size: clamp(0.9em, 2vw, 1.1em);
        }

        .letter-cell:hover {
            background: #5DADE2;
            color: white;
            transform: scale(1.1);
        }

        .letter-cell.found {
            background: #82E0AA;
            color: white;
            border-color: #82E0AA;
        }

        .words-list {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: center;
        }

        .word-item {
            padding: 8px 15px;
            background: #FAFAFA;
            border-radius: 20px;
            border: 2px solid #5DADE2;
            color: #5DADE2;
            font-weight: bold;
            transition: all 0.3s;
        }

        .word-item.found {
            background: #82E0AA;
            border-color: #82E0AA;
            color: white;
            text-decoration: line-through;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 30px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 10px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: bold;
        }

        .btn-print {
            background: #82E0AA;
            color: white;
        }

        .btn-new {
            background: #F5B041;
            color: white;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        .stats {
            text-align: center;
            margin-top: 20px;
            padding: 15px;
            background: #E5E8E8;
            border-radius: 10px;
            color: #5DADE2;
            font-weight: bold;
        }

        .footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            color: white;
            backdrop-filter: blur(10px);
        }

        .footer p {
            margin: 8px 0;
            font-size: 0.95em;
        }

        .footer a {
            color: #F7DC6F;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s;
        }

        .footer a:hover {
            color: #F5B041;
            text-decoration: underline;
        }

        .donation-link {
            display: inline-block;
            padding: 8px 16px;
            background: linear-gradient(135deg, #F7DC6F 0%, #F5B041 100%);
            color: white !important;
            border-radius: 20px;
            margin-left: 10px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
        }

        .donation-link:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(247, 220, 111, 0.4);
            text-decoration: none !important;
        }

        /* Dark Mode Styles */
        body.dark-mode {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }

        body.dark-mode .selector-panel {
            background: #2d3142;
            color: #e8e8e8;
        }

        body.dark-mode .selector-panel h2 {
            color: #82E0AA;
        }

        body.dark-mode .category-tab {
            background: #3d405b;
            color: #e8e8e8;
        }

        body.dark-mode .category-tab:hover {
            background: #5DADE2;
            color: white;
        }

        body.dark-mode .category-tab.active {
            background: linear-gradient(135deg, #5DADE2 0%, #82E0AA 100%);
            color: white;
        }

        body.dark-mode .topic-btn {
            background: linear-gradient(135deg, #3d405b 0%, #2d3142 100%);
            color: #e8e8e8;
            border: 2px solid #5DADE2;
        }

        body.dark-mode .topic-btn:hover {
            background: linear-gradient(135deg, #5DADE2 0%, #82E0AA 100%);
            color: white;
            border-color: transparent;
        }

        body.dark-mode .topic-btn.selected {
            background: linear-gradient(135deg, #F7DC6F 0%, #F5B041 100%);
            color: #1a1a2e;
            border-color: transparent;
        }

        body.dark-mode .worksheet {
            background: #2d3142;
            color: #e8e8e8;
        }

        body.dark-mode .worksheet-header {
            border-color: #82E0AA;
        }

        body.dark-mode .worksheet-title {
            color: #82E0AA;
        }

        body.dark-mode .text-content {
            color: #e8e8e8;
        }

        body.dark-mode .question {
            background: #3d405b;
            border-left-color: #82E0AA;
        }

        body.dark-mode .question-text {
            color: #82E0AA;
        }

        body.dark-mode .answer-input {
            background: #2d3142;
            border-color: #3d405b;
            color: #e8e8e8;
        }

        body.dark-mode .answer-input:focus {
            border-color: #82E0AA;
        }

        body.dark-mode .word-search {
            background: #3d405b;
        }

        body.dark-mode .word-search h3 {
            color: #82E0AA;
        }

        body.dark-mode .letter-cell {
            background: #2d3142;
            border-color: #5DADE2;
            color: #5DADE2;
        }

        body.dark-mode .letter-cell:hover {
            background: #5DADE2;
            color: white;
        }

        body.dark-mode .letter-cell.found {
            background: #82E0AA;
            color: white;
            border-color: #82E0AA;
        }

        body.dark-mode .word-item {
            background: #2d3142;
            border-color: #5DADE2;
            color: #5DADE2;
        }

        body.dark-mode .word-item.found {
            background: #82E0AA;
            border-color: #82E0AA;
            color: white;
        }

        body.dark-mode .stats {
            background: #3d405b;
            color: #82E0AA;
        }

        body.dark-mode .dark-mode-toggle {
            background: rgba(130, 224, 170, 0.15);
            border-color: rgba(130, 224, 170, 0.3);
        }

        body.dark-mode .dark-mode-toggle:hover {
            background: rgba(130, 224, 170, 0.25);
            border-color: rgba(130, 224, 170, 0.5);
        }

        body.dark-mode .footer {
            background: rgba(45, 49, 66, 0.8);
            color: #e8e8e8;
        }

        body.dark-mode .footer a {
            color: #82E0AA;
        }

        body.dark-mode .footer a:hover {
            color: #5DADE2;
        }

        body.dark-mode .donation-link {
            background: linear-gradient(135deg, #F7DC6F 0%, #F5B041 100%);
            color: #1a1a2e !important;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes slideUp {
            from {
                transform: translateY(30px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        @media print {
            * {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color: #000 !important;
            }
            body {
                background: white !important;
                padding: 0;
                margin: 0;
            }
            .container {
                max-width: 100%;
            }
            .selector-panel,
            .action-buttons,
            .stats,
            .header,
            .footer {
                display: none !important;
            }
            .worksheet {
                box-shadow: none;
                padding: 25px;
                page-break-after: always;
                max-width: 100%;
                margin: 0;
                border: 3px dashed #000;
                position: relative;
                min-height: 0;
                background: white !important;
            }
            .worksheet-header {
                border: none;
                padding: 8px 0;
                margin-bottom: 15px;
                text-align: center;
                background: white !important;
            }
            .worksheet-header::after {
                content: "leerjugando.byronlainez.click";
                display: block;
                font-size: 0.45em;
                color: #666;
                margin-top: 3px;
                font-weight: normal;
            }
            .worksheet-header p {
                display: none;
            }
            .worksheet-title {
                color: #000 !important;
                font-size: 1.6em;
                font-weight: bold;
                text-transform: uppercase;
                margin: 0;
            }
            .content-section {
                display: block;
                margin-bottom: 15px;
            }
            .topic-illustration {
                font-size: 7em;
                animation: none;
                display: block;
                text-align: center;
                line-height: 1;
                margin: 10px auto;
                width: fit-content;
            }
            .text-content {
                font-size: 0.9em;
                line-height: 1.5;
                color: #000 !important;
                text-align: justify;
            }
            .questions {
                margin-top: 15px;
                margin-bottom: 15px;
            }
            .questions h3 {
                display: none;
            }
            .question {
                background: white !important;
                border: none;
                padding: 0;
                margin-bottom: 10px;
            }
            .question-text {
                color: #000 !important;
                font-size: 0.85em;
                margin-bottom: 3px;
                font-weight: normal;
            }
            .answer-input {
                border: none;
                border-bottom: 1.5px solid #000;
                background: white !important;
                padding: 2px 0;
                font-size: 0.8em;
                width: 100%;
                height: 18px;
                color: #000 !important;
            }
            .answer-input::placeholder {
                color: transparent !important;
            }
            .word-search {
                background: white !important;
                padding: 12px 0 0 0;
                border-radius: 0;
                margin-top: 15px;
                position: relative;
                display: block;
                page-break-inside: avoid;
            }
            .word-search h3 {
                color: #000 !important;
                font-size: 0.8em;
                margin: 0 0 10px 0;
                text-align: center;
                line-height: 1.3;
            }
            .word-search p {
                display: none;
            }
            .word-search-container {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                gap: 25px;
            }
            .search-grid {
                max-width: 300px;
                width: 300px;
                margin: 0;
                gap: 1px;
                flex-shrink: 0;
            }
            .letter-cell {
                max-width: 35px;
                max-height: 35px;
                min-width: 35px;
                min-height: 35px;
                border: 1.5px solid #000;
                border-radius: 0;
                color: #000 !important;
                background: white !important;
                font-size: 0.9em;
                font-weight: bold;
            }
            .letter-cell.found {
                background: white !important;
                color: #000 !important;
                border-color: #000 !important;
            }
            .words-list {
                display: flex;
                flex-direction: column;
                margin: 0;
                gap: 6px;
                justify-content: flex-start;
                flex-shrink: 0;
                min-width: 140px;
            }
            .word-item {
                background: white !important;
                border: none;
                color: #000 !important;
                padding: 3px 0;
                border-radius: 0;
                display: list-item;
                list-style-position: outside;
                list-style-type: circle;
                margin-left: 18px;
                font-size: 0.85em;
            }
            .word-item.found {
                background: white !important;
                border: none;
                color: #000 !important;
                text-decoration: none;
            }
            .worksheet::after {
                content: "📧 Sugerencias: hola@byronlainez.click";
                display: block;
                text-align: center;
                font-size: 0.7em;
                color: #666;
                margin-top: 15px;
                padding-top: 12px;
                border-top: 1px solid #ddd;
            }
        }

        @media (max-width: 768px) {
            .content-section {
                grid-template-columns: 1fr;
            }
            .topic-illustration {
                font-size: 6em;
            }
            .topics-grid {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }
            .search-grid {
                max-width: 100%;
                gap: 3px;
            }
            .letter-cell {
                max-width: 40px;
                max-height: 40px;
                font-size: 0.85em;
                border-width: 1.5px;
            }
            .header {
                padding-top: 50px;
            }
            .dark-mode-toggle {
                position: absolute;
                top: 5px;
                right: 5px;
                font-size: 0.85em;
                padding: 6px 12px;
            }
            .header h1 {
                font-size: 1.8em;
            }
            .header p {
                font-size: 1em;
            }
            .footer {
                margin-top: 20px;
                padding: 15px;
            }
            .footer p {
                font-size: 0.85em;
            }
            .donation-link {
                display: block;
                margin: 10px auto 0;
                width: fit-content;
            }
        }
