        /* Google Fonts are now preloaded in HTML head for better performance */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans', Arial, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 10px;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        /* Logo Header Styles */
        .logo-header {
            text-align: center;
            padding: 20px 10px 30px 10px;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }

        .logo-container {
            position: relative;
            display: inline-block;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(102, 126, 234, 0.95) 100%);
            border-radius: 25px;
            padding: 25px 35px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .logo-container:hover {
            transform: translateY(-3px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
        }

        .logo-main {
            display: flex;
            align-items: center;
            gap: 20px;
            position: relative;
            z-index: 2;
        }

        .logo-icon {
            position: relative;
            width: 80px;
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mystery-char {
            font-size: 48px;
            font-weight: bold;
            color: #FFD700;
            text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
            animation: mysteryPulse 3s ease-in-out infinite;
        }

        .floating-chars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .float-char {
            position: absolute;
            font-size: 16px;
            font-weight: bold;
            color: rgba(255, 255, 255, 0.8);
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
            animation: floatOrbit 6s linear infinite;
            animation-delay: var(--delay);
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
        }

        .logo-text {
            text-align: left;
        }

        .site-title {
            font-size: 32px;
            font-weight: bold;
            color: white;
            margin: 0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            letter-spacing: -1px;
        }

        .highlight {
            color: #FFD700;
            text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
        }

        .site-url {
            font-size: 18px;
            color: #FFD700;
            font-weight: bold;
            margin: -5px 0 8px 0;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .logo-tagline {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.9);
            font-style: italic;
            margin-bottom: 12px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .script-showcase {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-start;
        }

        .script {
            font-size: 12px;
            padding: 3px 8px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            color: white;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
        }

        .script:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }

        .script.telugu { border-left: 3px solid #ff6b6b; }
        .script.hindi { border-left: 3px solid #45b7d1; }
        .script.hebrew { border-left: 3px solid #4ecdc4; }
        .script.arabic { border-left: 3px solid #96ceb4; }
        .script.greek { border-left: 3px solid #feca57; }
        .script.english { border-left: 3px solid #667eea; }

        .logo-glow {
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
            animation: logoGlow 4s ease-in-out infinite;
            pointer-events: none;
        }

  

        /* Mobile responsive logo */
        @media (max-width: 768px) {
            .logo-header {
                padding: 15px 5px 20px 5px;
                margin-bottom: 15px;
            }

            .logo-container {
                padding: 20px 25px;
                border-radius: 20px;
            }

            .logo-main {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }

            .logo-icon {
                width: 60px;
                height: 60px;
            }

            .mystery-char {
                font-size: 36px;
            }

            .float-char {
                font-size: 14px;
            }

            .logo-text {
                text-align: center;
            }

            .site-title {
                font-size: 24px;
            }

            .site-url {
                font-size: 16px;
            }

            .logo-tagline {
                font-size: 12px;
                margin-bottom: 10px;
            }

            .script-showcase {
                justify-content: center;
                gap: 6px;
            }

            .script {
                font-size: 10px;
                padding: 2px 6px;
            }
        }

        @media (max-width: 480px) {
            .logo-container {
                padding: 15px 20px;
            }

            .site-title {
                font-size: 20px;
            }

            .site-url {
                font-size: 14px;
            }

            .logo-tagline {
                font-size: 11px;
            }

            .script {
                font-size: 9px;
                padding: 2px 5px;
            }
        }

        /* Hide logo during calculation */
        .logo-header.hide-during-calculation {
            display: none !important;
        }

        /* Examples Popup Styles */
        .examples-popup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .examples-popup.show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .examples-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            border: 2px solid rgba(255, 255, 255, 0.3);
            animation: popupSlideIn 0.5s ease-out;
        }

        .examples-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .examples-header h3 {
            color: #FFD700;
            font-size: 28px;
            margin: 0 0 10px 0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .examples-header p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 16px;
            margin: 0;
        }

        .examples-cta {
            display: flex;
            align-items: center;
            gap: 20px;
            margin: 30px 0;
            padding: 25px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            border: 2px solid rgba(255, 215, 0, 0.3);
        }

        .examples-icon {
            font-size: 48px;
            animation: bounce 2s infinite;
        }

        .examples-message {
            flex: 1;
        }

        .examples-title {
            color: #FFD700;
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 8px;
        }

        .examples-subtitle {
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            line-height: 1.4;
        }


        .examples-footer {
            text-align: center;
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .go-examples-btn {
            background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
            flex: 1;
            max-width: 200px;
        }

        .go-examples-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
        }

        .close-examples-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            padding: 12px 25px;
            border-radius: 25px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            flex: 1;
            max-width: 150px;
        }

        .close-examples-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .mappings-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
            flex: 1;
            max-width: 220px;
        }

        .mappings-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        }

 

        /* Mobile responsive for examples popup */
        @media (max-width: 768px) {
            .examples-popup {
                padding: 10px;
            }

            .examples-content {
                padding: 20px;
                margin: 10px;
                width: calc(100% - 20px);
                max-height: 90vh;
                border-radius: 15px;
            }

            .examples-header h3 {
                font-size: 22px;
                margin-bottom: 8px;
            }

            .examples-header p {
                font-size: 14px;
                margin-bottom: 15px;
            }

            .examples-cta {
                flex-direction: column;
                gap: 15px;
                text-align: center;
                padding: 20px;
            }

            .examples-icon {
                font-size: 40px;
            }

            .examples-title {
                font-size: 18px;
            }

            .examples-subtitle {
                font-size: 13px;
            }

            .examples-footer {
                flex-direction: column;
                gap: 12px;
            }

            .go-examples-btn, .close-examples-btn, .mappings-btn {
                width: 100%;
                max-width: none;
            }
        }

        @media (max-width: 480px) {
            .examples-content {
                padding: 15px;
                margin: 5px;
                width: calc(100% - 10px);
            }

            .examples-header h3 {
                font-size: 20px;
            }

            .example-text {
                font-size: 16px;
            }

            .startup-title {
                font-size: 24px;
            }

            .startup-subtitle {
                font-size: 16px;
            }

            .rain-card {
                font-size: 11px;
                padding: 5px 8px;
            }
        }

        .input-section {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            transition: all 0.5s ease;
        }

        .input-section.hide-during-calculation {
            display: none !important;
        }
        
        .social-sharing-section.hide-during-calculation {
            display: none !important;
        }

        /* FIXED: Prevent layout shifts and text cutoff issues */
        .input-section {
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
        }
        
        .results-section {
            transition: margin-top 0.3s ease;
            position: relative;
            z-index: 1;
        }
        
        /* Ensure smooth transitions when showing/hiding elements */
        .input-section:not(.hide-during-calculation) {
            opacity: 1;
            transform: translateY(0);
        }
        
        .results-section.fullscreen {
            margin-top: 0;
            position: relative;
            z-index: 100;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px 0;
        }
        
        .results-section:not(.fullscreen) {
            margin-top: 20px;
        }
        
        /* Hide elements during calculation for clean experience */
        .hide-during-calculation {
            display: none !important;
        }
        
        /* Calculation mode - hide everything except input and results */
        body.calculation-mode .language-switcher-container,
        body.calculation-mode .bulk-processor-section,
        body.calculation-mode .social-sharing-section,
        body.calculation-mode .try-texts-section,
        body.calculation-mode .logo-header,
        body.calculation-mode #copyrightFooter,
        body.calculation-mode #reopenTryExamples {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            height: 0 !important;
            overflow: hidden !important;
            position: absolute !important;
            left: -9999px !important;
        }
        
        body.calculation-mode {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            min-height: 100vh;
        }
        
        /* Force page to start at top on mobile */
        html {
            scroll-behavior: auto;
        }
        
        body {
            scroll-behavior: auto;
        }
        
        /* Mobile-specific calculation mode */
        @media (max-width: 768px) {
            body.calculation-mode .language-switcher-container,
            body.calculation-mode .bulk-processor-section,
            body.calculation-mode .social-sharing-section,
            body.calculation-mode .try-texts-section,
            body.calculation-mode .logo-header,
            body.calculation-mode #copyrightFooter,
            body.calculation-mode #reopenTryExamples {
                display: none !important;
                visibility: hidden !important;
                opacity: 0 !important;
                height: 0 !important;
                max-height: 0 !important;
                overflow: hidden !important;
                position: fixed !important;
                top: -9999px !important;
                left: -9999px !important;
                z-index: -1 !important;
            }
            
            body.calculation-mode {
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
                min-height: 100vh !important;
                overflow-x: hidden;
            }
            
            body.calculation-mode .input-section {
                background: rgba(255, 255, 255, 0.95) !important;
                border-radius: 15px !important;
                margin: 10px !important;
                padding: 15px !important;
                box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
            }
            
            body.calculation-mode .results-section {
                background: transparent !important;
                padding: 10px !important;
            }
        }
        
        /* Clean input section styling during calculation */
        .results-section.fullscreen ~ .input-section,
        .results-section.fullscreen + .input-section {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 20px;
            margin: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
        }

        .timer-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .animation-header {
            width: 100%;
            text-align: center;
            margin-bottom: 8px;
        }

        .animation-type-label {
            font-size: 12px;
            font-weight: bold;
            color: #333;
            letter-spacing: 0.5px;
            background: rgba(255, 255, 255, 0.8);
            padding: 4px 12px;
            border-radius: 8px;
            border: 2px solid #667eea;
        }

        .animation-controls {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
            flex-wrap: wrap;
            padding: 12px;
            background: rgba(102, 126, 234, 0.9);
            border-radius: 12px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            justify-content: center;
        }

        .animation-group {
            display: flex;
            align-items: center;
        }

        .animation-option {
            display: flex;
            align-items: center;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 8px;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .animation-option:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }

        .animation-option input[type="radio"] {
            display: none;
        }

        .radio-custom {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 2px solid #fff;
            margin-right: 6px;
            position: relative;
            transition: all 0.3s ease;
        }

        .animation-option input[type="radio"]:checked + .radio-custom {
            background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
            border-color: #fff;
            box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
        }

        .animation-option input[type="radio"]:checked + .radio-custom::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: white;
        }

        .animation-name {
            font-size: 13px;
            font-weight: bold;
            color: white;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
            letter-spacing: 0.5px;
        }

        .timer-group {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .timer-group label {
            font-size: 11px;
            font-weight: bold;
            white-space: nowrap;
        }

        .timer-input {
            width: 50px;
            padding: 5px;
            border: 2px solid #ddd;
            border-radius: 8px;
            text-align: center;
            font-size: 12px;
        }

        .text-input {
            width: 100%;
            padding: 15px;
            border: 3px solid transparent;
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) padding-box,
                       linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
            border-radius: 15px;
            font-size: 16px;
            resize: none;
            outline: none;
            box-sizing: border-box;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            line-height: 1.3;
            direction: auto;
            text-align: start;
            unicode-bidi: plaintext;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
        }
        
        .text-input:focus {
            background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%) padding-box,
                       linear-gradient(135deg, #4285f4 0%, #0066cc 100%) border-box;
            box-shadow: 0 12px 35px rgba(66, 133, 244, 0.25);
            transform: translateY(-2px);
        }
        
        .text-input.warning {
            border: 3px solid #FF6B6B;
            background: rgba(255, 107, 107, 0.05);
        }
        
        .word-count-warning {
            margin-top: 8px;
            padding: 8px 12px;
            background: linear-gradient(135deg, #FF6B6B, #FF8E53);
            color: white;
            border-radius: 10px;
            font-size: 12px;
            font-weight: bold;
            text-align: center;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
            display: none;
            animation: warningPulse 2s ease-in-out infinite;
        }
        
        .word-count-warning.text-rejected {
            background: linear-gradient(135deg, #DC3545, #C82333);
            border: 2px solid #FF6B6B;
            box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
            animation: rejectionPulse 1.5s ease-in-out infinite;
        }
        

        .mobile .text-input {
            height: 120px;
        }

        .desktop .text-input {
            height: 80px;
        }

        /* Reverse ordinal checkbox */
        .reverse-ordinal-section {
            margin-top: 10px;
            padding: 10px;
            background: rgba(255, 193, 7, 0.1);
            border-radius: 10px;
            border: 2px solid #FFC107;
        }

        .reverse-ordinal-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .reverse-ordinal-checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .reverse-ordinal-label {
            font-size: 13px;
            font-weight: bold;
            color: #333;
            cursor: pointer;
        }

        .button-group {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            flex-wrap: wrap;
        }

        .btn {
            flex: 1;
            min-width: 100px;
            padding: 12px 20px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            outline: none;
        }

        .calculate-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
            color: white;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
            position: relative;
            overflow: hidden;
        }
        
        .calculate-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.5s ease;
        }
        
        .calculate-btn:hover::before {
            left: 100%;
        }

        .calculate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .clear-btn {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff6b6b 100%);
            color: white;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
            position: relative;
            overflow: hidden;
        }
        
        .clear-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.5s ease;
        }
        
        .clear-btn:hover::before {
            left: 100%;
        }

        .clear-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        /* Additional Text Options */
        .additional-options {
            margin-top: 15px;
            padding: 15px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(106, 90, 205, 0.15) 50%, rgba(255, 255, 255, 0.8) 100%);
            border-radius: 15px;
            border: 2px solid transparent;
            background-clip: padding-box;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
            position: relative;
            overflow: hidden;
        }
        
        .additional-options::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            opacity: 0.1;
            border-radius: 15px;
            z-index: -1;
        }

        .additional-header {
            text-align: center;
            margin-bottom: 10px;
        }

        .additional-label {
            font-size: 13px;
            font-weight: bold;
            color: #333;
            background: rgba(102, 126, 234, 0.1);
            padding: 4px 12px;
            border-radius: 8px;
            border: 1px solid #667eea;
        }

        .additional-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .radio-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .radio-option {
            display: flex;
            align-items: center;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            transition: all 0.3s ease;
            background: rgba(102, 126, 234, 0.1);
            border: 1px solid rgba(102, 126, 234, 0.3);
        }

        .radio-option:hover {
            background: rgba(102, 126, 234, 0.2);
            transform: translateY(-1px);
        }

        .radio-option input[type="radio"] {
            display: none;
        }

        .radio-custom-circle {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid #667eea;
            margin-right: 6px;
            position: relative;
            transition: all 0.3s ease;
        }

        .radio-option input[type="radio"]:checked + .radio-custom-circle {
            background: linear-gradient(45deg, #667eea, #764ba2);
            border-color: #667eea;
            box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
        }

        .radio-option input[type="radio"]:checked + .radio-custom-circle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: white;
        }

        .radio-name {
            font-size: 12px;
            font-weight: bold;
            color: #333;
        }

        .delay-control {
            display: flex;
            align-items: center;
            gap: 5px;
            background: rgba(255, 255, 255, 0.7);
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid #ddd;
        }

        .delay-control label {
            font-size: 11px;
            font-weight: bold;
            white-space: nowrap;
            color: #333;
        }

        .additional-inputs {
            margin-top: 15px;
        }

        .additional-text-group {
            margin-bottom: 15px;
        }
        .additional-text-group label {
            display: block;
            margin-bottom: 5px;
            font-size: 12px;
            font-weight: bold;
            color: #333;
        }

        .additional-text-input {
            height: 80px !important;
            font-size: 13px;
            border: 2px solid #667eea;
        }

        .calculator-search-guide {
            margin: 28px auto 8px;
            padding: 22px 18px 18px;
            max-width: 1100px;
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(106, 90, 205, 0.28);
            color: #1f2937;
            box-shadow: 0 10px 28px rgba(49, 46, 129, 0.12);
        }

        .calculator-search-guide h2 {
            margin: 0 0 8px;
            font-size: 1.35rem;
            text-align: center;
            color: #312e81;
            line-height: 1.3;
        }

        .calculator-search-guide > p {
            margin: 0 auto 16px;
            max-width: 720px;
            text-align: center;
            line-height: 1.5;
        }

        .calculator-guide-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .calculator-guide-grid li {
            background: #f7f5ff;
            border-radius: 14px;
            padding: 12px 14px;
            border: 1px solid rgba(99, 102, 241, 0.16);
        }

        .calculator-guide-grid h3 {
            margin: 0 0 4px;
            font-size: 1rem;
            color: #1e1b4b;
        }

        .calculator-guide-grid p {
            margin: 0;
            font-size: 0.92rem;
            line-height: 1.45;
        }

        .calculator-faq {
            margin-top: 18px;
        }

        .calculator-faq details {
            margin: 8px 0;
            padding: 8px 12px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px solid rgba(15, 23, 42, 0.08);
        }

        .calculator-faq summary {
            cursor: pointer;
            font-weight: 700;
            color: #1e1b4b;
        }

        .calculator-faq details p {
            margin: 8px 0 2px;
            line-height: 1.5;
        }

        /* Language mapping buttons */
        .language-mapping-section {
            margin-top: 8px;
            padding: 25px;
            background: linear-gradient(135deg, rgba(106, 90, 205, 0.18) 0%, rgba(123, 97, 255, 0.15) 50%, rgba(106, 90, 205, 0.12) 100%);
            border-radius: 25px;
            border: 2px solid rgba(106, 90, 205, 0.4);
            backdrop-filter: blur(15px);
            box-shadow: 0 12px 35px rgba(106, 90, 205, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: fit-content;
            padding: 15px 0;
        }

        /* Removed ::before pseudo-element that was causing unwanted strip above language mapping section */

        .language-mapping-header {
            text-align: center;
            margin-bottom: 22px;
            position: relative;
            z-index: 1;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .language-mapping-label {
            font-size: 15px;
            font-weight: 700;
            color: #1a1a1a;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(106, 90, 205, 0.15) 50%, rgba(255, 255, 255, 0.8) 100%);
            padding: 12px 25px;
            border-radius: 18px;
            border: 2px solid rgba(106, 90, 205, 0.5);
            box-shadow: 0 6px 20px rgba(106, 90, 205, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(15px);
            position: relative;
            z-index: 1;
        }

        .language-buttons {
            display: flex;
            gap: 18px;
            flex-wrap: wrap;
            justify-content: center;
            position: relative;
            z-index: 1;
            margin-top: 12px;
            align-items: flex-start;
            align-content: center;
            min-height: fit-content;
            padding: 15px 0;
        }

        /* Beautiful colorful language mapping buttons */
        .language-btn {
            padding: 15px 22px;
            border: none;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            color: white;
            text-shadow: 0 2px 4px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.3);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(15px);
            border: 2px solid rgba(255, 255, 255, 0.3);
            min-width: 150px;
            max-width: 200px;
            text-align: center;
            transform: translateY(0);
            letter-spacing: 0.5px;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            height: 55px;
            flex: 0 1 auto;
            flex-wrap: nowrap;
            gap: 8px;
        }

        /* Add beautiful gradient backgrounds before the pseudo-element */
        .language-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transform: translateX(-100%);
            transition: transform 0.8s ease;
            z-index: 1;
        }

        .language-btn::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            border-radius: 28px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
            pointer-events: none;
            z-index: 0;
        }

        .language-btn:hover::before {
            transform: translateX(100%);
        }

        /* Language-specific beautiful color schemes */
        .language-btn.telugu,
        .language-btn[data-language="telugu"] {
            background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 25%, #FF6B9D 50%, #FF4757 75%, #FF6B6B 100%);
            box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5), 0 4px 12px rgba(255, 107, 107, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.hindi,
        .language-btn[data-language="hindi"] {
            background: linear-gradient(to bottom, #FF9933 0% 33%, #FFFFFF 33% 67%, #138808 67% 100%);
            color: #0C2340;
            text-shadow: none;
            box-shadow: 0 8px 25px rgba(255, 153, 51, 0.45), 0 4px 12px rgba(19, 136, 8, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.75);
        }

        .language-btn.hindi::after,
        .language-btn[data-language="hindi"]::after {
            background: none;
        }

        .language-btn.hebrew,
        .language-btn[data-language="hebrew"] {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #5a67d8 50%, #6366f1 75%, #667eea 100%);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 4px 12px rgba(102, 126, 234, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.arabic,
        .language-btn[data-language="arabic"] {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 25%, #e91e63 50%, #4facfe 75%, #f093fb 100%);
            box-shadow: 0 8px 25px rgba(240, 147, 251, 0.5), 0 4px 12px rgba(240, 147, 251, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.greek,
        .language-btn[data-language="greek"] {
            background: linear-gradient(135deg, #43e97b 0%, #38f9d7 25%, #00d4aa 50%, #20bf6b 75%, #43e97b 100%);
            box-shadow: 0 8px 25px rgba(67, 233, 123, 0.5), 0 4px 12px rgba(67, 233, 123, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.english,
        .language-btn[data-language="english"],
        .language-btn[data-language="english-reverse"] {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 25%, #ffd32a 50%, #ff9ff3 75%, #fa709a 100%);
            box-shadow: 0 8px 25px rgba(250, 112, 154, 0.5), 0 4px 12px rgba(250, 112, 154, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.tamil,
        .language-btn[data-language="tamil"] {
            background: linear-gradient(135deg, #C2410C 0%, #F59E0B 25%, #9A3412 50%, #FBBF24 75%, #EA580C 100%);
            box-shadow: 0 8px 25px rgba(234, 88, 12, 0.55), 0 4px 12px rgba(245, 158, 11, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.malayalam,
        .language-btn[data-language="malayalam"] {
            background: linear-gradient(135deg, #047857 0%, #10B981 25%, #0E7490 50%, #34D399 75%, #065F46 100%);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5), 0 4px 12px rgba(14, 116, 144, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.thai,
        .language-btn[data-language="thai"] {
            background: linear-gradient(135deg, #BE123C 0%, #F4C430 28%, #1D4ED8 55%, #E11D48 78%, #F59E0B 100%);
            box-shadow: 0 8px 25px rgba(190, 18, 60, 0.5), 0 4px 12px rgba(29, 78, 216, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        .language-btn.chinese-stroke,
        .language-btn[data-language="chinese-stroke"] {
            background: linear-gradient(135deg, #B91C1C 0%, #FDE68A 25%, #991B1B 50%, #FBBF24 75%, #DC2626 100%);
            box-shadow: 0 8px 25px rgba(185, 28, 28, 0.55), 0 4px 12px rgba(251, 191, 36, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.4);
        }

        /* Enhanced hover effects */
        .language-btn:hover {
            transform: translateY(-10px) scale(1.08);
            box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.6);
            text-shadow: 0 2px 6px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.4);
        }

        .language-btn.telugu:hover,
        .language-btn[data-language="telugu"]:hover {
            box-shadow: 0 20px 45px rgba(255, 107, 107, 0.7), 0 10px 20px rgba(255, 107, 107, 0.4), 0 0 35px rgba(255, 107, 107, 0.3);
            background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 25%, #FF6B9D 50%, #FF4757 75%, #FF8E53 100%);
        }

        .language-btn.hindi:hover,
        .language-btn[data-language="hindi"]:hover {
            color: #0C2340;
            text-shadow: none;
            box-shadow: 0 20px 45px rgba(255, 153, 51, 0.65), 0 10px 20px rgba(19, 136, 8, 0.4), 0 0 35px rgba(255, 153, 51, 0.3);
            background: linear-gradient(to bottom, #FF8800 0% 33%, #FFFFFF 33% 67%, #0E7A06 67% 100%);
        }

        .language-btn.hebrew:hover,
        .language-btn[data-language="hebrew"]:hover {
            box-shadow: 0 20px 45px rgba(102, 126, 234, 0.7), 0 10px 20px rgba(102, 126, 234, 0.4), 0 0 35px rgba(102, 126, 234, 0.3);
            background: linear-gradient(135deg, #764ba2 0%, #667eea 25%, #5a67d8 50%, #6366f1 75%, #764ba2 100%);
        }

        .language-btn.arabic:hover,
        .language-btn[data-language="arabic"]:hover {
            box-shadow: 0 20px 45px rgba(240, 147, 251, 0.7), 0 10px 20px rgba(240, 147, 251, 0.4), 0 0 35px rgba(240, 147, 251, 0.3);
            background: linear-gradient(135deg, #f5576c 0%, #f093fb 25%, #e91e63 50%, #4facfe 75%, #f5576c 100%);
        }

        .language-btn.greek:hover,
        .language-btn[data-language="greek"]:hover {
            box-shadow: 0 20px 45px rgba(67, 233, 123, 0.7), 0 10px 20px rgba(67, 233, 123, 0.4), 0 0 35px rgba(67, 233, 123, 0.3);
            background: linear-gradient(135deg, #38f9d7 0%, #43e97b 25%, #00d4aa 50%, #20bf6b 75%, #38f9d7 100%);
        }

        .language-btn.english:hover,
        .language-btn[data-language="english"]:hover,
        .language-btn[data-language="english-reverse"]:hover {
            box-shadow: 0 20px 45px rgba(250, 112, 154, 0.7), 0 10px 20px rgba(250, 112, 154, 0.4), 0 0 35px rgba(250, 112, 154, 0.3);
            background: linear-gradient(135deg, #fee140 0%, #fa709a 25%, #ffd32a 50%, #ff9ff3 75%, #fee140 100%);
        }

        .language-btn.tamil:hover,
        .language-btn[data-language="tamil"]:hover {
            box-shadow: 0 20px 45px rgba(234, 88, 12, 0.7), 0 10px 20px rgba(245, 158, 11, 0.45), 0 0 35px rgba(251, 191, 36, 0.35);
            background: linear-gradient(135deg, #F59E0B 0%, #EA580C 25%, #FBBF24 50%, #9A3412 75%, #F59E0B 100%);
        }

        .language-btn.malayalam:hover,
        .language-btn[data-language="malayalam"]:hover {
            box-shadow: 0 20px 45px rgba(16, 185, 129, 0.7), 0 10px 20px rgba(14, 116, 144, 0.4), 0 0 35px rgba(52, 211, 153, 0.35);
            background: linear-gradient(135deg, #34D399 0%, #047857 25%, #22D3EE 50%, #065F46 75%, #10B981 100%);
        }

        .language-btn.thai:hover,
        .language-btn[data-language="thai"]:hover {
            box-shadow: 0 20px 45px rgba(190, 18, 60, 0.7), 0 10px 20px rgba(29, 78, 216, 0.4), 0 0 35px rgba(244, 196, 48, 0.4);
            background: linear-gradient(135deg, #F4C430 0%, #BE123C 25%, #2563EB 50%, #E11D48 75%, #F59E0B 100%);
        }

        .language-btn.chinese-stroke:hover,
        .language-btn[data-language="chinese-stroke"]:hover {
            box-shadow: 0 20px 45px rgba(185, 28, 28, 0.7), 0 10px 20px rgba(251, 191, 36, 0.45), 0 0 35px rgba(253, 230, 138, 0.35);
            background: linear-gradient(135deg, #FDE68A 0%, #DC2626 25%, #FBBF24 50%, #991B1B 75%, #FDE68A 100%);
        }

        /* Try Examples Floating Button Styling */
        .try-examples-floating-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transform: translateX(-100%);
            transition: transform 0.8s ease;
            z-index: 1;
        }

        .try-examples-floating-btn::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            border-radius: 28px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
            pointer-events: none;
            z-index: 0;
        }

        .try-examples-floating-btn:hover {
            transform: translateY(-10px) scale(1.08);
            box-shadow: 0 20px 45px rgba(250, 112, 154, 0.7), 0 10px 20px rgba(250, 112, 154, 0.4), 0 0 35px rgba(250, 112, 154, 0.3);
            background: linear-gradient(135deg, #fee140 0%, #fa709a 25%, #ffd32a 50%, #ff9ff3 75%, #fee140 100%);
            border: 2px solid rgba(255, 255, 255, 0.6);
            text-shadow: 0 2px 6px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.4);
        }

        .try-examples-floating-btn:hover::before {
            transform: translateX(100%);
        }

        /* Active state for language buttons */
        .language-btn.active {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 25px 50px rgba(66, 133, 244, 0.6), 0 12px 25px rgba(66, 133, 244, 0.4), 0 0 50px rgba(255, 215, 0, 0.4);
            border: 3px solid #FFD700 !important;
            animation: activeGlow 2s ease-in-out infinite alternate;
            text-shadow: 0 3px 6px rgba(0,0,0,0.8), 0 1px 3px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.3);
            z-index: 10;
            position: relative;
        }

        /* Active state specifically for welcome screen language buttons */
        #languageSelectionStep .language-btn.active {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 25px 50px rgba(66, 133, 244, 0.6), 0 0 50px rgba(66, 133, 244, 0.4);
            border: 3px solid #FFD700 !important;
            animation: welcomeActiveGlow 1.5s ease-in-out infinite alternate;
            z-index: 10;
            position: relative;
        }

        /* Special glow animation for welcome screen active buttons */
        @keyframes welcomeActiveGlow {
            0% { 
                box-shadow: 0 25px 50px rgba(66, 133, 244, 0.6), 0 0 50px rgba(66, 133, 244, 0.4);
                border-color: #FFD700;
            }
            100% { 
                box-shadow: 0 30px 60px rgba(66, 133, 244, 0.8), 0 0 60px rgba(66, 133, 244, 0.6);
                border-color: #FFA500;
            }
        }

        /* Add a checkmark to selected welcome button */
        #languageSelectionStep .language-btn.active::after {
            content: '✓';
            position: absolute;
            top: -10px;
            right: -10px;
            background: #FFD700;
            color: #333;
            font-weight: bold;
            font-size: 16px;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
            animation: checkmarkPulse 0.6s ease-out;
        }

        @keyframes checkmarkPulse {
            0% { transform: scale(0); opacity: 0; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }

        @keyframes activeGlow {
            0% { 
                box-shadow: 0 25px 50px rgba(66, 133, 244, 0.6), 0 12px 25px rgba(66, 133, 244, 0.4), 0 0 50px rgba(255, 215, 0, 0.4);
                border-color: #FFD700;
            }
            50% { 
                box-shadow: 0 30px 60px rgba(66, 133, 244, 0.8), 0 15px 30px rgba(66, 133, 244, 0.6), 0 0 60px rgba(255, 215, 0, 0.6);
                border-color: #FFA500;
            }
            100% { 
                box-shadow: 0 35px 70px rgba(66, 133, 244, 0.9), 0 18px 35px rgba(66, 133, 244, 0.7), 0 0 70px rgba(255, 215, 0, 0.7);
                border-color: #FF8C00;
            }
        }

        /* Lang switch buttons styles - MAXIMUM specificity to override all defaults */
        .language-switcher-container .lang-switch-btn,
        .language-switcher-options .lang-switch-btn,
        button.lang-switch-btn,
        button[data-lang].lang-switch-btn,
        .lang-switch-btn {
            /* Force immediate styling to prevent unstyled flash */
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
            border: 1px solid rgba(102, 126, 234, 0.4) !important;
            border-radius: 6px !important;
            padding: 8px 12px !important;
            cursor: pointer !important;
            transition: all 0.2s ease !important;
            font-size: 13px !important;
            font-weight: 500 !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            color: #2c3e50 !important;
            margin: 2px !important;
            backdrop-filter: blur(15px) !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
            text-decoration: none !important;
            position: relative !important;
            overflow: hidden !important;
            min-width: 90px !important;
            min-height: 40px !important;
            justify-content: center !important;
            text-align: center !important;
            outline: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            appearance: none !important;
            font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Sans', Arial, sans-serif !important;
            text-transform: none !important;
            letter-spacing: normal !important;
            vertical-align: middle !important;
            line-height: 1.3 !important;
            /* Prevent any browser default button styling */
            background-clip: padding-box !important;
            white-space: nowrap !important;
            user-select: none !important;
            /* Ensure flags display properly */
            font-feature-settings: "liga" 1, "kern" 1 !important;
            text-rendering: optimizeLegibility !important;
            /* Force emoji rendering */
            -webkit-font-feature-settings: "liga" 1, "kern" 1 !important;
            -moz-font-feature-settings: "liga" 1, "kern" 1 !important;
            font-variant-emoji: emoji !important;
        }

        /* Ensure emoji flags display properly on all platforms */
        .lang-switch-btn::before,
        .lang-switch-btn::after {
            font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Twemoji', 'EmojiOne Color', sans-serif !important;
            font-variant-emoji: emoji !important;
            -webkit-font-feature-settings: "liga" 1 !important;
            -moz-font-feature-settings: "liga" 1 !important;
            font-feature-settings: "liga" 1 !important;
        }

        /* Force emoji rendering for the entire button content */
        .lang-switch-btn {
            font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Twemoji', 'EmojiOne Color', 'Noto Sans', Arial, sans-serif !important;
        }


        /* Ensure emoji flags display properly in language buttons */
        .lang-flag {
            font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Color', 'Twemoji', 'Segoe UI Symbol', 'Symbola', 'Arial Unicode MS', sans-serif !important;
            font-size: 20px !important;
            line-height: 1 !important;
            display: inline-block !important;
            font-variant-emoji: emoji !important;
            -webkit-font-feature-settings: "liga" 1 !important;
            -moz-font-feature-settings: "liga" 1 !important;
            font-feature-settings: "liga" 1 !important;
            text-rendering: optimizeLegibility !important;
            -webkit-text-stroke: 0.01em transparent !important;
            /* Force emoji rendering */
            unicode-bidi: bidi-override !important;
            direction: ltr !important;
            /* Fallback for systems without emoji support */
            color: #333 !important;
        }

        /* Simple desktop flag solution - just hide original text */
        @media (min-width: 769px) {
            .lang-flag {
                display: none !important;
            }
        }

        /* Hover effects */
        .lang-switch-btn:hover,
        button.lang-switch-btn:hover,
        .language-switcher-container .lang-switch-btn:hover,
        .language-switcher-options .lang-switch-btn:hover,
        button[data-lang].lang-switch-btn:hover {
            background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%) !important;
            transform: translateY(-4px) scale(1.05) !important;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25) !important;
            border-color: rgba(102, 126, 234, 0.8) !important;
        }

        /* CRITICAL: Active state with maximum specificity - this MUST override hover */
        .lang-switch-btn.active,
        button.lang-switch-btn.active,
        .language-switcher-container .lang-switch-btn.active,
        .language-switcher-options .lang-switch-btn.active,
        button[data-lang].lang-switch-btn.active,
        .lang-switch-btn[data-lang].active,
        button[data-lang].lang-switch-btn.active,
        .lang-switch-btn[data-lang="en"].active,
        .lang-switch-btn[data-lang="te"].active,
        .lang-switch-btn[data-lang="hi"].active,
        .lang-switch-btn[data-lang="he"].active,
        .lang-switch-btn[data-lang="ar"].active,
        .lang-switch-btn[data-lang="el"].active {
            background: linear-gradient(135deg, #4285f4 0%, #0066cc 100%) !important;
            color: white !important;
            border: 2px solid #1565c0 !important;
            transform: none !important;
            box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3) !important;
            font-weight: 600 !important;
            position: relative !important;
            z-index: 2 !important;
            /* Fast transition for immediate feedback */
            transition: all 0.1s ease !important;
            will-change: transform, background, box-shadow !important;
        }

        /* Active state hover - maintain active styling even on hover */
        .lang-switch-btn.active:hover,
        button.lang-switch-btn.active:hover,
        .language-switcher-container .lang-switch-btn.active:hover,
        .language-switcher-options .lang-switch-btn.active:hover,
        button[data-lang].lang-switch-btn.active:hover {
            background: linear-gradient(135deg, #4285f4 0%, #00c851 100%) !important;
            color: white !important;
            border: 3px solid #1565c0 !important;
            transform: scale(1.08) !important;
            box-shadow: 0 12px 35px rgba(66, 133, 244, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
        }

        /* Enhanced pseudo-elements for active buttons */
        .lang-switch-btn.active::before,
        button.lang-switch-btn.active::before,
        .language-switcher-container .lang-switch-btn.active::before,
        .language-switcher-options .lang-switch-btn.active::before,
        button[data-lang].lang-switch-btn.active::before {
            content: '✓ ';
            font-weight: bold;
            color: #ffd700;
            text-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 2px 4px rgba(0, 0, 0, 0.3);
            font-size: 16px;
        }

        .lang-switch-btn.active::after,
        button.lang-switch-btn.active::after,
        .language-switcher-container .lang-switch-btn.active::after,
        .language-switcher-options .lang-switch-btn.active::after,
        button[data-lang].lang-switch-btn.active::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
            animation: shimmer 2s infinite;
            pointer-events: none;
            border-radius: 25px;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* Container styles */
        .language-switcher-container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 25px 30px;
            margin: 20px 0;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .language-switcher-header {
            font-size: 18px;
            font-weight: bold;
            color: white;
            margin-bottom: 20px;
            text-align: center;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .language-switcher-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            align-items: center;
        }

        /* Mobile responsive styles for language switcher */
        @media (max-width: 768px) {
            .language-switcher-container {
                margin: 15px 0 !important;
                padding: 20px 15px !important;
            }
            
            .language-switcher-header {
                font-size: 16px !important;
                margin-bottom: 15px !important;
            }
            
            .language-switcher-options {
                gap: 8px !important;
            }
            
            .lang-switch-btn {
                padding: 10px 16px !important;
                font-size: 14px !important;
                margin: 3px !important;
                min-width: 110px !important;
            }
        }

        @media (max-width: 480px) {
            .language-switcher-options {
                gap: 6px !important;
            }
            
            .lang-switch-btn {
                padding: 8px 14px !important;
                font-size: 13px !important;
                gap: 8px !important;
                min-width: 100px !important;
            }
        }

        /* Try Texts Section */
        .try-texts-section {
            margin-top: 20px;
            padding: 20px;
            background: rgba(255, 193, 7, 0.1);
            border-radius: 20px;
            border: 3px solid #FFC107;
            box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
        }

        .try-texts-header {
            text-align: center;
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            position: relative;
        }

        .try-texts-close:hover {
            background: rgba(255, 107, 107, 1) !important;
            transform: scale(1.1);
        }

        .try-texts-label {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            background: rgba(255, 193, 7, 0.2);
            padding: 8px 20px;
            border-radius: 12px;
            border: 2px solid #FFC107;
            display: inline-block;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .try-texts-subtitle {
            margin-top: 10px;
            font-size: 13px;
            color: #666;
            font-style: italic;
        }

        .example-pairs-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .example-pair-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 20px;
            border: 2px solid rgba(255, 193, 7, 0.3);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            position: relative;
        }

        .example-pair-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            border-color: #FFC107;
        }

        .example-texts {
            margin-bottom: 15px;
        }

        .example-text {
            margin-bottom: 12px;
        }

        .example-text-label {
            font-size: 11px;
            font-weight: bold;
            color: #666;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .example-text-content {
            font-size: 13px;
            line-height: 1.4;
            color: #333;
            background: rgba(0, 0, 0, 0.02);
            padding: 10px;
            border-radius: 8px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
        }

        .gematria-text .example-text-content {
            border-left: 4px solid #4CAF50;
        }

        .translation-text .example-text-content {
            border-left: 4px solid #2196F3;
        }

        .try-button {
            position: relative;
            background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 25px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
            overflow: hidden;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .try-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
        }

        .try-button.animated-try {
            animation: tryButtonPulse 2s ease-in-out infinite;
        }

        .try-text {
            position: relative;
            z-index: 2;
        }

        .try-glow {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
            border-radius: 25px;
            opacity: 0;
            animation: tryGlow 3s ease-in-out infinite;
        }

        /* First Visit Arrow */
        .first-visit-arrow {
            position: fixed;
            top: 50%;
            right: 30px;
            transform: translateY(-50%);
            z-index: 1000;
            background: rgba(255, 193, 7, 0.95);
            padding: 15px 20px;
            border-radius: 20px;
            border: 3px solid #FF6B6B;
            box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
            opacity: 0;
            visibility: hidden;
            transition: all 0.5s ease;
            backdrop-filter: blur(10px);
        }

        .first-visit-arrow.show {
            opacity: 1;
            visibility: visible;
        }

        .arrow-container {
            text-align: center;
        }

        .arrow-text {
            font-size: 14px;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
            text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        }

        .arrow-animated {
            font-size: 24px;
            animation: arrowBounce 1.5s ease-in-out infinite;
        }


        /* Calculate Hand Pointer */
        .calculate-hand-pointer {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1001;
            background: rgba(76, 175, 80, 0.95);
            padding: 15px 25px;
            border-radius: 20px;
            border: 3px solid #4CAF50;
            box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
            opacity: 0;
            visibility: hidden;
            transition: all 0.5s ease;
            backdrop-filter: blur(10px);
        }

        .calculate-hand-pointer.show {
            opacity: 1;
            visibility: visible;
        }

        .hand-container {
            text-align: center;
        }

        .hand-text {
            font-size: 14px;
            font-weight: bold;
            color: white;
            margin-bottom: 8px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .hand-emoji {
            font-size: 28px;
            animation: handPoint 1s ease-in-out infinite;
        }


        /* Mobile responsive adjustments for try texts */
        @media (max-width: 768px) {
            .try-texts-section {
                margin-top: 15px;
                padding: 15px;
            }

            .try-texts-label {
                font-size: 14px;
                padding: 6px 15px;
            }

            .try-texts-subtitle {
                font-size: 12px;
            }

            .example-pairs-container {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .example-pair-card {
                padding: 15px;
            }

            .example-text-content {
                font-size: 12px;
                padding: 8px;
            }

            .try-button {
                padding: 10px 20px;
                font-size: 13px;
            }

            .first-visit-arrow {
                right: 15px;
                padding: 12px 15px;
            }

            .arrow-text {
                font-size: 12px;
            }

            .arrow-animated {
                font-size: 20px;
            }

            .calculate-hand-pointer {
                bottom: 80px;
                padding: 12px 20px;
            }

            .hand-text {
                font-size: 13px;
            }

            .hand-emoji {
                font-size: 24px;
            }
        }

        /* Language mapping modal */
        .language-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .language-modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        .language-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90vw;
            max-width: 600px;
            height: 80vh;
            max-height: 80vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            z-index: 2001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow: hidden;
        }

        .language-modal.show {
            opacity: 1;
            visibility: visible;
        }

        .language-modal-header {
            position: sticky;
            top: 0;
            z-index: 2002;
            background: rgba(102, 126, 234, 0.98);
            padding: 15px 20px;
            border-radius: 20px 20px 0 0;
            border-bottom: 2px solid rgba(255, 255, 255, 0.3);
            color: white;
            text-align: center;
        }

        .language-modal-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .language-modal-subtitle {
            font-size: 12px;
            opacity: 0.9;
            font-style: italic;
        }

        .language-modal-close {
            position: absolute;
            top: 12px;
            right: 15px;
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid #ff4444;
            color: #ff4444;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
            z-index: 2003;
            line-height: 1;
            text-shadow: none;
        }

        .language-modal-close:hover {
            background: #ff4444;
            color: white;
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(255, 68, 68, 0.5);
        }

        .language-modal-close.rtl {
            right: auto;
            left: 15px;
        }

        .language-modal-content {
            height: calc(100% - 70px);
            overflow-y: auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.05);
        }

        .alphabet-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 12px;
            margin-bottom: 20px;
        }

        .alphabet-card {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 12px;
            padding: 12px 8px;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .alphabet-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
        }

        .alphabet-char {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 5px;
            color: #333;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
        }

        .alphabet-value {
            font-size: 14px;
            font-weight: bold;
            color: #667eea;
            background: rgba(102, 126, 234, 0.1);
            padding: 3px 8px;
            border-radius: 8px;
        }

        .rules-section {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 15px;
            margin-top: 20px;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .rules-title {
            color: #FFD700;
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 10px;
            text-align: center;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .rules-content {
            color: white;
            font-size: 13px;
            line-height: 1.5;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .rules-content ul {
            padding-left: 20px;
        }

        .rules-content li {
            margin-bottom: 5px;
        }

        /* Text Display Blocks */
        .text-display-block {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 12px;
            margin: 8px;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transform: translateY(-30px) scale(0.9);
            animation: blockAppear 0.8s ease-out forwards;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
        }
        
        /* Ensure first text block has extra top margin to prevent cut-off */
        .text-display-block:first-child {
            margin-top: 25px;
        }

        .text-display-block.main-text {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        }

        .text-display-block.additional-text-1 {
            background: linear-gradient(135deg, #6c5ce7 0%, #5f27cd 100%);
        }

        .text-display-block.additional-text-2 {
            background: linear-gradient(135deg, #0984e3 0%, #0c7db1 100%);
        }

        .text-header-card {
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            padding: 6px 10px;
            margin-bottom: 10px;
            border-radius: 8px;
            font-size: 10px;
            font-weight: bold;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            line-height: 1.4;
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
            white-space: pre-line;
        }

        .text-block-content {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.3;
            text-align: center;
            word-wrap: break-word;
        }



        .text-display-temporary {
            transition: all 0.5s ease;
        }

        .text-display-temporary.hidden {
            opacity: 0;
            transform: scale(0.8);
            height: 0;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        .static-text-block {
            opacity: 1 !important;
            transform: none !important;
            animation: none !important;
            position: relative;
        }

        .text-block-close {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(255, 255, 255, 0.9);
            border: 2px solid #ff4444;
            color: #ff4444;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            z-index: 10;
            line-height: 1;
            text-shadow: none;
        }

        .text-block-close:hover {
            background: #ff4444;
            color: white;
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(255, 68, 68, 0.5);
        }

        .word-cards-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 6px 12px;
            margin: 8px 6px 6px 6px;
            border-radius: 10px;
            text-align: center;
            font-size: 12px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            border: 2px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            white-space: pre-line;
        }

        .static-word-block {
            opacity: 1 !important;
            transform: none !important;
            animation: none !important;
        }

        .results-section {
            margin-top: 20px;
            min-height: 70vh;
            position: relative;
            transition: all 0.5s ease;
            direction: ltr;
        }

        .results-section.rtl {
            direction: rtl;
        }

        .results-section.fullscreen {
            margin-top: 10px;
            min-height: 90vh;
            padding-top: 10px;
        }

        /* Word Blocks */
        .word-block {
            /* Default gradient - will be overridden by style classes */
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
            color: white;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
            border-radius: 15px;
            padding: 8px;
            margin: 6px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            position: relative;
            display: inline-block;
            vertical-align: top;
            width: auto;
            min-width: 55px;
            max-width: 600px; /* Increased to accommodate up to 27 character breakdowns */
            opacity: 0;
            overflow: hidden;
        }
        
        /* Add shimmer effect to word blocks */
        .word-block::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.5s ease;
        }
        
        .word-block:hover::before {
            left: 100%;
        }

        /* Animation classes for word blocks */
        .word-block.anim-spiral {
            transform: scale(0) rotate(180deg);
            animation: spiralAppear 0.8s ease-out forwards;
        }

        .word-block.anim-bounce {
            transform: translateY(-100px) scale(0.3);
            animation: bounceAppear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
        }

        .word-block.anim-fade {
            transform: scale(0.8);
            animation: fadeAppear 0.6s ease-out forwards;
        }

        .word-block.anim-flip {
            transform: rotateX(90deg) scale(0.8);
            animation: flipAppear 0.8s ease-out forwards;
        }

        .word-block.anim-zoom {
            transform: scale(0) rotateZ(180deg);
            animation: zoomAppear 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        .word-block.anim-wave {
            transform: translateY(50px) skewX(15deg);
            animation: waveAppear 1s ease-in-out forwards;
        }

        .word-block.anim-pulse {
            transform: scale(0);
            animation: pulseAppear 1.2s ease-out forwards;
        }

        /* Enhanced gradient palette with beautiful gradients matching the HTML report */
        .word-block.style-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-2 { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-3 { background: linear-gradient(135deg, #4ecdc4 0%, #6dbfa3 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-4 { background: linear-gradient(135deg, #45b7d1 0%, #5ba3d4 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-5 { background: linear-gradient(135deg, #52b788 0%, #1b7e42 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-6 { background: linear-gradient(135deg, #e6b800 0%, #d63384 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-7 { background: linear-gradient(135deg, #e85d75 0%, #d63384 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-8 { background: linear-gradient(135deg, #17a2b8 0%, #e83e8c 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-9 { background: linear-gradient(135deg, #fd7e14 0%, #d63384 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-10 { background: linear-gradient(135deg, #ff8a80 0%, #ff80ab 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-11 { background: linear-gradient(135deg, #20c997 0%, #0dcaf0 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-12 { background: linear-gradient(135deg, #e83e8c 0%, #ffc107 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-13 { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-14 { background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-15 { background: linear-gradient(135deg, #d63384 0%, #0d6efd 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-16 { background: linear-gradient(135deg, #fdbb2d 0%, #5dd4d6 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-17 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-18 { background: linear-gradient(135deg, #4facfe 0%, #5bf5fe 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-19 { background: linear-gradient(135deg, #198754 0%, #20c997 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-20 { background: linear-gradient(135deg, #e85d75 0%, #fd7e14 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-21 { background: linear-gradient(135deg, #17a2b8 0%, #e83e8c 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        
        /* Additional 29 stunning gradient styles for enhanced variety */
        .word-block.style-22 { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-23 { background: linear-gradient(135deg, #ff7675 0%, #fd79a8 50%, #fdcb6e 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-24 { background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-25 { background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #55a3ff 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-26 { background: linear-gradient(135deg, #fdcb6e 0%, #e17055 50%, #d63031 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-27 { background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 50%, #fd79a8 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-28 { background: linear-gradient(135deg, #ff7675 0%, #74b9ff 50%, #00b894 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-29 { background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 50%, #00cec9 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-30 { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-31 { background: linear-gradient(135deg, #e17055 0%, #00b894 50%, #0984e3 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-32 { background: linear-gradient(135deg, #00cec9 0%, #55a3ff 50%, #fd79a8 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-33 { background: linear-gradient(135deg, #55a3ff 0%, #667eea 50%, #e17055 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-34 { background: linear-gradient(135deg, #d63031 0%, #74b9ff 50%, #fdcb6e 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-35 { background: linear-gradient(135deg, #ff9ff3 0%, #6c5ce7 50%, #00cec9 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-36 { background: linear-gradient(135deg, #764ba2 0%, #ff7675 50%, #00b894 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-37 { background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #f0f0f0 100%); color: #555; text-shadow: 1px 1px 3px rgba(255,255,255,0.8); }
        .word-block.style-38 { background: linear-gradient(135deg, #ff3838 0%, #ff6348 50%, #ff9f43 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-39 { background: linear-gradient(135deg, #7bed9f 0%, #70a1ff 50%, #5352ed 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-40 { background: linear-gradient(135deg, #ff6348 0%, #ff9f43 50%, #ffa502 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-41 { background: linear-gradient(135deg, #70a1ff 0%, #5352ed 50%, #3742fa 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-42 { background: linear-gradient(135deg, #2ed573 0%, #7bed9f 50%, #1e90ff 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-43 { background: linear-gradient(135deg, #ffa502 0%, #ff6348 50%, #ff3838 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-44 { background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 50%, #ececec 100%); color: #555; text-shadow: 1px 1px 3px rgba(255,255,255,0.8); }
        .word-block.style-45 { background: linear-gradient(135deg, #1e90ff 0%, #3742fa 50%, #5352ed 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-46 { background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #c44569 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-47 { background: linear-gradient(135deg, #f2f2f2 0%, #e5e5e5 50%, #f8f8f8 100%); color: #555; text-shadow: 1px 1px 3px rgba(255,255,255,0.8); }
        .word-block.style-48 { background: linear-gradient(135deg, #f8b500 0%, #fbc531 50%, #e55039 100%); color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
        .word-block.style-49 { background: linear-gradient(135deg, #eeeeee 0%, #dadada 50%, #f4f4f4 100%); color: #555; text-shadow: 1px 1px 3px rgba(255,255,255,0.8); }
        .word-block.style-50 { background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 50%, #f6f6f6 100%); color: #555; text-shadow: 1px 1px 3px rgba(255,255,255,0.8); }
        
        /* Random gradient classes for dynamic color assignment */
        .random-gradient-1, .word-block.random-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-2, .word-block.random-gradient-2 { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff6b6b 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-3, .word-block.random-gradient-3 { background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 50%, #4ecdc4 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-4, .word-block.random-gradient-4 { background: linear-gradient(135deg, #45b7d1 0%, #2980b9 50%, #45b7d1 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-5, .word-block.random-gradient-5 { background: linear-gradient(135deg, #96ceb4 0%, #27ae60 50%, #96ceb4 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-6, .word-block.random-gradient-6 { background: linear-gradient(135deg, #feca57 0%, #ff9ff3 50%, #feca57 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-7, .word-block.random-gradient-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ff9a9e 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-8, .word-block.random-gradient-8 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-9, .word-block.random-gradient-9 { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 50%, #fad0c4 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-10, .word-block.random-gradient-10 { background: linear-gradient(135deg, #ff8a80 0%, #ff80ab 50%, #ff8a80 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-11, .word-block.random-gradient-11 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 50%, #84fab0 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-12, .word-block.random-gradient-12 { background: linear-gradient(135deg, #fa709a 0%, #fee140 50%, #fa709a 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-13, .word-block.random-gradient-13 { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 50%, #89f7fe 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-14, .word-block.random-gradient-14 { background: linear-gradient(135deg, #feada6 0%, #f5efef 50%, #feada6 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-15, .word-block.random-gradient-15 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 50%, #fbc2eb 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-16, .word-block.random-gradient-16 { background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 50%, #fdbb2d 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-17, .word-block.random-gradient-17 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f093fb 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-18, .word-block.random-gradient-18 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-19, .word-block.random-gradient-19 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 50%, #43e97b 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-20, .word-block.random-gradient-20 { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ff9a9e 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-21, .word-block.random-gradient-21 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%) !important; color: #444 !important; text-shadow: 2px 2px 4px rgba(255,255,255,0.9) !important; }
        .random-gradient-22, .word-block.random-gradient-22 { background: linear-gradient(135deg, #ff7675 0%, #fd79a8 50%, #fdcb6e 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-23, .word-block.random-gradient-23 { background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-24, .word-block.random-gradient-24 { background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #55a3ff 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-25, .word-block.random-gradient-25 { background: linear-gradient(135deg, #fdcb6e 0%, #e17055 50%, #d63031 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-26, .word-block.random-gradient-26 { background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 50%, #fd79a8 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-27, .word-block.random-gradient-27 { background: linear-gradient(135deg, #ff7675 0%, #74b9ff 50%, #00b894 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-28, .word-block.random-gradient-28 { background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 50%, #00cec9 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-29, .word-block.random-gradient-29 { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-30, .word-block.random-gradient-30 { background: linear-gradient(135deg, #e17055 0%, #00b894 50%, #0984e3 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-31, .word-block.random-gradient-31 { background: linear-gradient(135deg, #00cec9 0%, #55a3ff 50%, #fd79a8 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-32, .word-block.random-gradient-32 { background: linear-gradient(135deg, #55a3ff 0%, #667eea 50%, #e17055 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-33, .word-block.random-gradient-33 { background: linear-gradient(135deg, #d63031 0%, #74b9ff 50%, #fdcb6e 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-34, .word-block.random-gradient-34 { background: linear-gradient(135deg, #ff9ff3 0%, #6c5ce7 50%, #00cec9 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-35, .word-block.random-gradient-35 { background: linear-gradient(135deg, #764ba2 0%, #ff7675 50%, #00b894 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-36, .word-block.random-gradient-36 { background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #f0f0f0 100%) !important; color: #555 !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-37, .word-block.random-gradient-37 { background: linear-gradient(135deg, #ff3838 0%, #ff6348 50%, #ff9f43 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-38, .word-block.random-gradient-38 { background: linear-gradient(135deg, #7bed9f 0%, #70a1ff 50%, #5352ed 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-39, .word-block.random-gradient-39 { background: linear-gradient(135deg, #ff6348 0%, #ff9f43 50%, #ffa502 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-40, .word-block.random-gradient-40 { background: linear-gradient(135deg, #70a1ff 0%, #5352ed 50%, #3742fa 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-41, .word-block.random-gradient-41 { background: linear-gradient(135deg, #2ed573 0%, #7bed9f 50%, #1e90ff 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-42, .word-block.random-gradient-42 { background: linear-gradient(135deg, #ffa502 0%, #ff6348 50%, #ff3838 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-43, .word-block.random-gradient-43 { background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 50%, #ececec 100%) !important; color: #555 !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-44, .word-block.random-gradient-44 { background: linear-gradient(135deg, #1e90ff 0%, #3742fa 50%, #5352ed 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-45, .word-block.random-gradient-45 { background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #c44569 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-46, .word-block.random-gradient-46 { background: linear-gradient(135deg, #f2f2f2 0%, #e5e5e5 50%, #f8f8f8 100%) !important; color: #555 !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-47, .word-block.random-gradient-47 { background: linear-gradient(135deg, #f8b500 0%, #fbc531 50%, #e55039 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-48, .word-block.random-gradient-48 { background: linear-gradient(135deg, #eeeeee 0%, #dadada 50%, #f4f4f4 100%) !important; color: #555 !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-49, .word-block.random-gradient-49 { background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 50%, #f6f6f6 100%) !important; color: #555 !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }
        .random-gradient-50, .word-block.random-gradient-50 { background: linear-gradient(135deg, #c7ecee 0%, #778beb 50%, #f8b500 100%) !important; color: white !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important; }

        .word-text {
            font-weight: bold;
            margin-bottom: 3px;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            word-wrap: break-word;
            padding-right: 35px;
            line-height: 1.4;
            font-size: 14px;
        }

        .word-total {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(33, 150, 243, 0.9);
            color: white;
            padding: 2px 6px;
            border-radius: 12px;
            font-size: 9px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            min-width: 20px;
            text-align: center;
        }

        .breakdown {
            margin-top: 1px;
            text-align: left;
            display: flex;
            justify-content: flex-start;
        }

        .breakdown-table {
            display: inline-table;
            margin: 0;
            text-align: left;
            border-spacing: 1px 0px;
        }

        .breakdown-row {
            display: table-row;
        }

        .breakdown-char-cell,
        .breakdown-value-cell {
            display: table-cell;
            padding: 0px 1px;
            vertical-align: middle;
            text-align: left;
            white-space: nowrap;
        }

        .breakdown-char-cell {
            font-size: 9px;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            font-weight: 500;
            line-height: 1.3;
            min-width: auto;
        }

        .breakdown-value-cell {
            font-size: 7px;
            font-weight: 600;
            line-height: 1.2;
            min-width: auto;
        }


        .word-block[data-lang="chinese-stroke"] .word-text,
        .word-block[data-lang="chinese-stroke"] .breakdown-char-cell {
            font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', Arial, sans-serif;
        }

        .chinese-stroke-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 3px;
            width: 100%;
        }

        .chinese-stroke-cell {
            min-width: 18px;
            padding: 2px 3px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.14);
            text-align: center;
        }

        .chinese-stroke-cell .breakdown-char-cell,
        .chinese-stroke-cell .breakdown-formula-cell,
        .chinese-stroke-cell .breakdown-value-cell {
            display: block;
            text-align: center;
            padding: 0;
        }

        .chinese-stroke-cell .breakdown-char-cell {
            font-size: 13px;
            line-height: 1.25;
        }

        .chinese-stroke-cell .breakdown-value-cell {
            font-size: 9px;
            line-height: 1.1;
        }

        .chinese-stroke-cell .breakdown-formula-cell {
            font-size: 8px;
            line-height: 1.1;
            opacity: 0.9;
            white-space: nowrap;
        }

        /* Total Display Modal */
        .total-display {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            padding: 0;
            border-radius: 15px;
            text-align: center;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            opacity: 0;
            display: none;
            width: 90vw;
            max-width: 500px;
            height: 55vh;
            max-height: 55vh;
            background: rgba(102, 126, 234, 0.85);
            backdrop-filter: blur(2px);
            overflow: hidden;
        }

        .total-display.compact {
            height: 75vh;
            max-height: 75vh;
        }

        .total-display.large {
            height: 80vh;
            max-height: 80vh;
        }

        .total-header {
            position: sticky;
            top: 0;
            z-index: 1001;
            background: rgba(102, 126, 234, 0.98);
            padding: 10px 8px;
            border-radius: 15px 15px 0 0;
            border-bottom: 2px solid rgba(255, 255, 255, 0.3);
            min-height: 80px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .language-indicator {
            font-size: 9px;
            font-weight: bold;
            color: #FFD700;
            margin-bottom: 4px;
            background: rgba(255, 215, 0, 0.1);
            padding: 2px 8px;
            border-radius: 8px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        .calculating-text {
            font-size: 10px;
            font-weight: bold;
            line-height: 1.4;
            color: #FFD700;
            margin-top: 5px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            text-align: center;
            width: 100%;
            background: rgba(255, 215, 0, 0.1);
            padding: 3px;
            border-radius: 5px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        .total-scrollable-content {
            height: calc(100% - 80px);
            overflow-y: auto;
            padding: 12px 8px;
            background: rgba(255, 255, 255, 0.05);
        }

        .question-mark-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 14px;
            min-width: 30px;
            text-align: center;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.5);
            animation: spinQuestionMark 2s linear infinite;
            display: inline-block;
            margin-bottom: 8px;
        }

  
        .number-cards-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 4px;
            margin: 8px 0;
            padding: 12px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            width: 100%;
            box-sizing: border-box;
            min-height: auto;
            overflow: visible;
        }

        .final-total-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            margin-top: 12px;
            margin-bottom: 20px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            overflow: visible;
            width: 100%;
            box-sizing: border-box;
        }

        .number-card {
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 12px;
            min-width: 24px;
            text-align: center;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
            opacity: 0;
            border: 1px solid rgba(255, 255, 255, 0.5);
            line-height: 1.2;
            transition: all 0.3s ease;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            transform: translateY(20px) scale(0.8);
            animation: smoothCardAppear 0.6s ease-out forwards;
            overflow: visible;
            white-space: nowrap;
            max-width: none;
            word-break: keep-all;
        }
        
        /* Responsive font sizing for large numbers */
        .number-card[data-large-number="true"] {
            font-size: 10px;
            padding: 4px 6px;
        }
        
        .number-card.total-card[data-large-number="true"] {
            font-size: 12px;
            padding: 6px 8px;
        }

        /* Enhanced number card gradients with 50 styles and improved text visibility */
        .number-card:nth-child(50n+1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+2) { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff6b6b 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+3) { background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 50%, #4ecdc4 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+4) { background: linear-gradient(135deg, #45b7d1 0%, #2980b9 50%, #45b7d1 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+5) { background: linear-gradient(135deg, #96ceb4 0%, #27ae60 50%, #96ceb4 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+6) { background: linear-gradient(135deg, #feca57 0%, #ff9ff3 50%, #feca57 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+7) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ff9a9e 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+8) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+9) { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 50%, #fad0c4 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+10) { background: linear-gradient(135deg, #ff8a80 0%, #ff80ab 50%, #ff8a80 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+11) { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 50%, #84fab0 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+12) { background: linear-gradient(135deg, #fa709a 0%, #fee140 50%, #fa709a 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+13) { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 50%, #89f7fe 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+14) { background: linear-gradient(135deg, #feada6 0%, #f5efef 50%, #feada6 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+15) { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 50%, #fbc2eb 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+16) { background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 50%, #fdbb2d 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+17) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f093fb 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+18) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+19) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 50%, #43e97b 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+20) { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ff9a9e 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+21) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .number-card:nth-child(50n+22) { background: linear-gradient(135deg, #ff7675 0%, #fd79a8 50%, #fdcb6e 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+23) { background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+24) { background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #55a3ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+25) { background: linear-gradient(135deg, #fdcb6e 0%, #e17055 50%, #d63031 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+26) { background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 50%, #fd79a8 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+27) { background: linear-gradient(135deg, #ff7675 0%, #74b9ff 50%, #00b894 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+28) { background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 50%, #00cec9 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+29) { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+30) { background: linear-gradient(135deg, #e17055 0%, #00b894 50%, #0984e3 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+31) { background: linear-gradient(135deg, #00cec9 0%, #55a3ff 50%, #fd79a8 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+32) { background: linear-gradient(135deg, #55a3ff 0%, #667eea 50%, #e17055 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+33) { background: linear-gradient(135deg, #d63031 0%, #74b9ff 50%, #fdcb6e 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+34) { background: linear-gradient(135deg, #ff9ff3 0%, #6c5ce7 50%, #00cec9 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+35) { background: linear-gradient(135deg, #764ba2 0%, #ff7675 50%, #00b894 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+36) { background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #b2bec3 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+37) { background: linear-gradient(135deg, #ff3838 0%, #ff6348 50%, #ff9f43 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+38) { background: linear-gradient(135deg, #7bed9f 0%, #70a1ff 50%, #5352ed 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+39) { background: linear-gradient(135deg, #ff6348 0%, #ff9f43 50%, #ffa502 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+40) { background: linear-gradient(135deg, #70a1ff 0%, #5352ed 50%, #3742fa 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+41) { background: linear-gradient(135deg, #2ed573 0%, #7bed9f 50%, #1e90ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+42) { background: linear-gradient(135deg, #ffa502 0%, #ff6348 50%, #ff3838 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+43) { background: linear-gradient(135deg, #3742fa 0%, #2f3542 50%, #57606f 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+44) { background: linear-gradient(135deg, #1e90ff 0%, #3742fa 50%, #5352ed 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+45) { background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #c44569 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+46) { background: linear-gradient(135deg, #3d4466 0%, #5f27cd 50%, #341f97 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+47) { background: linear-gradient(135deg, #f8b500 0%, #fbc531 50%, #e55039 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+48) { background: linear-gradient(135deg, #4834d4 0%, #686de0 50%, #30336b 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+49) { background: linear-gradient(135deg, #eb4d4b 0%, #6639b5 50%, #130f40 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .number-card:nth-child(50n+50) { background: linear-gradient(135deg, #c7ecee 0%, #778beb 50%, #f8b500 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }

        .plus-symbol {
            color: #FFD700;
            font-size: 12px;
            font-weight: 900;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            opacity: 0;
            animation: smoothSymbolAppear 0.5s ease-out forwards;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 12px;
            transform: translateY(15px) scale(0.7);
            flex-shrink: 0;
        }

        .equals-symbol {
            color: #00FF7F;
            font-size: 14px;
            font-weight: 900;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            opacity: 0;
            animation: smoothSymbolAppear 0.5s ease-out forwards;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 16px;
            transform: translateY(15px) scale(0.7);
            flex-shrink: 0;
        }

        .number-card.total-card {
            background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%) !important;
            font-size: 14px;
            padding: 6px 12px;
            min-width: 36px;
            border: 2px solid #FFD700;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            position: relative;
            transform: translateY(20px) scale(0.8);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            animation: smoothTotalAppear 0.8s ease-out forwards;
            margin-bottom: 15px;
            overflow: visible;
            white-space: nowrap;
            max-width: none;
        }


        .total-display.show {
            opacity: 1;
            display: block;
        }

        .total-text {
            font-size: 12px;
            font-weight: bold;
            margin-bottom: 2px;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            line-height: 1.0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .total-value {
            font-size: 20px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
            margin-bottom: 4px;
        }

        .close-btn {
            position: absolute;
            top: 8px;
            right: 12px;
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid #ff4444;
            color: #ff4444;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
            z-index: 1002;
            line-height: 1;
            text-shadow: none;
        }

        .close-btn:hover {
            background: #ff4444;
            color: white;
            transform: scale(1.15);
            box-shadow: 0 6px 16px rgba(255, 68, 68, 0.5);
        }

        .total-breakdown {
            margin-top: 8px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            font-size: 11px;
            height: auto;
            overflow: visible;
        }

        .total-breakdown.compact {
            margin-top: 6px;
            padding: 8px;
            font-size: 10px;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.6);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        /* Static Total Display */
        .simple-static-total {
            background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
            color: white;
            padding: 10px;
            margin: 10px 8px;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            border: 2px solid #FFD700;
        }

        .simple-total-header {
            font-size: 11px;
            font-weight: bold;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            line-height: 1.2;
            text-align: center;
            display: inline;
        }

        .simple-total-value {
            font-size: 24px;
            font-weight: bold;
            color: #FFD700;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            margin-bottom: 12px;
            text-align: center;
            display: inline;
            margin-left: 6px;
        }

        .simple-total-container {
            text-align: center;
            margin-bottom: 8px;
        }

        .simple-breakdown-section {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 10px;
            line-height: 2.0;
            font-size: 11px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            color: white;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .simple-number {
            display: inline-block;
            font-weight: bold;
            color: white;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            opacity: 0;
            transform: scale(2.0);
            animation: lightNumberAppear 0.8s ease-out forwards;
            padding: 3px 5px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 1px solid rgba(255, 255, 255, 0.4);
            margin: 1px 2px;
            min-width: 18px;
            height: 18px;
            text-align: center;
            line-height: 12px;
            font-size: 9px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        /* Enhanced simple number gradients with 50 styles and improved text visibility */
        .simple-number:nth-child(50n+1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+2) { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff6b6b 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+3) { background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 50%, #4ecdc4 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+4) { background: linear-gradient(135deg, #45b7d1 0%, #2980b9 50%, #45b7d1 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+5) { background: linear-gradient(135deg, #96ceb4 0%, #27ae60 50%, #96ceb4 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+6) { background: linear-gradient(135deg, #feca57 0%, #ff9ff3 50%, #feca57 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+7) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ff9a9e 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+8) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+9) { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 50%, #fad0c4 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+10) { background: linear-gradient(135deg, #ff8a80 0%, #ff80ab 50%, #ff8a80 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+11) { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 50%, #84fab0 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+12) { background: linear-gradient(135deg, #fa709a 0%, #fee140 50%, #fa709a 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+13) { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 50%, #89f7fe 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+14) { background: linear-gradient(135deg, #feada6 0%, #f5efef 50%, #feada6 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+15) { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 50%, #fbc2eb 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+16) { background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 50%, #fdbb2d 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+17) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f093fb 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+18) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+19) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 50%, #43e97b 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+20) { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ff9a9e 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+21) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #a8edea 100%); color: #333; text-shadow: 2px 2px 4px rgba(255,255,255,0.9); }
        .simple-number:nth-child(50n+22) { background: linear-gradient(135deg, #ff7675 0%, #fd79a8 50%, #fdcb6e 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+23) { background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+24) { background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #55a3ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+25) { background: linear-gradient(135deg, #fdcb6e 0%, #e17055 50%, #d63031 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+26) { background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 50%, #fd79a8 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+27) { background: linear-gradient(135deg, #ff7675 0%, #74b9ff 50%, #00b894 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+28) { background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 50%, #00cec9 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+29) { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+30) { background: linear-gradient(135deg, #e17055 0%, #00b894 50%, #0984e3 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+31) { background: linear-gradient(135deg, #00cec9 0%, #55a3ff 50%, #fd79a8 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+32) { background: linear-gradient(135deg, #55a3ff 0%, #667eea 50%, #e17055 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+33) { background: linear-gradient(135deg, #d63031 0%, #74b9ff 50%, #fdcb6e 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+34) { background: linear-gradient(135deg, #ff9ff3 0%, #6c5ce7 50%, #00cec9 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+35) { background: linear-gradient(135deg, #764ba2 0%, #ff7675 50%, #00b894 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+36) { background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #b2bec3 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+37) { background: linear-gradient(135deg, #ff3838 0%, #ff6348 50%, #ff9f43 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+38) { background: linear-gradient(135deg, #7bed9f 0%, #70a1ff 50%, #5352ed 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+39) { background: linear-gradient(135deg, #ff6348 0%, #ff9f43 50%, #ffa502 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+40) { background: linear-gradient(135deg, #70a1ff 0%, #5352ed 50%, #3742fa 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+41) { background: linear-gradient(135deg, #2ed573 0%, #7bed9f 50%, #1e90ff 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+42) { background: linear-gradient(135deg, #ffa502 0%, #ff6348 50%, #ff3838 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+43) { background: linear-gradient(135deg, #3742fa 0%, #2f3542 50%, #57606f 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+44) { background: linear-gradient(135deg, #1e90ff 0%, #3742fa 50%, #5352ed 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+45) { background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #c44569 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+46) { background: linear-gradient(135deg, #3d4466 0%, #5f27cd 50%, #341f97 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+47) { background: linear-gradient(135deg, #f8b500 0%, #fbc531 50%, #e55039 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+48) { background: linear-gradient(135deg, #4834d4 0%, #686de0 50%, #30336b 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+49) { background: linear-gradient(135deg, #eb4d4b 0%, #6639b5 50%, #130f40 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .simple-number:nth-child(50n+50) { background: linear-gradient(135deg, #c7ecee 0%, #778beb 50%, #f8b500 100%); color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }

        .simple-plus {
            color: #FFD700;
            font-weight: inherit;
            margin: 0 2px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            font-size: inherit;
            display: inline;
            white-space: nowrap;
            opacity: 1;
        }

        .simple-plus.animated {
            opacity: 0;
            animation: lightSymbolAppear 0.5s ease-out forwards;
        }

        .simple-equals {
            color: #00FF7F;
            font-weight: inherit;
            margin: 0 3px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            font-size: inherit;
            display: inline;
            white-space: nowrap;
            opacity: 1;
        }

        .simple-equals.animated {
            opacity: 0;
            animation: lightSymbolAppear 0.6s ease-out forwards;
        }

        .simple-final-total {
            color: #FFD700;
            font-weight: bold;
            font-size: 16px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            text-decoration: underline;
            display: inline;
            padding: 2px 4px;
            border-radius: 4px;
            background: rgba(255, 215, 0, 0.1);
            border: 1px solid #FFD700;
            margin: 0 2px;
            opacity: 1;
            white-space: nowrap;
            overflow: visible;
            max-width: none;
        }

        .simple-final-total.animated {
            opacity: 0;
            animation: lightTotalAppear 0.8s ease-out forwards;
        }

        .simple-calculation-container {
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            font-size: 11px;
            line-height: 2.2;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            word-spacing: 1px;
        }

        .loading {
            text-align: center;
            padding: 50px;
            font-size: 18px;
            color: white;
        }

        .error {
            background: #ff4444;
            color: white;
            padding: 10px;
            border-radius: 10px;
            margin: 10px 0;
            text-align: center;
        }

        .copyright-footer {
            text-align: center;
            padding: 15px 10px;
            margin-top: 20px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 12px;
            border-radius: 10px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            transition: all 0.5s ease;
        }

        .copyright-footer.hide-during-calculation {
            display: none !important;
        }

        /* Custom scrollbar for preview content */
        .preview-content::-webkit-scrollbar {
            width: 8px;
        }
        
        .preview-content::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }
        
        .preview-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
        }
        
        .preview-content::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }
        /* Startup Animation Overlay with Colorful Card Rain Effect */
        .startup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
            z-index: 15000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 1;
            visibility: visible;
            transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow: hidden;
        }

        .startup-overlay.hide {
            opacity: 0;
            visibility: hidden;
        }

        .startup-title {
            font-size: 48px;
            font-weight: bold;
            color: white;
            margin-bottom: 30px;
            text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
            animation: startupGlow 2s ease-in-out infinite alternate;
            text-align: center;
            z-index: 15002;
            position: relative;
        }


        .startup-subtitle {
            font-size: 24px;
            color: #FFD700;
            margin-bottom: 50px;
            text-align: center;
            font-style: italic;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
            z-index: 15002;
            position: relative;
        }

        /* Skip Intro Button */
        .skip-intro-btn {
            position: absolute;
            top: 250px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
            background-size: 300% 300%;
            animation: gradientShift 3s ease infinite, pulseGlow 2s ease-in-out infinite;
            border: none;
            border-radius: 30px;
            padding: 12px 24px;
            color: white;
            font-weight: bold;
            font-size: 16px;
            cursor: pointer;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            z-index: 15003;
            display: none; /* Initially hidden */
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            opacity: 0;
            min-width: 140px;
        }

        .skip-intro-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
            animation-duration: 1.5s;
        }

        .skip-intro-btn:active {
            transform: translateY(-2px) scale(1.02);
        }

        .skip-icon {
            font-size: 22px;
            animation: bounce 1s ease-in-out infinite;
        }

        .skip-text {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            letter-spacing: 0.5px;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes pulseGlow {
            0% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.7); }
            50% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(255, 255, 255, 0); }
            100% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0); }
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-5px); }
            60% { transform: translateY(-3px); }
        }

        /* Mobile responsive for skip button - Bigger to stand out from rain animation */
        @media (max-width: 768px) {
            .skip-intro-btn {
                top: 220px;
                left: 50%;
                transform: translateX(-50%);
                padding: 14px 28px;
                font-size: 16px;
                border-radius: 30px;
                min-width: 150px;
                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
                border: 2px solid rgba(255, 255, 255, 0.4);
            }
            
            .skip-icon {
                font-size: 18px;
            }
        }

        @media (max-width: 480px) {
            .skip-intro-btn {
                top: 200px;
                padding: 12px 24px;
                font-size: 15px;
                border-radius: 28px;
                min-width: 140px;
                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
                border: 2px solid rgba(255, 255, 255, 0.4);
            }
            
            .skip-icon {
                font-size: 17px;
            }
        }

        /* Extra small mobile devices */
        @media (max-width: 320px) {
            .skip-intro-btn {
                top: 180px;
                padding: 10px 20px;
                font-size: 14px;
                border-radius: 25px;
                min-width: 130px;
                box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
                border: 2px solid rgba(255, 255, 255, 0.4);
            }
            
            .skip-icon {
                font-size: 16px;
            }
        }

        /* Mobile landscape orientation - keep centered */
        @media (max-width: 768px) and (orientation: landscape) {
            .skip-intro-btn {
                top: 160px;
            }
        }

        /* Enhanced Colorful Card Rain Effect */
        .rain-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 15001;
        }

        .rain-card {
            position: absolute;
            border-radius: 12px;
            padding: 8px 12px;
            font-size: 14px;
            font-weight: bold;
            color: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.5);
            animation: rainFall linear infinite;
            font-family: 'Noto Sans Thai', 'Noto Sans Tamil', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans Telugu', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Arabic', Arial, sans-serif;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        }

        .rain-card.color-1 { 
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-2 { 
            background: linear-gradient(135deg, #4ecdc4, #44a08d);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-3 { 
            background: linear-gradient(135deg, #45b7d1, #2980b9);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-4 { 
            background: linear-gradient(135deg, #96ceb4, #27ae60);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-5 { 
            background: linear-gradient(135deg, #feca57, #ff9ff3);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-6 { 
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-7 { 
            background: linear-gradient(135deg, #f093fb, #f5576c);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-8 { 
            background: linear-gradient(135deg, #4facfe, #00f2fe);
            border-left: 4px solid #fff; 
        }
        .rain-card.color-9 { 
            background: linear-gradient(135deg, #43e97b, #38f9d7);
            color: #333;
            border-left: 4px solid #333; 
        }
        .rain-card.color-10 { 
            background: linear-gradient(135deg, #fa709a, #fee140);
            color: #333;
            border-left: 4px solid #333; 
        }


        /* Welcome Popup */
        .welcome-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 16000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .welcome-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        .welcome-popup {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
            border-radius: 25px;
            padding: 40px 50px;
            text-align: center;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
            border: 2px solid rgba(255, 255, 255, 0.3);
            transform: scale(0.3) translateY(100px);
            transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            max-width: 90vw;
            max-height: 95vh;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .welcome-overlay.show .welcome-popup {
            transform: scale(1) translateY(0);
        }

        .welcome-popup::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: rotate(45deg);
            animation: shimmer 3s ease-in-out infinite;
        }

         .welcome-title {
            font-size: 48px;
            font-weight: bold;
            color: white;
            margin-bottom: 20px;
            text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
            animation: welcomeGlow 2s ease-in-out infinite alternate;
            position: relative;
            z-index: 1;
        }

        .welcome-tagline {
            font-size: 18px;
            color: #FFD700;
            font-style: italic;
            line-height: 1.6;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
            margin-bottom: 30px;
            position: relative;
            z-index: 1;
            animation: taglineFade 1s ease-in 0.5s both;
        }


        .welcome-symbols {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 25px;
            position: relative;
            z-index: 1;
        }

        .welcome-symbol {
            font-size: 24px;
            animation: symbolBounce 2s ease-in-out infinite;
            opacity: 0;
            animation-fill-mode: both;
        }

        .welcome-symbol:nth-child(1) { animation-delay: 1s; }
        .welcome-symbol:nth-child(2) { animation-delay: 1.2s; }
        .welcome-symbol:nth-child(3) { animation-delay: 1.4s; }
        .welcome-symbol:nth-child(4) { animation-delay: 1.6s; }
        .welcome-symbol:nth-child(5) { animation-delay: 1.8s; }
        .welcome-symbol:nth-child(6) { animation-delay: 2s; }

        /* Mobile responsive adjustments */
        @media screen and (max-width: 768px) {
            .text-input {
                font-size: 16px !important;
                height: 120px;
                padding: 12px;
            }
            
            .timer-input {
                font-size: 16px !important;
            }
            
            .container { 
                padding: 5px; 
            }
            
            .results-section {
                padding-top: 10px;
                min-height: 60vh; 
            }
            
            .results-section.fullscreen {
                padding-top: 10px;
                min-height: 80vh; 
            }
            
            .word-block { 
                margin: 4px;
                width: auto; 
                min-width: 55px; 
                max-width: 90vw;
            }
            
            .animation-controls { 
                gap: 4px;
                padding: 6px;
                flex-wrap: wrap; 
                justify-content: center; 
            }
            
            .animation-name { 
                font-size: 10px;
                letter-spacing: 0.2px;
            }
            
            .radio-custom { 
                width: 8px;
                height: 8px;
                margin-right: 3px;
            }
            
            .animation-option { 
                padding: 3px 6px;
            }
            
            .timer-group label { 
                font-size: 8px;
            }
            
            .timer-input { 
                width: 40px;
                font-size: 11px; 
            }
            
            .btn {
                padding: 8px 15px;
                font-size: 14px;
                min-width: 80px;
            }
            
            .button-group {
                gap: 8px;
            }
            
            .language-mapping-section {
                padding: 15px;
                margin-top: 8px;
            }
            
            .language-buttons {
                gap: 8px;
                justify-content: center;
            }
            
            .language-btn {
                padding: 8px 12px;
                font-size: 11px;
                border-radius: 18px;
                min-width: 90px;
                max-width: 120px;
                height: 40px;
                text-shadow: 0 1px 3px rgba(0,0,0,0.6);
                flex: 0 1 auto;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .language-mapping-label {
                font-size: 12px;
                padding: 8px 15px;
                text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
            }
            
            .additional-options {
                padding: 10px;
                margin-top: 10px;
            }
            
            .additional-label {
                font-size: 11px;
                padding: 3px 10px;
            }
            
            .additional-controls {
                flex-direction: column;
                gap: 6px;
            }
            
            .radio-group {
                justify-content: center;
                gap: 6px;
            }
            
            .radio-option {
                padding: 3px 6px;
                font-size: 10px;
            }
            
            .radio-custom-circle {
                width: 10px;
                height: 10px;
                margin-right: 3px;
            }
            
            .radio-name {
                font-size: 9px;
            }
            
            .delay-control {
                justify-content: center;
                padding: 4px 6px;
            }
            
            .delay-control label {
                font-size: 9px;
            }
            
            .reverse-ordinal-section {
                padding: 6px;
                margin-top: 8px;
            }
            
            .reverse-ordinal-label {
                font-size: 11px;
            }
            
            .reverse-ordinal-checkbox input[type="checkbox"] {
                width: 14px;
                height: 14px;
            }
            
            .input-section {
                padding: 15px;
                margin-bottom: 15px;
            }
            
            .timer-controls {
                gap: 8px;
                margin-bottom: 8px;
            }
            
            .additional-text-input {
                height: 70px !important;
                font-size: 12px;
            }

            .welcome-popup {
                padding: 25px 20px;
                border-radius: 20px;
                max-height: 90vh;
            }
            
            .welcome-title {
                font-size: 36px;
                margin-bottom: 15px;
            }
            
            .welcome-tagline {
                font-size: 16px;
                margin-bottom: 20px;
            }
            
            .welcome-symbols {
                gap: 10px;
                margin-top: 20px;
            }
            
            .welcome-symbol {
                font-size: 20px;
            }

            /* Startup responsive */
            .startup-title {
                font-size: 32px;
            }

            .startup-subtitle {
                font-size: 18px;
            }

            .rain-card {
                font-size: 12px;
                padding: 6px 10px;
            }

            .alphabet-grid {
                grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
                gap: 8px;
            }
            
            .alphabet-card {
                padding: 8px 4px;
            }
            
            .alphabet-char {
                font-size: 18px;
            }
            
            .alphabet-value {
                font-size: 11px;
                padding: 2px 6px;
            }
            
            .language-modal {
                width: 95vw;
                height: 85vh;
            }
            
            .language-modal-header {
                padding: 12px 15px;
            }
            
            .language-modal-title {
                font-size: 16px;
            }
            
            .language-modal-content {
                padding: 15px;
            }
            
            /* Mobile adjustments for total display modal */
            .total-display {
                height: 65vh;
                max-height: 65vh;
            }

            .total-display.compact {
                height: 80vh;
                max-height: 80vh;
            }

            .total-display.large {
                height: 85vh;
                max-height: 85vh;
            }
        }

        @media (max-width: 480px) {
            .welcome-popup {
                padding: 20px 15px;
                max-height: 90vh;
            }
            
            .welcome-title {
                font-size: 24px;
                margin-bottom: 10px;
            }
            
            .welcome-tagline {
                font-size: 13px;
                margin-bottom: 15px;
            }
            
            /* Extra mobile adjustments for total display modal */
            .total-display {
                height: 70vh;
                max-height: 70vh;
            }

            .total-display.compact {
                height: 85vh;
                max-height: 85vh;
            }

            .total-display.large {
                height: 90vh;
                max-height: 90vh;
            }
        }

        /* Language Selection in Welcome Popup */
        .welcome-step {
            display: flex;
            flex-direction: column;
            height: 100%;
            min-height: 0;
        }
        
        .language-options {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 15px;
            margin: 30px auto;
            position: relative;
            z-index: 1;
            flex: 1;
            min-height: 0;
            justify-items: center;
            align-items: center;
        }

        #languageSelectionStep {
            overflow-y: auto;
            max-height: 78vh;
        }

        .language-btn {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
            border: 2px solid rgba(255, 255, 255, 0.4);
            border-radius: 20px;
            padding: 18px 12px;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            backdrop-filter: blur(15px);
            position: relative;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }

        .language-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
            z-index: 1;
        }

        .language-btn:hover::before {
            transform: translateX(100%);
        }

        .language-btn:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
            border-color: rgba(255, 255, 255, 0.8);
            transform: translateY(-8px) scale(1.08);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.3);
        }

        .lang-flag {
            font-size: 32px;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
            transition: all 0.3s ease;
            position: relative;
            z-index: 2;
            flex-shrink: 0;
        }

        .language-btn:hover .lang-flag {
            font-size: 36px;
            filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
            transform: scale(1.1);
        }

        .lang-name {
            font-size: 15px;
            font-weight: 700;
            color: white;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 255, 255, 0.2);
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .language-btn:hover .lang-name {
            font-size: 16px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
            transform: scale(1.05);
        }

        .welcome-message {
            font-size: 20px;
            color: #FFD700;
            line-height: 1.6;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
            margin-bottom: 30px;
            position: relative;
            z-index: 1;
            animation: messageGlow 2s ease-in-out infinite alternate;
        }

        .continue-hint {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            position: relative;
            z-index: 1;
        }

        #countdown {
            font-weight: bold;
            color: #FFD700;
        }

        @keyframes messageGlow {
            0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 215, 0, 0.3); }
            100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.6); }
        }

        /* Responsive adjustments for language selection */
        @media (max-width: 768px) {
            .language-options {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                justify-items: center;
                align-items: center;
            }
            
            .lang-flag {
                font-size: 18px !important;
            }
            
            .language-btn {
                padding: 15px 10px;
                border-radius: 18px;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 6px;
            }
            
            .lang-flag {
                font-size: 28px;
            }
            
            .language-btn:hover .lang-flag {
                font-size: 30px;
            }
            
            .lang-name {
                font-size: 13px;
            }
            
            .language-btn:hover .lang-name {
                font-size: 14px;
            }
            
            .welcome-message {
                font-size: 18px;
            }
        }

        @media (max-width: 480px) {
            .language-options {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                margin: 15px auto;
                justify-items: center;
                align-items: center;
            }
            
            .lang-flag {
                font-size: 16px !important;
            }
            
            .language-btn {
                padding: 8px 6px;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 4px;
            }
            
            .lang-flag {
                font-size: 18px;
            }
            
            .lang-name {
                font-size: 11px;
            }
            
            .welcome-message {
                font-size: 16px;
            }
        }

        /* Extra small mobile devices - further height constraints */
        @media (max-width: 320px) {
            .welcome-popup {
                padding: 15px 10px;
                max-height: 90vh;
            }
            
            .welcome-title {
                font-size: 20px;
                margin-bottom: 8px;
            }
            
            .welcome-tagline {
                font-size: 11px;
                margin-bottom: 12px;
            }
            
            .language-options {
                grid-template-columns: repeat(2, 1fr);
                gap: 6px;
                margin: 12px auto;
                justify-items: center;
                align-items: center;
            }
            
            .language-btn {
                padding: 6px 4px;
                border-radius: 15px;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 3px;
            }
            
            .lang-flag {
                font-size: 16px;
            }
            
            .lang-name {
                font-size: 9px;
            }
        }

        /* Mobile landscape orientation adjustments */
        @media (max-height: 500px) and (orientation: landscape) {
            .welcome-popup {
                max-height: 95vh;
                padding: 15px 25px;
            }
            
            .welcome-title {
                font-size: 20px;
                margin-bottom: 6px;
            }
            
            .welcome-tagline {
                font-size: 11px;
                margin-bottom: 10px;
            }
            
            .language-options {
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
                margin: 10px auto;
                justify-items: center;
                align-items: center;
            }
            
            .language-btn {
                padding: 6px 4px;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 3px;
            }
            
            .lang-flag {
                font-size: 16px;
            }
            
            .lang-name {
                font-size: 10px;
            }
        }

        /* Very short screens - extra compact layout */
        @media (max-height: 400px) {
            .welcome-popup {
                max-height: 95vh;
                padding: 10px 15px;
            }
            
            .welcome-title {
                font-size: 18px;
                margin-bottom: 5px;
            }
            
            .welcome-tagline {
                font-size: 10px;
                margin-bottom: 8px;
            }
            
            .language-options {
                grid-template-columns: repeat(3, 1fr);
                gap: 4px;
                margin: 8px auto;
                justify-items: center;
                align-items: center;
            }
            
            .language-btn {
                padding: 4px 3px;
                border-radius: 12px;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 2px;
            }
            
            .lang-flag {
                font-size: 14px;
            }
            
            .lang-name {
                font-size: 8px;
            }
        }

        /* Removed default active state for English button to fix highlighting issue */
        /* English button will now only be highlighted when explicitly given the .active class */
        /* This ensures the selected language from welcome screen is properly highlighted */

        /* CRITICAL: Language button base styles - load FIRST to prevent unstyled flash */
        /* This CSS MUST load before any other styles to prevent rectangular unstyled buttons */
        .lang-switch-btn,
        button.lang-switch-btn,
        button[data-lang],
        .language-switcher-options .lang-switch-btn,
        .language-switcher-container .lang-switch-btn {
            /* IMMEDIATE styling to prevent unstyled flash */
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
            border: 1px solid rgba(102, 126, 234, 0.4) !important;
            border-radius: 8px !important;
            padding: 8px 12px !important;
            cursor: pointer !important;
            font-size: 14px !important;
            font-weight: 500 !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            color: #2c3e50 !important;
            margin: 4px !important;
            min-width: 88px !important;
            justify-content: center !important;
            text-align: center !important;
            text-decoration: none !important;
            outline: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            appearance: none !important;
            font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Sans', Arial, sans-serif !important;
            transition: all 0.2s ease !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
            position: relative !important;
            overflow: hidden !important;
            backdrop-filter: blur(15px) !important;
            /* Touch target size for mobile (minimum 44px height) */
            min-height: 44px !important;
        }

        /* CRITICAL: Active state styling - immediate application */
        .lang-switch-btn.active,
        button.lang-switch-btn.active,
        button[data-lang].lang-switch-btn.active,
        .language-switcher-options .lang-switch-btn.active,
        .language-switcher-container .lang-switch-btn.active,
        .lang-switch-btn[data-lang].active {
            background: linear-gradient(135deg, #4285f4 0%, #0066cc 100%) !important;
            color: white !important;
            border: 2px solid #1565c0 !important;
            transform: none !important;
            box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3) !important;
            font-weight: 600 !important;
            z-index: 2 !important;
        }

        /* CRITICAL: Active button checkmark */
        .lang-switch-btn.active::before,
        button.lang-switch-btn.active::before,
        button[data-lang].lang-switch-btn.active::before,
        .language-switcher-options .lang-switch-btn.active::before,
        .language-switcher-container .lang-switch-btn.active::before {
            content: '✓ ' !important;
            font-weight: bold !important;
            color: #ffd700 !important;
            text-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
            font-size: 14px !important;
        }

/* ================================================
   RESPONSIVE LANGUAGE BUTTON OPTIMIZATIONS
   ================================================ */

/* Tablet optimizations */
@media (max-width: 768px) {
    .lang-switch-btn,
    button.lang-switch-btn,
    button[data-lang],
    .language-switcher-options .lang-switch-btn,
    .language-switcher-container .lang-switch-btn {
        min-width: 76px !important;
        padding: 10px 10px !important;
        font-size: 13px !important;
        margin: 3px !important;
        gap: 4px !important;
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .lang-switch-btn,
    button.lang-switch-btn,
    button[data-lang],
    .language-switcher-options .lang-switch-btn,
    .language-switcher-container .lang-switch-btn {
        min-width: 68px !important;
        padding: 8px 8px !important;
        font-size: 12px !important;
        margin: 2px !important;
        gap: 3px !important;
        border-radius: 6px !important;
    }
    
    .lang-switch-btn.active::before,
    button.lang-switch-btn.active::before,
    button[data-lang].active::before,
    .language-switcher-options .lang-switch-btn.active::before,
    .language-switcher-container .lang-switch-btn.active::before {
        font-size: 12px !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 320px) {
    .lang-switch-btn,
    button.lang-switch-btn,
    button[data-lang],
    .language-switcher-options .lang-switch-btn,
    .language-switcher-container .lang-switch-btn {
        min-width: 60px !important;
        padding: 6px 6px !important;
        font-size: 11px !important;
        margin: 1px !important;
        gap: 2px !important;
    }
}

/* Desktop and laptop optimizations */
@media (min-width: 769px) {
    .lang-switch-btn,
    button.lang-switch-btn,
    button[data-lang],
    .language-switcher-options .lang-switch-btn,
    .language-switcher-container .lang-switch-btn {
        min-width: 100px !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
        margin: 3px !important;
        gap: 8px !important;
        min-height: 42px !important;
        line-height: 1.4 !important;
    }
    
    /* Ensure flags are properly sized on desktop */
    .lang-switch-btn::before {
        font-size: 16px !important;
        line-height: 1 !important;
        display: inline-block !important;
    }
    
          /* Welcome popup language buttons desktop styling */
        .language-options {
            grid-template-columns: repeat(5, 1fr) !important;
            gap: 20px !important;
            margin: 40px auto !important;
            justify-items: center !important;
            align-items: center !important;
        }
        
        .language-btn {
            padding: 20px 15px !important;
            border-radius: 25px !important;
            min-height: 80px !important;
            flex-direction: column !important;
            gap: 8px !important;
        }
        
        .lang-flag {
            font-size: 24px !important;
            font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Color', 'Twemoji', 'Segoe UI Symbol', 'Symbola', 'Arial Unicode MS', sans-serif !important;
            font-variant-emoji: emoji !important;
            -webkit-font-feature-settings: "liga" 1 !important;
            -moz-font-feature-settings: "liga" 1 !important;
            font-feature-settings: "liga" 1 !important;
            text-rendering: optimizeLegibility !important;
            -webkit-text-stroke: 0.01em transparent !important;
            unicode-bidi: bidi-override !important;
            direction: ltr !important;
            color: #333 !important;
            /* Force display */
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .lang-name {
            font-size: 16px !important;
            font-weight: 600 !important;
        }

/* Large desktop screens */
@media (min-width: 1200px) {
    .lang-switch-btn,
    button.lang-switch-btn,
    button[data-lang],
    .language-switcher-options .lang-switch-btn,
    .language-switcher-container .lang-switch-btn {
        min-width: 110px !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        margin: 4px !important;
        gap: 10px !important;
        min-height: 44px !important;
    }
    
    /* Ensure flags are properly sized on large desktop */
    .lang-switch-btn::before {
        font-size: 18px !important;
        line-height: 1 !important;
        display: inline-block !important;
    }
    
    /* Welcome popup language buttons large desktop styling */
    .language-options {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 25px !important;
        margin: 50px 0 !important;
    }
    
    .language-btn {
        padding: 25px 20px !important;
        border-radius: 30px !important;
        min-height: 90px !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .lang-flag {
        font-size: 28px !important;
    }
    
    .lang-name {
        font-size: 18px !important;
        font-weight: 600 !important;
    }
}

        /* Language-specific color schemes for welcome popup buttons */
        .language-btn[onclick*="'en'"] {
            background: linear-gradient(135deg, rgba(250, 112, 154, 0.3) 0%, rgba(254, 225, 64, 0.2) 100%);
            border: 2px solid rgba(250, 112, 154, 0.5);
        }

        .language-btn[onclick*="'en'"]:hover {
            background: linear-gradient(135deg, rgba(250, 112, 154, 0.5) 0%, rgba(254, 225, 64, 0.4) 100%);
            border: 2px solid rgba(250, 112, 154, 0.8);
            box-shadow: 0 15px 40px rgba(250, 112, 154, 0.4), 0 0 30px rgba(250, 112, 154, 0.3);
        }

        .language-btn[onclick*="'te'"] {
            background: linear-gradient(135deg, rgba(255, 107, 107, 0.3) 0%, rgba(255, 142, 83, 0.2) 100%);
            border: 2px solid rgba(255, 107, 107, 0.5);
        }

        .language-btn[onclick*="'te'"]:hover {
            background: linear-gradient(135deg, rgba(255, 107, 107, 0.5) 0%, rgba(255, 142, 83, 0.4) 100%);
            border: 2px solid rgba(255, 107, 107, 0.8);
            box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4), 0 0 30px rgba(255, 107, 107, 0.3);
        }

        .language-btn[onclick*="'hi'"] {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.3) 0%, rgba(68, 160, 141, 0.2) 100%);
            border: 2px solid rgba(78, 205, 196, 0.5);
        }

        .language-btn[onclick*="'hi'"]:hover {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.5) 0%, rgba(68, 160, 141, 0.4) 100%);
            border: 2px solid rgba(78, 205, 196, 0.8);
            box-shadow: 0 15px 40px rgba(78, 205, 196, 0.4), 0 0 30px rgba(78, 205, 196, 0.3);
        }

        .language-btn[onclick*="'he'"] {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.2) 100%);
            border: 2px solid rgba(102, 126, 234, 0.5);
        }

        .language-btn[onclick*="'he'"]:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.4) 100%);
            border: 2px solid rgba(102, 126, 234, 0.8);
            box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4), 0 0 30px rgba(102, 126, 234, 0.3);
        }

        .language-btn[onclick*="'ar'"] {
            background: linear-gradient(135deg, rgba(240, 147, 251, 0.3) 0%, rgba(79, 172, 254, 0.2) 100%);
            border: 2px solid rgba(240, 147, 251, 0.5);
        }

        .language-btn[onclick*="'ar'"]:hover {
            background: linear-gradient(135deg, rgba(240, 147, 251, 0.5) 0%, rgba(79, 172, 254, 0.4) 100%);
            border: 2px solid rgba(240, 147, 251, 0.8);
            box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4), 0 0 30px rgba(240, 147, 251, 0.3);
        }

        .language-btn[onclick*="'el'"] {
            background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.2) 100%);
            border: 2px solid rgba(67, 233, 123, 0.5);
        }

        .language-btn[onclick*="'el'"]:hover {
            background: linear-gradient(135deg, rgba(67, 233, 123, 0.5) 0%, rgba(56, 249, 215, 0.4) 100%);
            border: 2px solid rgba(67, 233, 123, 0.8);
            box-shadow: 0 15px 40px rgba(67, 233, 123, 0.4), 0 0 30px rgba(67, 233, 123, 0.3);
        }

        /* Additional beautiful animations and effects */
        @keyframes buttonPulse {
            0% { 
                transform: scale(1);
                box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            }
            50% { 
                transform: scale(1.02);
                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            }
            100% { 
                transform: scale(1);
                box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            }
        }

        @keyframes shimmer {
            0% { background-position: -200px 0; }
            100% { background-position: calc(200px + 100%) 0; }
        }

        /* Add subtle pulse animation to language mapping buttons when not hovered */
        .language-btn:not(:hover) {
            animation: buttonPulse 4s ease-in-out infinite;
        }

        /* Enhanced language switcher buttons to match the new colorful style */
        .lang-switch-btn[data-lang="en"] {
            background: linear-gradient(135deg, rgba(250, 112, 154, 0.1) 0%, rgba(254, 225, 64, 0.05) 100%) !important;
            border: 1px solid rgba(250, 112, 154, 0.3) !important;
        }

        .lang-switch-btn[data-lang="te"] {
            background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 142, 83, 0.05) 100%) !important;
            border: 1px solid rgba(255, 107, 107, 0.3) !important;
        }

        .lang-switch-btn[data-lang="hi"] {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(68, 160, 141, 0.05) 100%) !important;
            border: 1px solid rgba(78, 205, 196, 0.3) !important;
        }

        .lang-switch-btn[data-lang="he"] {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
            border: 1px solid rgba(102, 126, 234, 0.3) !important;
        }

        .lang-switch-btn[data-lang="ar"] {
            background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(79, 172, 254, 0.05) 100%) !important;
            border: 1px solid rgba(240, 147, 251, 0.3) !important;
        }

        .lang-switch-btn[data-lang="el"] {
            background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.05) 100%) !important;
            border: 1px solid rgba(67, 233, 123, 0.3) !important;
        }

        /* Subtle glow animation for active language buttons */
        @keyframes activeButtonGlow {
            0%, 100% { 
                box-shadow: 0 20px 40px rgba(66, 133, 244, 0.5), 0 0 40px rgba(66, 133, 244, 0.3);
                border-color: #FFD700;
            }
            50% { 
                box-shadow: 0 25px 50px rgba(66, 133, 244, 0.7), 0 0 50px rgba(66, 133, 244, 0.5);
                border-color: #FFA500;
            }
        }

        /* Apply enhanced glow animation to active buttons */
        .language-btn.active,
        .lang-switch-btn.active {
            animation: activeButtonGlow 3s ease-in-out infinite !important;
        }

        /* RTL support for word blocks and breakdowns */
        .word-block.rtl-block {
            direction: rtl;
            text-align: right;
        }

        .word-block.rtl-block .word-text {
            direction: rtl;
            text-align: center;
            unicode-bidi: embed;
        }

        .word-block.rtl-block .word-total {
            direction: rtl;
            text-align: center;
        }

        .word-block.rtl-block .breakdown {
            direction: rtl;
        }

        .word-block.rtl-block .breakdown-table {
            direction: rtl;
        }

        .word-block.rtl-block .breakdown-row {
            direction: rtl;
            display: flex;
            flex-direction: row-reverse;
            justify-content: center;
        }

        .word-block.rtl-block .breakdown-char-cell,
        .word-block.rtl-block .breakdown-value-cell {
            direction: rtl;
            text-align: center;
            unicode-bidi: embed;
        }

        /* Quick View Modal RTL Support */
        .quick-view-content.rtl {
            direction: rtl;
            text-align: right;
        }

        .quick-view-content.rtl .quick-words-container {
            direction: rtl;
            justify-content: center;
        }

        .quick-view-content.rtl .word-block {
            direction: rtl;
        }

        /* Ensure Quick View word blocks never animate - should be instant */
        .quick-view-content .word-block {
            animation: none !important;
            transform: none !important;
            opacity: 1 !important;
            animation-delay: 0s !important;
        }

        /* Enhanced RTL support for Quick View word blocks */
        .quick-view-content .word-block.rtl-block {
            direction: rtl;
            text-align: center;
        }

        .quick-view-content .word-block.rtl-block .word-text {
            direction: rtl;
            text-align: center;
            unicode-bidi: embed;
        }

        .quick-view-content .word-block.rtl-block .word-total {
            direction: rtl;
            text-align: center;
        }

        .quick-view-content .word-block.rtl-block .breakdown {
            direction: rtl;
        }

        .quick-view-content .word-block.rtl-block .breakdown-table {
            direction: rtl;
        }

        .quick-view-content .word-block.rtl-block .breakdown-row {
            direction: rtl;
            display: flex;
            flex-direction: row-reverse;
            justify-content: center;
        }

        .quick-view-content .word-block.rtl-block .breakdown-char-cell,
        .quick-view-content .word-block.rtl-block .breakdown-value-cell {
            direction: rtl;
            text-align: center;
            unicode-bidi: embed;
        }

        /* RTL support for breakdown tables in general */
        .breakdown-table.rtl {
            direction: rtl;
        }

        .breakdown-row.rtl {
            direction: rtl;
            display: flex;
            flex-direction: row-reverse;
            justify-content: center;
        }

        .breakdown-char-cell.rtl,
        .breakdown-value-cell.rtl {
            direction: rtl;
            text-align: center;
            unicode-bidi: embed;
        }

        /* RTL support for main results section */
        .results-section.rtl .word-block {
            direction: rtl;
        }

        .results-section.rtl .breakdown-table {
            direction: rtl;
        }

        .results-section.rtl .breakdown-row {
            direction: rtl;
            display: flex;
            flex-direction: row-reverse;
            justify-content: center;
        }
