        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
            min-height: 100vh;
            padding: 20px;
            color: #ffffff;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: #1a1a1a;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
            overflow: hidden;
            border: 1px solid #333333;
        }

        header {
            background: linear-gradient(135deg, #1a3a52 0%, #0d1f2d 100%);
            color: white;
            padding: 30px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            position: relative;
            border-bottom: 2px solid #0288d1;
        }

        h1 {
            font-family: 'Poppins', sans-serif;
            font-size: 32px;
            font-weight: 600;
            letter-spacing: 0.5px;
            margin: 0;
            color: #ffffff;
        }

        .header-controls {
            position: absolute;
            top: 30px;
            right: 30px;
            display: flex;
            gap: 15px;
            align-items: center;
            z-index: 100;
        }

        .language-dropdown {
            position: relative;
        }

        .language-selected {
            font-size: 28px;
            cursor: pointer;
            padding: 5px 10px;
            border-radius: 8px;
            transition: all 0.3s;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .language-selected:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        .dropdown-arrow {
            font-size: 12px;
            transition: transform 0.3s;
        }

        .language-dropdown.open .dropdown-arrow {
            transform: rotate(180deg);
        }

        .language-options {
            position: absolute;
            top: calc(100% + 5px);
            right: 0;
            background: #2a2a2a;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            padding: 8px;
            min-width: 150px;
            display: none;
            z-index: 1000;
            border: 1px solid #444444;
        }

        .language-dropdown.open .language-options {
            display: block;
        }

        .language-option {
            padding: 10px 15px;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #ffffff;
            font-size: 14px;
        }

        .language-option:hover {
            background: #0288d1;
        }

        .language-option.active {
            background: #0288d1;
            font-weight: 600;
        }

        .language-option .flag {
            font-size: 20px;
        }

        .info-button {
            font-size: 39px;
            cursor: pointer;
            padding: 5px 5px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            transition: all 0.3s;
            width: 25px;
            height: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .info-button:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            animation: fadeIn 0.3s;
        }

        .modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: #2a2a2a;
            border-radius: 12px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            animation: slideIn 0.3s;
            border: 1px solid #444444;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #0288d1;
        }

        .modal-title {
            font-family: 'Poppins', sans-serif;
            font-size: 24px;
            font-weight: 600;
            color: #ffffff;
        }

        .modal-close {
            font-size: 28px;
            cursor: pointer;
            color: #ffffff;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s;
        }

        .modal-close:hover {
            background: #0288d1;
        }

        .modal-body {
            color: #e0e0e0;
            line-height: 1.8;
            font-size: 15px;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        input:focus,
        .file-input-wrapper:focus-within .file-input-label {
            outline: 2px solid #0288d1;
            outline-offset: 2px;
        }

        /* Smooth scrolling */
        html {
            scroll-behavior: smooth;
        }

        /* Performance optimization */
        * {
            -webkit-tap-highlight-color: transparent;
        }

        .controls {
            padding: 30px;
            background: #252525;
            border-bottom: 2px solid #333333;
        }

        .file-upload {
            margin-bottom: 20px;
        }

        .file-input-wrapper {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        .file-input-wrapper input[type="file"] {
            position: absolute;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        .file-input-label {
            display: block;
            padding: 15px 20px;
            background: #1a1a1a;
            border: 2px dashed #0288d1;
            border-radius: 8px;
            text-align: center;
            color: #0288d1;
            cursor: pointer;
            transition: all 0.3s;
        }

        .file-input-label:hover {
            background: #2a2a2a;
            border-color: #0199d8;
        }

        .settings {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .setting-group {
            display: flex;
            flex-direction: column;
        }

        label {
            font-size: 14px;
            color: #ffffff;
            margin-bottom: 5px;
            font-weight: 500;
        }

        input[type="number"],
        input[type="text"] {
            padding: 10px;
            border: 2px solid #444444;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
            background: #1a1a1a;
            color: #ffffff;
        }

        input[type="number"]:focus,
        input[type="text"]:focus {
            outline: none;
            border-color: #0288d1;
            background: #2a2a2a;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 30px;
            background: #1a1a1a;
        }

        .stat-card {
            background: linear-gradient(135deg, #1a3a52 0%, #0d1f2d 100%);
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            border: 1px solid #0288d1;
        }

        .stat-value {
            font-size: 32px;
            font-weight: bold;
            color: #00d4ff;
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 14px;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .chunks-container {
            padding: 30px;
            background: #1a1a1a;
        }

        .chunk {
            background: #252525;
            border: 2px solid #333333;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            transition: transform 0.2s;
        }

        .chunk:hover {
            transform: translateX(5px);
            border-color: #0288d1;
        }

        .chunk-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid #333333;
        }

        .chunk-title {
            font-weight: bold;
            color: #00d4ff;
            font-size: 16px;
        }

        .chunk-info {
            font-size: 12px;
            color: #999999;
        }

        .chunk-content {
            color: #e0e0e0;
            line-height: 1.6;
            font-size: 14px;
        }

        .overlap {
            background: linear-gradient(120deg, #4a4a00 0%, #3a3a00 100%);
            padding: 2px 4px;
            border-radius: 3px;
            font-weight: 500;
            color: #ffff99;
        }

        .no-data {
            text-align: center;
            padding: 60px 20px;
            color: #999999;
            font-size: 18px;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #0288d1;
        }

        @media (max-width: 768px) {
            body {
                padding: 10px;
            }

            header {
                padding: 20px 15px;
                gap: 12px;
            }

            h1 {
                font-size: 22px;
                padding-right: 80px;
            }

            .header-controls {
                top: 15px;
                right: 15px;
                gap: 10px;
            }

            .language-selected {
                font-size: 24px;
                padding: 4px 8px;
            }

            .info-button {
                font-size: 35px;
                width: 25px;
                height: 25px;
            }

            .modal-content {
                width: 95%;
                padding: 20px;
                max-height: 85vh;
            }

            .modal-title {
                font-size: 20px;
            }

            .modal-body {
                font-size: 14px;
            }

            .controls {
                padding: 20px 15px;
            }

            .settings {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .stats {
                grid-template-columns: 1fr;
                padding: 20px 15px;
                gap: 15px;
            }

            .stat-value {
                font-size: 28px;
            }

            .stat-label {
                font-size: 12px;
            }

            .chunks-container {
                padding: 20px 15px;
            }

            .chunk {
                padding: 15px;
            }

            .chunk-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .chunk-info {
                font-size: 11px;
                word-break: break-word;
            }

            .chunk-content {
                font-size: 13px;
                word-break: break-word;
            }

            input[type="number"],
            input[type="text"] {
                font-size: 16px;
                /* Prevents zoom on iOS */
                padding: 12px;
            }

            .file-input-label {
                padding: 18px 15px;
                font-size: 14px;
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: 18px;
                padding-right: 75px;
            }

            .header-controls {
                gap: 8px;
            }

            .language-selected {
                font-size: 20px;
            }

            .info-button {
                font-size: 25px;
                width: 25px;
                height: 25px;
            }

            .stat-value {
                font-size: 24px;
            }

            .chunk-title {
                font-size: 14px;
            }
        }

        /* Touch-friendly improvements */
        @media (hover: none) and (pointer: coarse) {

            .language-selected,
            .info-button {
                min-width: 44px;
                min-height: 44px;
            }

            .language-option {
                min-height: 44px;
            }

            .chunk {
                margin-bottom: 20px;
            }

            input[type="number"],
            input[type="text"] {
                min-height: 44px;
                /* iOS minimum touch target */
            }

            .file-input-label {
                min-height: 60px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }