.status-badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.status-online { background: rgba(52, 199, 89, 0.1); color: #34c759; }
.status-offline { background: rgba(255, 59, 48, 0.1); color: #ff3b30; }
.stats-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}
.stats-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.console-log {
    background: #0d1117;
    border-radius: 14px;
    font-size: 13px;
    margin-top: 20px;
    border: 1px solid #21262d;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.term-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #161b22;
    padding: 10px 14px;
    border-bottom: 1px solid #21262d;
    user-select: none;
}

.term-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.term-dot-red    { background: #ff5f56; }
.term-dot-yellow { background: #ffbd2e; }
.term-dot-green  { background: #27c93f; }

.term-title {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    color: #6e7681;
    letter-spacing: 0.3px;
}

.term-body {
    padding: 16px 18px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.term-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 12.5px;
}

.term-prompt {
    color: #3fb950;
    font-weight: 700;
    flex-shrink: 0;
}

.term-cmd {
    color: #c9d1d9;
    font-size: 12.5px;
}

.term-output {
    padding-left: 18px;
    margin-bottom: 3px;
    color: #c9d1d9;
    font-size: 13px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.term-hi {
    color: #79c0ff;
    font-weight: 600;
}

.term-muted {
    color: #6e7681;
    font-size: 12px;
}

.term-blank {
    height: 8px;
}

.term-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 18px;
    margin-bottom: 4px;
}

.term-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 11px;
    color: #8b949e;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.term-chip i {
    font-size: 10px;
    color: #6e7681;
}

.term-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-left: 18px;
    margin: 8px 0 10px;
}

.term-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: opacity 0.15s, transform 0.1s;
    cursor: pointer;
    user-select: none;
}

.term-btn:active {
    transform: translateY(2px);
    opacity: 0.8;
}

.term-btn-wa {
    background: #1a2e22;
    border-color: #2d4a35;
    color: #7ab88a;
}

.term-btn-sa {
    background: #2b1d10;
    border-color: #4a2e18;
    color: #c4895a;
}

.term-cursor-line {
    margin-top: 6px;
}

.term-cursor {
    color: #3fb950;
    animation: termBlink 1.1s step-end infinite;
    font-size: 13px;
    line-height: 1;
}

@keyframes termBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

#console-logs {
    color: #3fb950;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}
.console-line { margin-bottom: 4px; border-left: 2px solid #3fb950; padding-left: 8px; font-family: 'Fira Code', 'Courier New', monospace; }
.console-time { color: #6e7681; margin-right: 8px; }

:root {
    --ios-bg: #1c1c1e;
    --ios-card: #2c2c2e;
    --ios-text: #ffffff;
    --ios-text-secondary: #8e8e93;
    --ios-primary: #0a84ff;
    --ios-success: #30d158;
    --ios-error: #ff453a;
    --ios-blur: rgba(28, 28, 30, 0.8);
    --ios-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --radius: 20px;
}

[data-theme="light"],
html[data-theme="light"],
body.light {
    --ios-bg: #f2f2f7;
    --ios-card: #ffffff;
    --ios-text: #000000;
    --ios-text-secondary: #8e8e93;
    --ios-primary: #007aff;
    --ios-success: #34c759;
    --ios-error: #ff3b30;
    --ios-blur: rgba(255, 255, 255, 0.85);
    --ios-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--ios-bg);
    color: var(--ios-text);
    line-height: 1.4;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* Nav Bar */
.ios-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
    pointer-events: none; /* Area nav ga ngeblok klik di bawahnya */
}

.nav-blur {
    position: absolute;
    inset: 0;
    background: var(--ios-blur);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--ios-border);
    pointer-events: none; /* Blur ga ngeblok klik */
}

.nav-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: auto; /* Balikin klik cuma buat tombol di dalem nav */
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--ios-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--ios-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:active {
    background: var(--ios-border);
}

/* Main */
.ios-main {
    padding: 80px 16px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    margin-bottom: 30px;
}

/* ── Ninzy Tools WhatsApp Channel Animated Pill ─────────── */
.ninzy-pill-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.ninzy-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.28);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ios-text);
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: ninzyFloat 4s ease-in-out infinite;
    max-width: 100%;
}

[data-theme="light"] .ninzy-pill,
body.light .ninzy-pill {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.35);
    color: #0b6839;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.18);
}

.ninzy-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    animation: ninzyShine 4.5s infinite;
    pointer-events: none;
}

.ninzy-pill:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(37, 211, 102, 0.16);
    border-color: #25d366;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.ninzy-wa-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
    animation: ninzyWiggle 3.5s ease-in-out infinite;
    flex-shrink: 0;
}

.ninzy-pill-text {
    line-height: 1.2;
    white-space: nowrap;
}

.ninzy-pill-text strong {
    color: #25d366;
    font-weight: 700;
}

.ninzy-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #25d366;
    background: rgba(37, 211, 102, 0.15);
    padding: 2px 7px;
    border-radius: 999px;
    border: 0.5px solid rgba(37, 211, 102, 0.35);
    flex-shrink: 0;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25d366;
    display: inline-block;
    animation: ninzyPulse 1.8s infinite;
}

.ninzy-arrow {
    font-size: 10px;
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.ninzy-pill:hover .ninzy-arrow {
    transform: translateX(3px);
    opacity: 1;
}

@keyframes ninzyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes ninzyShine {
    0% { left: -100%; }
    25%, 100% { left: 150%; }
}

@keyframes ninzyWiggle {
    0%, 82%, 100% { transform: rotate(0); }
    86% { transform: rotate(-10deg) scale(1.12); }
    90% { transform: rotate(10deg) scale(1.12); }
    94% { transform: rotate(-5deg) scale(1.05); }
}

@keyframes ninzyPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 480px) {
    .ninzy-pill {
        font-size: 11.5px;
        padding: 5px 10px 5px 6px;
        gap: 6px;
    }
    .ninzy-pill-text {
        font-size: 11.5px;
    }
}

.hero-section h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.hero-section p {
    color: var(--ios-text-secondary);
    font-size: 16px;
    font-weight: 500;
    max-width: 280px;
    margin: 0 auto;
}

/* Cards */
.ios-card {
    background: var(--ios-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

/* Upload Zone Advanced */
.upload-zone {
    border: 2px dashed var(--ios-border);
    border-radius: 20px;
    padding: 40px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--ios-card), var(--ios-bg));
    margin-bottom: 16px;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--ios-primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.upload-zone:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--ios-primary);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.1);
}

.upload-zone:hover::before {
    opacity: 0.05;
}

.upload-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ios-primary), #5856d6);
    color: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.upload-zone:hover .upload-icon-wrapper {
    transform: rotate(10deg) scale(1.1);
}

