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

        :root {
            --primary: #2563eb;
            --primary-dark: #1e40af;
            --secondary: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-tertiary: #94a3b8;
            --border: #475569;
            --success: #22c55e;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
            --river-blue: #3b82f6;
            --mountain-gray: #6b7280;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Globe Container */
        .globe-container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 400px;
            height: 400px;
            z-index: 0;
            opacity: 0.1;
            pointer-events: none;
        }

        .globe {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, #4a90e2, #1a5490);
            box-shadow: 
                inset -20px -20px 40px rgba(0, 0, 0, 0.5),
                inset 20px 20px 40px rgba(255, 255, 255, 0.1),
                0 0 50px rgba(74, 144, 226, 0.3);
            animation: rotate 30s linear infinite;
            position: relative;
        }

        .globe::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: repeating-linear-gradient(
                90deg,
                transparent,
                transparent 10px,
                rgba(255, 255, 255, 0.03) 10px,
                rgba(255, 255, 255, 0.03) 20px
            );
            animation: rotate 20s linear infinite reverse;
        }

        @keyframes rotate {
            from { transform: rotateY(0deg) rotateX(10deg); }
            to { transform: rotateY(360deg) rotateX(10deg); }
        }

        /* Main Container */
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        /* Header */
        header {
            text-align: center;
            margin-bottom: 40px;
            animation: fadeInDown 0.8s ease;
        }

        .logo-container {
            position: absolute;
            left: 30px;
            top: 25px;
            img {
                width: 198px;
                height: 69px;
            }
        }

        h1 {
            font-size: 3rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 10px;
        }

        .subtitle {
            color: var(--text-secondary);
            font-size: 1.2rem;
        }

        /* Language Selector */
        .language-selector {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 10px;
        }

        .lang-btn {
            padding: 8px 16px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lang-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .lang-btn:hover:not(.active) {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        /* Type Selector */
        .type-selector {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
        }

        .type-btn {
            padding: 12px 30px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            color: var(--text-primary);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.1rem;
            font-weight: 500;
        }

        .type-btn.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .type-btn:hover:not(.active) {
            background: var(--bg-secondary);
            transform: scale(1.05);
        }

        /* Main Content */
        .main-content {
            background: var(--bg-secondary);
            border-radius: 20px;
            padding: 40px;
            box-shadow: var(--shadow-lg);
            animation: fadeInUp 0.8s ease;
        }

        /* Setup Section */
        .setup-section {
            display: grid;
            gap: 30px;
        }

        .section-card {
            background: var(--bg-tertiary);
            padding: 25px;
            border-radius: 15px;
            border: 1px solid var(--border);
            transition: all 0.3s ease;
        }

        /* Presets Section */
        .presets-section {
            margin-bottom: 30px;
        }

        .presets-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }

        .preset-card {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .preset-card:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .preset-info {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .preset-name {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 1rem;
        }

        .preset-type {
            font-size: 0.85rem;
            color: var(--primary);
        }

        .preset-count {
            font-size: 0.85rem;
            color: var(--text-tertiary);
        }

        .load-preset-btn {
            padding: 10px 20px;
            background: var(--primary);
            border: none;
            border-radius: 8px;
            color: white;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .load-preset-btn:hover {
            background: var(--primary-dark);
            transform: scale(1.05);
        }

        .section-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .section-title {
            font-size: 1.3rem;
            margin-bottom: 20px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Region Selection */
        .regions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .region-chip {
            padding: 12px 20px;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-weight: 500;
        }

        .region-chip:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: scale(1.05);
        }

        .region-chip.selected {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        /* Country Selection */
        .countries-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
            margin-top: 15px;
            max-height: 200px;
            overflow-y: auto;
            padding: 10px;
            background: var(--bg-secondary);
            border-radius: 10px;
        }

        .country-chip {
            padding: 8px 15px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-size: 0.9rem;
        }

        .country-chip:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: scale(1.05);
        }

        .country-chip.selected {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        /* Search and Manual Selection */
        .search-container {
            position: relative;
            margin-bottom: 20px;
        }

        .search-input {
            width: 100%;
            padding: 15px 20px;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .items-list {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--bg-secondary);
        }

        .item {
            padding: 12px 20px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .item:hover {
            background: var(--bg-tertiary);
            padding-left: 30px;
        }

        .item.selected {
            background: var(--primary);
            color: white;
        }

        .item:last-child {
            border-bottom: none;
        }

        .item-type {
            display: inline-block;
            padding: 2px 8px;
            background: var(--bg-tertiary);
            border-radius: 12px;
            font-size: 0.8rem;
            margin-left: 10px;
        }

        .item.selected .item-type {
            background: rgba(255, 255, 255, 0.2);
        }

        .item-details {
            font-size: 0.85rem;
            opacity: 0.7;
        }

        /* Configuration */
        .config-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .config-item {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .config-label {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        .config-select {
            padding: 10px 15px;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .config-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* Start Button */
        .start-btn {
            width: 100%;
            padding: 18px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.2rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 30px;
        }

        .start-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .start-btn:active {
            transform: translateY(0);
        }

        /* Map Modal */
        .map-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            animation: fadeIn 0.3s ease;
        }

        .map-container {
            position: relative;
            width: 95%;
            height: 95%;
            max-width: 1400px;
            margin: 2.5% auto;
            background: var(--bg-secondary);
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .map-header {
            padding: 20px;
            background: var(--bg-tertiary);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        .map-title {
            font-size: 1.5rem;
            font-weight: 600;
        }

        .map-controls {
            display: flex;
            gap: 10px;
        }

        .close-map, .view-all-map {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .close-map {
            background: var(--danger);
        }

        .close-map:hover {
            background: #dc2626;
        }

        .view-all-map {
            background: var(--primary);
        }

        .view-all-map:hover {
            background: var(--primary-dark);
        }

        .map-content {
            flex: 1;
            position: relative;
        }

        #world-map {
            width: 100%;
            height: 100%;
        }

        /* Learning Phase */
        .learning-phase {
            display: none;
            text-align: center;
        }

        .timer-display {
            font-size: 4rem;
            font-weight: 700;
            color: var(--primary);
            margin: 30px 0;
            font-variant-numeric: tabular-nums;
        }

        .items-display {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 15px;
            margin: 30px 0;
            max-height: 400px;
            overflow-y: auto;
            padding: 20px;
            background: var(--bg-tertiary);
            border-radius: 15px;
        }

        .item-card {
            padding: 15px;
            background: var(--bg-secondary);
            border-radius: 10px;
            border: 1px solid var(--border);
            animation: slideIn 0.5s ease;
            transition: all 0.3s ease;
        }

        .item-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .item-name {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 5px;
        }

        .item-location {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 5px;
        }

        .item-extra {
            font-size: 0.85rem;
            color: var(--text-tertiary);
        }

        .view-map-btn {
            margin-top: 10px;
            padding: 8px 16px;
            background: var(--river-blue);
            border: none;
            border-radius: 6px;
            color: white;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.3s ease;
            width: 100%;
        }

        .view-map-btn:hover {
            background: #2563eb;
            transform: scale(1.02);
        }

        /* Quiz Phase */
        .quiz-phase {
            display: none;
        }

        .question-container {
            background: var(--bg-tertiary);
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            text-align: center;
        }

        .question-text {
            font-size: 1.5rem;
            margin-bottom: 20px;
        }

        .question-timer {
            font-size: 2rem;
            font-weight: 700;
            color: var(--warning);
            margin-bottom: 20px;
        }

        .options-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .option-btn {
            padding: 20px;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .option-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: scale(1.02);
        }

        .option-btn.correct {
            background: var(--success);
            border-color: var(--success);
            animation: pulse 0.5s ease;
        }

        .option-btn.incorrect {
            background: var(--danger);
            border-color: var(--danger);
            animation: shake 0.5s ease;
        }

        /* Score Display */
        .score-display {
            display: flex;
            justify-content: space-around;
            padding: 20px;
            background: var(--bg-tertiary);
            border-radius: 15px;
            margin-bottom: 20px;
        }

        .score-item {
            text-align: center;
        }

        .score-label {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 5px;
        }

        .score-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
        }

        /* Results */
        .results-phase {
            display: none;
            text-align: center;
        }

        .results-title {
            font-size: 2.5rem;
            margin-bottom: 30px;
            background: linear-gradient(135deg, var(--success) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .final-score {
            font-size: 4rem;
            font-weight: 700;
            color: var(--primary);
            margin: 20px 0;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }

        .stat-card {
            padding: 20px;
            background: var(--bg-tertiary);
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
        }

        .stat-label {
            color: var(--text-secondary);
            margin-top: 5px;
        }

        .restart-btn {
            padding: 15px 40px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 30px;
        }

        .restart-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        /* Animations */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

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

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 10px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-tertiary);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

        #footer {
            width: 95vw;
            margin: 40px auto 0 auto;
            border-top: 2px solid #96999e;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            #logo {
                display: block;
                width: 175px;
                height: 46.03px;
            }
            .isotipe {
                fill: url(#blue);
            }

            .letters {
                fill: #1d1d1d;
            }
        }
        

        /* Responsive */
        @media (max-width: 1024px) {
            h1 {
                font-size: 2rem;
            }
            .logo-container {
                top: 10px;
                left: 15px;
                img {
                    width: 158px;
                    height: 55px;
                }
            }
            header.main-header {
                margin-top: 60px;
            }
            .main-content {
                padding: 20px;
            }

            .options-grid {
                grid-template-columns: 1fr;
            }

            .globe-container {
                width: 300px;
                height: 300px;
            }

            .timer-display {
                font-size: 3rem;
            }

            .map-container {
                width: 98%;
                height: 98%;
                margin: 1% auto;
            }

            .items-display {
                grid-template-columns: 1fr;
            }
        }

        /* Leaflet custom styles */
        .leaflet-popup-content-wrapper {
            background: var(--bg-secondary);
            color: var(--text-primary);
            border-radius: 10px;
        }

        .leaflet-popup-content {
            margin: 15px;
            font-size: 14px;
        }

        .leaflet-popup-tip {
            background: var(--bg-secondary);
        }

        .custom-div-icon {
            background: transparent;
            border: none;
        }

        .river-marker {
            width: 20px;
            height: 20px;
            background: var(--river-blue);
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        }

        .mountain-marker {
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 20px solid var(--mountain-gray);
            filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
        }