html {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    position: relative;
    touch-action: pan-y;
}

#tab-translate:checked ~ footer #nav-translate { color: #2563eb; }
.dark #tab-translate:checked ~ footer #nav-translate { color: #60a5fa; }

#tab-history:checked ~ footer #nav-history { color: #2563eb; }
.dark #tab-history:checked ~ footer #nav-history { color: #60a5fa; }

.scrollbar-custom::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-custom::-webkit-scrollbar-track { background: transparent; }
.scrollbar-custom::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.scrollbar-custom::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

.dark .scrollbar-custom::-webkit-scrollbar-thumb { background: #4b5563; }
.dark .scrollbar-custom::-webkit-scrollbar-thumb:hover { background: #6b7280; }

.prose p { margin-bottom: 0.75em; line-height: 1.6; }
.prose ul { list-style-type: disc; padding-left: 1.2em; margin-bottom: 0.75em; }
.prose strong { color: #1f2937; font-weight: 600; }

.dark .prose strong { color: #e5e7eb; }
.dark .prose code { background-color: #374151; color: #e5e7eb; padding: 0.2em 0.4em; border-radius: 0.25em; font-size: 0.9em; }
.dark .prose pre { background-color: #1f2937; color: #e5e7eb; padding: 1em; border-radius: 0.5em; overflow-x: auto; }
.dark .prose a { color: #60a5fa; }

button:active { transform: translateY(1px); }

.slider-custom { -webkit-appearance: none; background: #e5e7eb; outline: none; }
.dark .slider-custom { background: #374151; }

.slider-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark .slider-custom::-webkit-slider-thumb {
    background: #3b82f6;
    border-color: #1f2937;
}

.material-symbols-rounded {
    font-size: 24px;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}
.text-lg .material-symbols-rounded { font-size: 28px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