.upload-zone h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(to right, var(--ios-text), var(--ios-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-zone p {
    color: var(--ios-text-secondary);
    font-size: 14px;
    margin-bottom: 0;
}

.file-list {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Results section spacing */
.results-section {
    margin-top: 25px;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-header i {
    color: var(--ios-success);
    font-size: 22px;
}

.result-card {
    padding: 16px;
    background: var(--ios-bg);
    border-radius: 16px;
    margin-bottom: 12px;
}

.result-url {
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
}

/* Buttons */
.ios-btn {
    width: 100%;
    border-radius: 14px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.primary-btn {
    background: var(--ios-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.primary-btn:active {
    opacity: 0.8;
}

.primary-btn:disabled {
    background: var(--ios-border);
    color: var(--ios-text-secondary);
    cursor: not-allowed;
}

.secondary-btn {
    background: var(--ios-border);
    color: var(--ios-primary);
}

/* File List & Cards */
.file-list {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.file-list-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--ios-primary);
    padding: 6px 12px;
    background: rgba(10, 132, 255, 0.1);
    border: 1px solid rgba(10, 132, 255, 0.2);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-bottom: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ios-border);
    border-radius: 14px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

[data-theme="light"] .file-item,
body.light .file-item {
    background: #f2f2f7;
    border-color: rgba(0, 0, 0, 0.08);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(10, 132, 255, 0.3);
}

[data-theme="light"] .file-item:hover,
body.light .file-item:hover {
    background: #e5e5ea;
}

.file-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.file-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(10, 132, 255, 0.12);
    color: var(--ios-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.file-item-details, .file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.file-item-name, .file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.file-item-size, .file-size {
    font-size: 12px;
    font-weight: 500;
    color: var(--ios-text-secondary);
    margin-top: 2px;
}

.file-remove-btn, .file-remove {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    border: none;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.file-remove-btn:hover, .file-remove:hover {
    background: #ff3b30;
    color: #ffffff;
    transform: scale(1.05);
}

/* Chat Floating */
.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--ios-blur);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    z-index: 2001;
    overflow: hidden;
    border: 1px solid var(--ios-border);
}

/* Invitation Popup */
.chat-invitation {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--ios-card);
    padding: 12px 16px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1999;
    cursor: pointer;
    animation: bounce 2s infinite;
    border: 1px solid var(--ios-primary);
    max-width: 250px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.chat-invitation img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-invitation-text {
    font-size: 13px;
    font-weight: 600;
}

.chat-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--ios-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.05);
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 14px;
    position: relative;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-bubble.user {
    background: rgba(44, 44, 46, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-self: flex-start;
    border-top-left-radius: 2px;
}

/* Settings Modal */
.settings-modal {
    position: absolute;
    inset: 0;
    background: var(--ios-blur);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2010;
    display: none;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.settings-footer {
    margin-top: auto;
}

.chat-bubble.admin {
    background: rgba(10, 132, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.chat-header {
    padding: 12px 16px;
    background: var(--ios-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--ios-border);
    display: flex;
    gap: 10px;
    background: var(--ios-card);
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--ios-border);
    background: var(--ios-bg);
    color: var(--ios-text);
    outline: none;
    font-size: 14px;
}

.chat-meta {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
}

.admin-badge {
    background: #FFD700;
    color: #000;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
    font-weight: 800;
    vertical-align: middle;
}

.admin-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ios-border);
}

.profile-setup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-card {
    width: 100%;
    max-width: 350px;
    animation: slideUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    background: var(--ios-card);
}

.file-name {
    font-weight: 500;
    font-size: 15px;
}

.file-size {
    font-size: 13px;
    color: var(--ios-text-secondary);
}

.file-remove {
    color: var(--ios-error);
    background: none;
    border: none;
    font-size: 18px;
    padding: 8px;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

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

.feature-item i {
    font-size: 28px;
    color: var(--ios-primary);
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 14px;
    color: var(--ios-text-secondary);
}

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

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.animate-text { animation: fadeIn 0.8s ease forwards; }
.animate-text-delay { animation: fadeIn 0.8s 0.3s ease both; }

/* Overlays */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--ios-blur);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
}

.ios-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ios-border);
    border-top-color: var(--ios-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Inline Upload Progress (Non-blocking) */
.upload-progress-card {
    margin-top: 16px;
    padding: 16px;
    background: var(--ios-bg);
    border: 1px solid var(--ios-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease forwards;
    text-align: left;
}

.progress-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(10, 132, 255, 0.2);
    border-top-color: var(--ios-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.progress-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ios-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-detail {
    font-size: 11px;
    color: var(--ios-text-secondary);
    font-family: 'Fira Code', 'Courier New', monospace;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(120, 120, 128, 0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ios-primary), #5856d6);
    border-radius: 10px;
    transition: width 0.2s ease;
}

.progress-footer-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ios-text-secondary);
    line-height: 1.4;
}

/* Toast */
.ios-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--ios-card);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    font-weight: 600;
    white-space: nowrap;
}

.ios-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.ios-footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--ios-text-secondary);
    font-size: 14px;
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--ios-primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
    .chat-container {
        bottom: 0;
        right: 0;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        z-index: 3001;
    }
    
    .chat-header {
        border-radius: 0 !important;
        padding: 15px 20px !important;
    }

    .chat-bubble {
        max-width: 90% !important;
    }

    .chat-messages {
        padding: 10px !important;
    }

    .chat-input-area {
        padding: 15px 20px !important;
        padding-bottom: env(safe-area-inset-bottom, 40px) !important;
        background: var(--ios-card);
    }
}

/* Sidebar */
.ios-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--ios-card);
    z-index: 3000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}

