/* ===== ISOLATED UPLOAD FORM STYLES - MOBILE OPTIMIZED ===== */
.filexl-upload-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    position: relative;
    z-index: 1;
    color: #333;
}

.upload-container-script {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .upload-container-script {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* --- HEADER FIX: FORCE ONE LINE LAYOUT --- */
.upload-header-script {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 8px;
    flex-wrap: nowrap; /* CRITICAL: Forces elements to stay on one line */
    width: 100%;
}

.header-main-script {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
}

.header-title-script {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.beta-badge-script {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    animation: script-pulse 2s infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

[data-theme="dark"] .header-title-script {
    color: #f1f5f9;
}

.script-icon {
    color: #0d6efd !important;
}

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

.user-type-indicator-script {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.guest-indicator-script {
    background: linear-gradient(45deg, #6c757d, #94a3b8);
    color: white;
}

.user-indicator-script {
    background: linear-gradient(45deg, #0d6efd, #3b82f6);
    color: white;
}

[data-theme="dark"] .script-alert {
    color: #e2e8f0 !important;
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .script-alert a.alert-link {
    color: #60a5fa !important;
    text-decoration: underline;
}

[data-theme="dark"] .script-card {
    background: #334155;
    color: #f1f5f9;
}

.script-progress-bar {
    background: linear-gradient(90deg, #0d6efd, #3b82f6) !important;
}

.script-nav-tabs {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
}

.script-nav-link {
    border: none !important;
    color: #64748b !important;
    padding: 1rem 0.75rem;
    font-weight: 600;
    background: none !important;
}

.script-nav-link.active {
    color: #0d6efd !important;
    border-bottom: 3px solid #0d6efd !important;
}

.drop-area-script {
    border: 3px dashed #0d6efd !important;
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    margin-bottom: 1.5rem;
}

.drop-area-script:hover {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: #0a58ca !important;
}

.script-drop-icon {
    font-size: 3rem;
    color: #0d6efd !important;
    margin-bottom: 1rem;
}

/* Light Theme - Improved Contrast */
.drag-text-script {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0a58ca !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.support-text-script {
    font-size: 0.9rem !important;
    color: #4a5568 !important;
    margin-top: 8px !important;
    line-height: 1.5;
}

[data-theme="dark"] .support-text-script {
    color: #dee905 !important;
}

[data-theme="dark"] .drop-area-script {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

[data-theme="dark"] .drop-area-script:hover {
    border-color: #60a5fa !important;
    background-color: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] .script-drop-icon {
    color: #3b82f6 !important;
}

[data-theme="dark"] .drag-text-script {
    color: #93c5fd !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.folder-upload-btn-script {
    background: linear-gradient(135deg, #0d6efd, #3b82f6);
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    color: white;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.uploading-animation-script {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.big-progress-container-script {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.big-progress-circle-script {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#0d6efd 0%, #e2e8f0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.2);
}

.big-progress-inner-script {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    border: 3px solid #e2e8f0;
}

.big-progress-percent-script {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1;
}

.big-progress-text-script {
    font-size: 0.7rem;
    color: #64748b;
}

.progress-container-script {
    margin-bottom: 1.5rem;
    display: none;
    text-align: left !important;
}

.progress-info-script {
    margin-bottom: 0.5rem;
}

.progress-percent-script {
    font-weight: 700;
    color: #0a58ca;
    margin-bottom: 5px;
    font-size: 1rem;
}

.progress-stats-script {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.progress-stat-script {
    color: #4a5568;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.progress-bar-script {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill-script {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0d6efd, #3b82f6);
    transition: width 0.3s ease;
}

.btn-upload-script {
    width: 100%;
    font-weight: 600;
    padding: 0.8rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd, #3b82f6);
    border: none;
    color: white;
}

.file-item-script {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
}

.file-item-info-script {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin: 0 10px;
}

.file-item-name-script {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    word-break: break-all;
}

.file-item-size-script {
    font-size: 0.75rem;
    color: #4a5568;
    font-weight: 500;
}

.script-form-control,
.script-form-select {
    background-color: white;
    border: 1px solid #ced4da;
    color: #212529;
}

.script-form-label {
    color: #2d3748 !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left !important;
}

.script-form-text {
    color: #4a5568 !important;
    font-size: 0.8rem;
    text-align: left !important;
}

/* ===== ROCKET ANIMATION STYLES ===== */
#themeToggle.custom-theme-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid #dee2e6 !important;
    background-color: #ffffff !important;
    color: #6c757d !important;
    padding: 0 !important;
    margin-left: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

#themeToggle.custom-theme-btn:hover {
    transform: scale(1.1) !important;
    background-color: #f8f9fa !important;
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

[data-theme="dark"] #themeToggle.custom-theme-btn {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #fbbf24 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

.rocket-stage {
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, #1e1b4b, #312e81);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.star {
    position: absolute;
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    top: -20px;
    border-radius: 50%;
    animation: star-fall 1s linear infinite;
}

@keyframes star-fall {
    to { transform: translateY(300px); }
}

.rocket-ship {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    font-size: 4rem;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
    transition: bottom 0.3s ease-out;
    z-index: 10;
}

.rocket-ship::after {
    content: '🔥';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    font-size: 2rem;
    animation: flame-flicker 0.1s infinite alternate;
    margin-top: -10px;
}

@keyframes flame-flicker {
    0% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.cloud-decoration {
    position: absolute;
    font-size: 3rem;
    opacity: 0.3;
    animation: cloud-move 10s linear infinite;
}

@keyframes cloud-move {
    0% { transform: translateY(-50px); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(300px); opacity: 0; }
}

.launch-status {
    position: absolute;
    width: 100%;
    text-align: center;
    bottom: 10px;
    color: white;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 20;
}

.big-percentage-display {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 15;
}

@keyframes star-celebrate {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.celebration-star {
    animation: star-celebrate 1s ease-out;
}

.rocket-ship {
    filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.3));
    transition: bottom 0.3s ease-out, transform 0.3s ease-out, filter 0.3s ease-out;
}

.rocket-ship::after {
    transition: all 0.2s ease;
}

[data-theme="dark"] .rocket-ship {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}

/* ===== RESULT CONTAINER ===== */
.result-container-script {
    margin-top: 1.5rem;
    display: none;
    text-align: left !important;
    width: 100%;
    overflow-x: hidden;
}

.result-container-script .card,
.result-container-script .alert {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-container-script input[type="text"],
.result-container-script input[type="url"],
.result-container-script .form-control {
    max-width: 100%;
    word-break: break-all;
    white-space: normal;
}

.result-container-script .list-group-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.5rem;
}

.result-container-script .file-name {
    font-weight: 600;
    word-break: break-word;
    width: 100%;
}

.result-container-script .file-url-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.result-container-script .file-url-input {
    flex: 1;
    min-width: 0;
}

.result-container-script .copy-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.result-container-script .qr-container {
    max-width: 100%;
    text-align: center;
}

.result-container-script .qr-container img {
    max-width: 200px;
    height: auto;
}

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

.result-container-script .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-container-script .btn {
    white-space: nowrap;
    flex: 1;
    min-width: 120px;
}

/* ===== PREMIUM BANNER STYLES ===== */
.premium-shiny-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-shiny-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    animation: shiny-effect 3s infinite;
}

@keyframes shiny-effect {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.premium-content-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.premium-crown-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffd700;
    flex-shrink: 0;
}

.premium-upgrade-btn {
    background: white;
    color: #9333ea;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    z-index: 2;
    transition: transform 0.2s;
    white-space: nowrap;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.premium-upgrade-btn:hover {
    transform: scale(1.05);
    background: #ffd700;
    color: #333;
}

.close-premium-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 3;
    padding: 15px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    font-size: 1.5rem !important;
    transition: all 0.2s ease !important;
}

.close-premium-btn:hover,
.close-premium-btn:focus {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
}

/* ===== SOCIAL SHARE STYLES ===== */
.share-text {
    color: var(--dark-color) !important;
}

body[data-theme="dark"] .share-text {
    color: #fff !important;
}

.social-share-script {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.social-icons-script {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-icon-script {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.social-icon-script:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.whatsapp-script { background-color: #25D366; }
.twitter-script { background-color: #1DA1F2; }
.telegram-script { background-color: #0088cc; }
.facebook-script { background-color: #1877F2; }
.email-script { background-color: #64748b; }

/* ===== FEATURE BADGES ===== */
.feature-badge-script {
    background: linear-gradient(45deg, #0d6efd, #3b82f6);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}

.feature-badge-script.pro { background: linear-gradient(45deg, #8b5cf6, #a855f7); }
.feature-badge-script.premium { background: linear-gradient(45deg, #f59e0b, #f97316); }
.feature-badge-script.enterprise { background: linear-gradient(45deg, #ef4444, #dc2626); }
.feature-badge-script.fire { background: linear-gradient(45deg, #f59e0b, #eab308); }
.feature-badge-script.expiry { background: linear-gradient(45deg, #06b6d4, #0ea5e9); }

.feature-disabled { opacity: 0.6; cursor: not-allowed; }
.feature-disabled .script-form-check-input,
.feature-disabled .script-form-check-label { cursor: not-allowed; }
.feature-disabled .script-form-check-label { color: #64748b !important; }

/* ===== FORM ELEMENTS ===== */
.script-form-check-input {
    background-color: white;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .script-form-check-input {
    background-color: #1e293b;
    border-color: #334155;
}

.script-form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

[data-theme="dark"] .script-form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.script-form-check-label {
    color: #1e293b !important;
    font-size: 0.9rem;
    text-align: left !important;
}

[data-theme="dark"] .script-form-check-label {
    color: #f1f5f9 !important;
}

.script-tab-content {
    color: #1e293b;
    text-align: left !important;
}

[data-theme="dark"] .script-tab-content {
    color: #f1f5f9;
}

/* ===== DARK THEME OVERRIDES ===== */
[data-theme="dark"] .upload-container-script {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    color: #f1f5f9;
}

[data-theme="dark"] .script-icon { color: #3b82f6 !important; }
[data-theme="dark"] .user-indicator-script { background: linear-gradient(45deg, #3b82f6, #60a5fa); }
[data-theme="dark"] .custom-theme-btn {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .script-nav-link.active {
    color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
}

[data-theme="dark"] .script-nav-link {
    color: #94a3b8 !important;
}

[data-theme="dark"] .script-nav-link:hover {
    color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .folder-upload-btn-script {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .uploading-animation-script {
    background: #334155;
    border-color: #475569;
}

[data-theme="dark"] .big-progress-circle-script {
    background: conic-gradient(#3b82f6 0%, #334155 0%);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .big-progress-inner-script {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .big-progress-percent-script { color: #3b82f6; }
[data-theme="dark"] .big-progress-text-script { color: #94a3b8; }

[data-theme="dark"] .file-item-script {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .file-item-script i { color: #3b82f6; }
[data-theme="dark"] .file-item-name-script { color: #f1f5f9; font-weight: 600; }
[data-theme="dark"] .file-item-size-script { color: #cbd5e1; font-weight: 500; }
[data-theme="dark"] .file-item-progress-script { background-color: #334155; }
[data-theme="dark"] .file-item-progress-fill-script { background-color: #3b82f6; }
[data-theme="dark"] .progress-percent-script { color: #3b82f6; font-weight: 700; }
[data-theme="dark"] .progress-bar-script { background-color: #334155; }
[data-theme="dark"] .progress-bar-fill-script { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
[data-theme="dark"] .btn-upload-script { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
[data-theme="dark"] .btn-upload-script:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3); }

[data-theme="dark"] .error-message-script {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .social-share-script {
    border-top-color: #334155;
}

[data-theme="dark"] .script-form-control,
[data-theme="dark"] .script-form-select {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .script-form-control:focus,
[data-theme="dark"] .script-form-select:focus {
    background-color: #1e293b;
    border-color: #3b82f6;
    color: #f1f5f9;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .script-form-text { color: #a0aec0 !important; }
[data-theme="dark"] .script-form-label { color: #e2e8f0 !important; font-weight: 600; }

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .upload-container-script {
        padding: 1.2rem;
        margin: 1rem 0.5rem;
    }

    /* FIX: REMOVED flex-direction: column to keep header in one line */
    .upload-header-script {
        align-items: center;
        gap: 0.5rem;
    }

    .header-main-script {
        width: auto; /* Changed from 100% to auto to allow side-by-side */
        justify-content: flex-start;
    }

    .user-type-indicator-script {
        align-self: center; /* Changed from flex-start */
    }

    .progress-stats-script {
        flex-direction: column;
        gap: 0.5rem;
    }

    .progress-stat-script {
        color: #4a5568;
        background: #f1f5f9;
        padding: 4px 10px;
        border-radius: 6px;
        white-space: nowrap;
        font-weight: 500;
        border: 1px solid #e2e8f0;
    }

    .big-progress-container-script {
        width: 120px;
        height: 120px;
    }

    .big-progress-inner-script {
        width: 90px;
        height: 90px;
    }

    .big-progress-percent-script {
        font-size: 1.5rem;
    }

    .drop-area-script {
        padding: 1.5rem 0.5rem;
    }

    .result-container-script {
        padding: 0.5rem;
    }

    .result-container-script .card,
    .result-container-script .alert {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .result-container-script .file-url-container {
        flex-direction: column;
        align-items: stretch;
    }

    .result-container-script .file-url-input {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .result-container-script .copy-button {
        width: 100%;
    }

    .result-container-script .stats-grid {
        grid-template-columns: 1fr;
    }

    .result-container-script .btn-group {
        flex-direction: column;
    }

    .result-container-script .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .header-title-script {
        font-size: 1.2rem;
    }

    .beta-badge-script {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .user-type-indicator-script {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    .script-nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .script-drop-icon {
        font-size: 2.5rem;
    }

    .drag-text-script {
        font-size: 1rem;
    }

    .support-text-script {
        font-size: 0.8rem;
    }

    .file-item-script {
        padding: 0.6rem;
    }

    .file-item-progress-script {
        width: 40px;
        margin-right: 0.5rem;
    }

    .social-icons-script {
        gap: 0.5rem;
    }

    .social-icon-script {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* SMALL MOBILE SCREENS: Ensure 1 Line */
@media (max-width: 576px) {
    .upload-header-script {
        flex-direction: row !important; /* CRITICAL: Force row */
        justify-content: space-between;
        align-items: center;
        gap: 4px;
    }

    .header-main-script {
        width: auto;
        flex-shrink: 1;
        gap: 4px;
    }

    .header-title-script {
        font-size: 1rem; /* Smaller font for title on mobile */
        white-space: nowrap;
    }

    .beta-badge-script {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }

    .user-type-indicator-script {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    /* Adjust theme toggle button size for mobile line fitting */
    #themeToggle.custom-theme-btn {
        width: 28px !important;
        height: 28px !important;
    }

    /* All styles below were leaking out before - now contained */
    .script-nav-link {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    .drop-area-script {
        padding: 1.5rem 0.5rem;
    }

    .folder-upload-btn-script {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .big-progress-container-script {
        width: 130px;
        height: 130px;
        margin-bottom: 1.5rem;
    }

    .big-progress-inner-script {
        width: 100px;
        height: 100px;
    }

    .big-progress-percent-script {
        font-size: 1.75rem;
    }

    .big-progress-text-script {
        font-size: 0.7rem;
    }

    .progress-info-script {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-stats-script {
        flex-direction: row;
        gap: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .file-item-name-script {
        font-size: 0.9rem;
    }

    .file-item-size-script {
        font-size: 0.75rem;
    }

    .btn-upload-script {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .script-card {
        padding: 1rem !important;
    }

    .script-alert {
        padding: 0.75rem;
    }

    .script-form-control,
    .script-form-select {
        font-size: 0.85rem;
    }

    .premium-shiny-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 1.5rem 1rem;
    }

    .premium-content-wrapper {
        flex-direction: column;
    }

    .premium-upgrade-btn {
        width: 100%;
    }
} /* <--- CLOSING BRACE FOR 576px MEDIA QUERY */

@media (max-width: 380px) {
    .header-title-script span {
        display: none;
    }

    .script-nav-link {
        font-size: 0.75rem;
        padding: 0.5rem 0.3rem;
    }

    .big-progress-container-script {
        width: 120px;
        height: 120px;
    }

    .big-progress-inner-script {
        width: 90px;
        height: 90px;
    }

    .big-progress-percent-script {
        font-size: 1.5rem;
    }

    .progress-stats-script {
        flex-direction: column;
        gap: 0.25rem;
    }

    .user-type-indicator-script {
        align-self: flex-start;
    }
}

/* ===== SPECIAL SELECT OPTIONS ===== */
option[data-upgrade-link] {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #856404 !important;
    font-style: italic;
    font-weight: 500;
}

[data-theme="dark"] option[data-upgrade-link] {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffd54f !important;
}

option[data-upgrade-link]::before {
    content: "🔥 ";
}

.uploading-fun-fact-script {
    font-style: italic;
    color: #64748b;
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 8px;
    border-left: 3px solid #0d6efd;
    text-align: left !important;
}

[data-theme="dark"] .uploading-fun-fact-script {
    color: #94a3b8;
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
}

/* ===== FIX HEADING STRUCTURE FOR BATCH INFO ===== */
.batch-info-script {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
    text-align: left !important;
}

.batch-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.batch-title {
    font-size: 1rem;
    font-weight: 700;
    color: #065f46;
    display: inline-block;
}

[data-theme="dark"] .batch-title {
    color: #34d399;
}

.batch-description {
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.4;
}

[data-theme="dark"] .batch-description {
    color: #cbd5e1;
}

.files-count-script {
    background-color: #0d6efd;
    color: white !important;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .files-count-script {
    background-color: #3b82f6;
    border-color: #1e293b;
}

/* Alternative: Use semantic heading but skip to h4 instead of h6 */
.batch-heading-semantic {
    display: none;
}

/* Optional: If you want to use a proper heading but make it look like regular text */
.batch-heading-visual {
    font-size: 1rem;
    font-weight: 700;
    color: #065f46;
    margin: 0;
    padding: 0;
    display: inline;
}

[data-theme="dark"] .batch-heading-visual {
    color: #34d399;
}