.ios-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 2999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid var(--ios-border);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--ios-text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    padding: 20px 10px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--ios-text);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-item i {
    width: 20px;
    text-align: center;
    color: var(--ios-primary);
}

.nav-item:hover, .nav-item.active {
    background: rgba(10, 132, 255, 0.1);
    color: var(--ios-primary);
}

.nav-divider {
    height: 0.5px;
    background: var(--ios-border);
    margin: 15px 16px;
}

.theme-item {
    justify-content: space-between;
}

/* Switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e9e9eb;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--ios-success);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--ios-text-secondary);
}

.menu-btn {
    background: none;
    border: none;
    color: var(--ios-primary);
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
}

/* API Docs Specific */
.doc-card {
    background: var(--ios-card);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVENESS (< 640px)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .ios-main {
        padding: 70px 10px 40px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .hero-section {
        margin-bottom: 20px;
    }

    .hero-section h1 {
        font-size: 26px;
        word-break: break-word;
    }

    .hero-section p {
        font-size: 14px;
        max-width: 100%;
    }

    .ios-card {
        padding: 14px;
        border-radius: 16px;
        margin-bottom: 12px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .upload-zone {
        padding: 24px 12px;
        border-radius: 16px;
    }

    .upload-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 14px;
        margin-bottom: 10px;
    }

    .upload-zone h3 {
        font-size: 16px;
    }

    .upload-zone p {
        font-size: 13px;
    }

    .btn-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .ios-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        justify-content: center;
    }

    .stats-card {
        padding: 12px;
        border-radius: 14px;
    }

    .stats-item h4 {
        font-size: 18px;
    }

    .stats-item span {
        font-size: 11px;
    }

    /* Floating Chat on mobile */
    .chat-container {
        right: 8px !important;
        left: 8px !important;
        bottom: 80px !important;
        width: auto !important;
        height: calc(100vh - 160px) !important;
        max-height: 520px !important;
        border-radius: 16px;
    }

    .chat-invitation {
        right: 12px;
        bottom: 80px;
        max-width: 200px;
        padding: 8px 12px;
    }

    .chat-floating-btn {
        right: 12px;
        bottom: 14px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    /* Result Card on mobile */
    .result-card {
        padding: 12px;
        border-radius: 14px;
    }

    .result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .result-input-group {
        width: 100%;
    }

    .term-body {
        padding: 12px;
    }

    .term-line {
        font-size: 11px;
        flex-wrap: wrap;
    }

    .term-output {
        font-size: 11.5px;
        padding-left: 8px;
        word-break: break-all;
    }

    .term-actions {
        flex-direction: column;
        gap: 6px;
    }

    .term-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ── Modern AIO/SEO FAQ Accordion ────────────── */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-item[open] {
    border-color: rgba(10, 132, 255, 0.4);
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.08);
}

.faq-summary {
    list-style: none;
    padding: 16px 20px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ios-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-icon-chevron {
    font-size: 12px;
    color: var(--ios-primary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-icon-chevron {
    transform: rotate(180deg);
}

.faq-content {
    padding: 0 20px 18px 20px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--ios-text-secondary);
    border-top: 1px solid transparent;
}

.faq-item[open] .faq-content {
    border-top-color: var(--ios-border);
    padding-top: 12px;
}