:root {
    --primary-dark: #0f1c2e;
    --primary-light: #1f3a56;
    --accent-blue: #375a7f;
    --accent-green: #37b089;
    --accent-gold: #fbbf24;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #0f1c2e 0%, #1f4068 100%);
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
}

.floating-audio-player {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1500;
    background: linear-gradient(160deg, rgba(21, 36, 60, 0.85), rgba(10, 18, 32, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    max-width: min(320px, 86vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-audio-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-mini-trigger {
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
    background: linear-gradient(135deg, rgba(55, 176, 137, 0.95), rgba(251, 191, 36, 0.85));
    color: #0b1220;
    padding: 10px 12px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(55, 176, 137, 0.35);
}

.audio-mini-trigger i {
    font-size: 0.9rem;
}

.audio-eq-mini {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.audio-eq-mini span {
    width: 4px;
    height: 6px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    animation: audio-eq-mini 1s ease-in-out infinite;
    animation-play-state: paused;
}

.audio-eq-mini span:nth-child(2) {
    animation-delay: 0.15s;
}

.audio-eq-mini span:nth-child(3) {
    animation-delay: 0.3s;
}

.floating-audio-player.is-playing .audio-eq-mini span {
    animation-play-state: running;
}

.floating-audio-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, rgba(55, 176, 137, 0.95), rgba(251, 191, 36, 0.85));
    color: #0b1220;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(55, 176, 137, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audio-control-btn:active {
    transform: scale(0.96);
    box-shadow: 0 6px 14px rgba(55, 176, 137, 0.3);
}

.audio-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.floating-audio-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.02em;
}

.floating-audio-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.audio-eq {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 20px;
    width: 40px;
}

.audio-eq span {
    display: block;
    width: 6px;
    height: 6px;
    background: rgba(251, 191, 36, 0.85);
    border-radius: 6px;
    transform-origin: bottom center;
    animation: audio-eq 1s ease-in-out infinite;
    animation-play-state: paused;
}

.audio-eq span:nth-child(2) {
    animation-delay: 0.15s;
    background: rgba(55, 176, 137, 0.9);
}

.audio-eq span:nth-child(3) {
    animation-delay: 0.3s;
}

.audio-eq span:nth-child(4) {
    animation-delay: 0.45s;
    background: rgba(255, 255, 255, 0.75);
}

.audio-collapse-btn {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 6px;
}

.floating-audio-player.is-playing .audio-eq span {
    animation-play-state: running;
}

.floating-audio-player audio {
    display: none;
}

.audio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-volume i {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.audio-volume-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(55, 176, 137, 0.9), rgba(251, 191, 36, 0.8));
    outline: none;
}

.audio-volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.audio-volume-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

@keyframes audio-eq {
    0% {
        height: 6px;
    }
    50% {
        height: 20px;
    }
    100% {
        height: 8px;
    }
}

@keyframes audio-eq-mini {
    0% {
        height: 6px;
    }
    50% {
        height: 14px;
    }
    100% {
        height: 7px;
    }
}

@media (max-width: 767px) {
    .floating-audio-player {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        right: 14px;
    }

    .floating-audio-player.is-collapsed {
        padding: 10px;
        border-radius: 999px;
        gap: 0;
    }

    .floating-audio-player.is-collapsed .floating-audio-body {
        display: none;
    }

    .floating-audio-player.is-collapsed .audio-mini-trigger {
        display: inline-flex;
    }

    .floating-audio-player.is-open .audio-mini-trigger {
        display: none;
    }

    .floating-audio-player.is-open .audio-collapse-btn {
        display: inline-flex;
    }
}

.server-toast {
    background: rgba(15, 23, 42, 0.3);
    color: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 300px;
}

.server-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.server-toast i {
    color: #2dd4bf;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--primary-dark);
    color: var(--text-white);
    height: 100vh;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* Hidden by default, shown on desktop via media query */
.desktop-sidebar {
    display: none;
}

#app {
    width: 100%;
    max-width: 480px;
    height: 100%;
    min-height: 100svh;
    background: linear-gradient(to top, #0f1c2e 50%, rgba(15, 28, 46, 0.6) 100%), url('https://images.unsplash.com/photo-1584551246679-0daf3d275d0f?q=80&w=1000&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#app input[type="text"],
#app input[type="email"],
#app input[type="password"],
#app input[type="search"],
#app input[type="tel"],
#app input[type="url"],
#app textarea,
.feature-page input[type="text"],
.feature-page input[type="email"],
.feature-page input[type="password"],
.feature-page input[type="search"],
.feature-page input[type="tel"],
.feature-page input[type="url"],
.feature-page textarea {
    font-size: 16px;
}

.hidden {
    display: none !important;
}

.feature-page {
    width: 100%;
    max-width: 480px;
    height: 100%;
    min-height: 100svh;
    background: var(--gradient-main);
    position: fixed;
    top: 0;
    left: 50%;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    opacity: 0;
    transform: translate3d(-50%, 12px, 0) scale(0.98);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 0.8, 0.28, 1);
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 1000;
}

#chat-group-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100svh;
    max-width: none;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    transform: translate3d(0, 12px, 0) scale(0.98);
    background: transparent;
    box-shadow: none;
}

#chat-group-modal.active {
    transform: translate3d(0, 0, 0) scale(1);
}

#chat-group-modal .modal-content {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100svh;
}

#assistant-modal {
    height: 100vh;
    height: 100dvh;
    min-height: 100svh;
}

#assistant-modal .modal-content {
    height: 100vh;
    height: 100dvh;
    min-height: 100svh;
}

.feature-page.active {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
    pointer-events: auto;
}

.feature-page .modal-content {
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    animation: none;
    position: relative;
}

.feature-page .close-modal {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.6rem;
}

.tutorial-btn i {
    color: var(--accent-gold);
}

.tutorial-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

#video-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2500;
}

#video-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

#video-modal-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
}

#video-modal-container {
    width: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1096 / 1080;
}

#video-modal-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

#video-modal-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Splash Screen */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1584551246679-0daf3d275d0f?q=80&w=1000&auto=format&fit=crop') no-repeat center center/cover;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: opacity 0.5s ease;
}

#splash::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #0f1c2e 20%, transparent 100%);
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 3rem;
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #bbe1fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: serif;
}

.splash-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.verify-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.verify-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.verify-input-wrap i {
    color: var(--accent-gold);
    font-size: 0.9rem;
}

.verify-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 16px;
}

.verify-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.verify-message {
    font-size: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    text-align: center;
}

.verify-message.success {
    background: rgba(55, 176, 137, 0.18);
    color: #a7f3d0;
}

.verify-message.error {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(55, 176, 137, 0.95));
    color: #0f1c2e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 28, 46, 0.25);
}

.verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.splash-content {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.btn-start.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-start {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-start:hover {
    background: white;
    color: var(--primary-dark);
    transform: scale(1.1);
}

@media (max-width: 480px),
(max-height: 720px) {
    #splash {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .splash-content {
        margin-bottom: 1.5rem;
    }

    .splash-desc {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .verify-form {
        max-width: 360px;
    }

    .verify-input-wrap {
        padding: 0.6rem 0.9rem;
    }

    .verify-btn {
        padding: 0.65rem 0.95rem;
        font-size: 0.95rem;
    }

    .hero-card {
        padding-bottom: 1.5rem;
    }

    .hero-card .online-info-card {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        margin-top: 0.9rem;
    }
}

/* Header */
header {
    padding: calc(2rem + env(safe-area-inset-top)) 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info h2 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.user-info h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

/* Iftar Card */
.hero-card {
    margin: 1rem 1.5rem;
    background: linear-gradient(90deg, #162447, #1f4068);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(55, 176, 137, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.online-info-card {
    margin: 0;
    background: rgba(15, 28, 46, 0.5);
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.hero-card .online-info-card {
    margin-top: 0.9rem;
}

.online-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.online-info-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.online-info-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #37b089, #1f8a70);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    margin-left: auto;
}

.online-info-dot {
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.online-info-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.online-info-list {
    margin-top: 0.6rem;
}

.systeminfo-card {
    margin: 0.75rem 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(22, 36, 71, 0.95), rgba(31, 64, 104, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.systeminfo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.98));
}

.systeminfo-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.systeminfo-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    font-size: 0.85rem;
}

.systeminfo-header h2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: 0.01em;
}

.systeminfo-total-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.75);
    margin-top: 0.15rem;
}

.systeminfo-overall {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    white-space: nowrap;
}

.systeminfo-overall.online {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #a7f3d0;
}

.systeminfo-overall.partial {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.systeminfo-overall.offline {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.systeminfo-body {
    padding: 0.75rem;
    background: rgba(15, 28, 46, 0.5);
}

.systeminfo-grid {
    display: grid;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.systeminfo-grid::-webkit-scrollbar {
    display: none;
}

.systeminfo-item {
    min-width: 150px;
    border-radius: 14px;
    padding: 0.7rem;
    background: linear-gradient(140deg, rgba(15, 28, 46, 0.85), rgba(31, 64, 104, 0.7));
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 20px rgba(6, 18, 34, 0.35);
}

.systeminfo-item::after {
    content: none;
}

.systeminfo-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: #cbd5f5;
}

.systeminfo-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 28, 46, 0.5);
    color: #cbd5f5;
}

.systeminfo-status .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
}

.systeminfo-status.online {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.2);
    color: #bbf7d0;
}

.systeminfo-status.online .dot {
    background: #10b981;
}

.systeminfo-status.offline {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.systeminfo-status.offline .dot {
    background: #ef4444;
}

.systeminfo-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.systeminfo-metric label {
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.systeminfo-metric .value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 0.1rem;
}

.systeminfo-total {
    font-size: 0.6rem;
    color: #cbd5f5;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.4rem;
}

.online-info-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
}

.online-info-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #37b089, #1f8a70);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #071827;
    flex-shrink: 0;
}

.online-info-content {
    flex: 1;
    min-width: 0;
}

.online-info-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.online-info-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.online-info-badge {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fde047);
    color: #78350f;
}

.online-info-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.4rem 0;
}

.timer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.timer-badge {
    background: var(--accent-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.countdown {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
    letter-spacing: 2px;
}

/* Section Titles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin: 1.5rem 0 1rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.see-all {
    font-size: 0.85rem;
    color: var(--accent-green);
    text-decoration: none;
}

/* Features Grid */
.features-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 1.5rem;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.features-scroll::-webkit-scrollbar {
    display: none;
}

.feature-card {
    min-width: 105px;
    height: 125px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent-gold);
}

.feature-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 0.5rem;
}

.feature-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Magic AI Section - Special Styling */
.magic-section {
    margin: 0 1.5rem 2.5rem;
}

.home-tab-grid {
    margin: 0 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-tab-grid .home-tab-card {
    margin: 0;
}

.magic-card {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.magic-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.magic-info h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.magic-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.feature-menu-header,
.profile-header {
    padding: 4rem 1.5rem 1rem;
    text-align: center;
}

.feature-menu-header h2,
.profile-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.feature-menu-header p,
.profile-header p {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.feature-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0 1.5rem 2rem;
}

.feature-menu-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.feature-menu-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.25);
}

.feature-menu-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-menu-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-white);
}

.profile-card {
    margin: 0 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-value {
    color: var(--text-white);
    font-weight: 600;
}

.profile-logout-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    background: #ef4444;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-logout-btn:hover {
    background: #dc2626;
}

.profile-affiliate-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
    transition: all 0.3s ease;
}

.profile-affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.chat-group-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.chat-group-entry {
    height: 100%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(25, 44, 68, 0.92), rgba(12, 26, 42, 0.92));
    position: absolute;
    inset: 0;
    z-index: 5;
    backdrop-filter: blur(6px);
}

.chat-group-entry-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.35);
}

.chat-group-entry h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.chat-group-entry p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-group-entry-form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.chat-group-entry-form input,
.chat-group-entry-form select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 17, 30, 0.9);
    color: var(--text-white);
    font-size: 16px;
}

.chat-group-entry-form select {
    appearance: none;
}

.chat-group-entry-form input:focus,
.chat-group-entry-form select:focus {
    outline: none;
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.chat-group-error {
    min-height: 1rem;
    color: #f87171;
    font-size: 0.75rem;
}

.chat-group-entry-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #37b089, #2dd4bf);
    color: #051923;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.chat-group-interface {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.chat-group-backbar {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.1rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.chat-group-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    cursor: pointer;
    font-weight: 600;
    line-height: 1;
}

.chat-group-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.chat-group-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b1a2c;
    font-size: 1.2rem;
}

.chat-group-topbar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.chat-group-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    row-gap: 0.35rem;
}

.chat-group-title-row h3 {
    font-size: 0.98rem;
    font-weight: 600;
}

.chat-group-online {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.chat-group-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

.chat-group-online-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
    cursor: pointer;
}

.chat-group-welcome {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-group-logout {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f87171;
    cursor: pointer;
}

.chat-group-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.group-chat-bubble {
    max-width: 84%;
    padding: 0.7rem 0.9rem;
    border-radius: 18px;
    font-size: 0.86rem;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    word-break: break-word;
}

.group-chat-bubble.me {
    align-self: flex-end;
    background: linear-gradient(135deg, #37b089, #2563eb);
    color: #f8fafc;
}

.group-chat-bubble.other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

.group-chat-bubble .username {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fde68a;
}

.group-chat-bubble .message-time {
    font-size: 0.65rem;
    opacity: 0.7;
}

.chat-group-history-blurred {
    filter: blur(2px);
    opacity: 0.7;
}

.group-chat-bubble.system {
    align-self: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    color: var(--text-white);
}

.group-chat-bubble.system.alert {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.chat-bubble-user {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.chat-bubble-text {
    margin-top: 4px;
}

.chat-group-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.chat-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.68rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chat-action-btn.chat-delete-btn {
    color: #fca5a5;
}

.chat-action-btn.chat-ban-btn {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
}

.chat-action-btn.chat-unban-btn {
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.35);
}

.chat-tag {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
}

.chat-tag.vip {
    background: linear-gradient(135deg, #f59e0b, #fde047);
    color: #78350f;
}

.chat-tag.admin {
    background: #ef4444;
    color: #fff;
}

.reply-quote-user {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--accent-gold);
}

.reply-quote-text {
    font-size: 0.7rem;
}

.reply-quote {
    margin-top: 6px;
    padding: 6px 8px;
    border-left: 2px solid rgba(251, 191, 36, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.reply-preview-container {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border-left: 2px solid var(--accent-gold);
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.reply-preview-container.active {
    display: flex;
}

.reply-preview-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.reply-preview-user {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.reply-preview-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-close {
    border: none;
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
}

.chat-group-footer {
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.chat-group-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.chat-group-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    min-height: 44px;
    min-width: 0;
}

.chat-group-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.chat-group-send-btn,
.chat-group-join-btn {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    background: #37b089;
    color: #071827;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}

.chat-group-send-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-group-join-btn {
    flex: 1 1 100%;
    justify-content: center;
}

.chat-group-send-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
}

.chat-group-filter-toggle-wrap {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5f5;
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.slider {
    background-color: #37b089;
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(22px);
}

.toggle-switch.vertical {
    width: 28px;
    height: 50px;
}

.toggle-switch.vertical .slider:before {
    left: 4px;
    top: 4px;
    bottom: auto;
}

.toggle-switch.vertical input:checked+.slider:before {
    transform: translateY(22px);
}

#token-key-modal.chat-group-modal {
    z-index: 10000;
}

.chat-group-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1200;
}

.chat-group-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.chat-group-modal-content {
    width: min(90vw, 360px);
    background: rgba(11, 24, 40, 0.95);
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.chat-group-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-white);
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-group-modal-close {
    border: none;
    background: transparent;
    color: var(--text-white);
    font-size: 1rem;
    cursor: pointer;
}

.chat-group-modal-list {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 50vh;
    overflow-y: auto;
}

.chat-group-modal-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--text-white);
}

.chat-group-modal-item span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-group-modal-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    background: rgba(15, 28, 46, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    height: 70px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.nav-item {
    color: var(--text-muted);
    font-size: 1.2rem;
    position: relative;
    padding: 10px;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-item.active {
    color: var(--bg-white);
}

.nav-center {
    width: 55px;
    height: 55px;
    background: var(--text-white);
    border-radius: 15px;
    margin-top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
}

.nav-center i {
    transform: rotate(-45deg);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Logo Upload Controls */
.option-btn.selected {
    background: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 10px rgba(55, 176, 137, 0.5);
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Generation Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(to top, #0f1c2e 50%, rgba(15, 28, 46, 0.6) 100%), url('https://images.unsplash.com/photo-1584551246679-0daf3d275d0f?q=80&w=1000&auto=format&fit=crop') no-repeat center center/cover;
    border-radius: 30px 30px 0 0;
    padding: 2rem;
    min-height: 50vh;
    max-height: 90vh;
    /* Limit height */
    overflow-y: auto;
    /* Enable scrolling */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.drag-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}

.close-modal {
    float: right;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Fullscreen Result View */
#fullscreen-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #101828;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#fullscreen-result.active {
    opacity: 1;
    pointer-events: auto;
}

.result-container {
    width: 100%;
    max-width: 400px;
    background: #1f2937;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.result-image-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-action {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-action:active {
    transform: scale(0.95);
}

.btn-download {
    background: var(--accent-green);
    color: white;
}

.feature-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chef-status-spinner {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-green);
    display: inline-block;
    margin-right: 6px;
    animation: chefSpin 1s linear infinite;
    vertical-align: middle;
}

@keyframes chefSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.chef-recipe-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.chef-recipe-image {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
}

.chef-recipe-image-img {
    width: 100%;
    display: block;
    cursor: pointer;
}

.chef-recipe-image-fallback {
    text-align: center;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
}

.chef-recipe-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.chef-recipe-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.chef-recipe-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
}

.chef-recipe-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chef-recipe-list,
.chef-recipe-steps {
    padding-left: 1.1rem;
    margin: 0;
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
}

@media (max-width: 767px) {
    #chef-result-card {
        padding: 0.75rem !important;
    }

    #chef-result-content {
        padding: 0.4rem !important;
    }

    .chef-recipe-card {
        padding: 0.75rem;
        gap: 0.8rem;
    }

    .chef-recipe-section {
        padding: 0.65rem;
    }

    .chef-recipe-title {
        font-size: 1rem;
    }

    .app-footer {
        padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
    }

    .chat-group-page {
        height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

/* Desktop / Full Screen Layout */
@media (min-width: 768px) {

    /* ===== DESKTOP SIDEBAR ===== */
    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 240px;
        background: linear-gradient(180deg, rgba(15, 28, 46, 0.82) 0%, rgba(10, 18, 32, 0.92) 100%), url('https://images.unsplash.com/photo-1584551246679-0daf3d275d0f?q=80&w=1000&auto=format&fit=crop') no-repeat center center/cover;
        backdrop-filter: blur(16px);
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        z-index: 200;
        padding: 1.5rem 0;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        border-radius: 0 24px 24px 0;
    }

    .desktop-sidebar::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(12, 22, 38, 0.5);
        backdrop-filter: blur(18px);
        pointer-events: none;
        z-index: 0;
    }

    .desktop-sidebar>* {
        position: relative;
        z-index: 1;
    }

    .sidebar-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0.5rem 1.5rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        margin-bottom: 0.5rem;
    }

    .sidebar-logo-img {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.15);
    }

    .sidebar-brand {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-white);
    }

    .sidebar-pro-badge {
        font-size: 0.55rem;
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        color: #000;
        padding: 2px 7px;
        border-radius: 5px;
        font-weight: 800;
        margin-left: 4px;
        vertical-align: top;
        letter-spacing: 0.5px;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0.8rem 0.75rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    }

    .sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .sidebar-nav-label {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: var(--text-muted);
        padding: 0.6rem 1rem 0.3rem;
        margin-top: 0.3rem;
        opacity: 0.6;
    }

    .sidebar-nav-label:first-child {
        margin-top: 0;
    }

    .sidebar-nav-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.06);
        margin: 0.5rem 0.75rem;
    }

    .sidebar-nav-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 0.75rem 1rem;
        border-radius: 12px;
        cursor: pointer;
        color: var(--text-muted);
        font-size: 0.88rem;
        font-weight: 500;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .sidebar-nav-item i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
        transition: transform 0.25s;
    }

    .sidebar-nav-item:hover {
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-white);
        transform: translateX(3px);
    }

    .sidebar-nav-item:hover i {
        transform: scale(1.15);
    }

    .sidebar-nav-item.active {
        background: linear-gradient(135deg, rgba(55, 176, 137, 0.15), rgba(55, 176, 137, 0.08));
        color: var(--accent-green);
        font-weight: 600;
        border: 1px solid rgba(55, 176, 137, 0.2);
    }

    .sidebar-nav-item.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
        background: var(--accent-green);
        border-radius: 0 3px 3px 0;
    }

    .sidebar-nav-center {
        margin: 0.5rem 0;
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.05));
        border: 1px solid rgba(251, 191, 36, 0.15);
    }

    .sidebar-nav-center i {
        color: var(--accent-gold);
    }

    .sidebar-nav-center:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.1));
        border-color: rgba(251, 191, 36, 0.3);
        color: var(--accent-gold);
    }

    .sidebar-footer {
        padding: 1rem 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.7rem;
        color: var(--text-muted);
        opacity: 0.6;
    }

    /* ===== HIDE MOBILE ELEMENTS ===== */
    .bottom-nav {
        display: none !important;
    }

    .app-footer {
        margin-bottom: 2rem !important;
    }

    /* ===== MAIN APP LAYOUT ===== */
    body {
        overflow: auto;
    }

    #app {
        max-width: 100%;
        width: 100%;
        margin-left: 240px;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: none;
        border-radius: 0;
        display: block;
        background: linear-gradient(to top, #0f1c2e 50%, rgba(15, 28, 46, 0.6) 100%), url('https://images.unsplash.com/photo-1584551246679-0daf3d275d0f?q=80&w=1000&auto=format&fit=crop') no-repeat center center/cover;
    }

    /* ===== ENHANCED HEADER ===== */
    header {
        padding: 2rem 3rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        margin-bottom: 0.5rem;
    }

    .user-info h2 {
        font-size: 0.85rem;
        color: var(--text-muted);
        font-weight: 300;
        letter-spacing: 0.3px;
    }

    .user-info h1 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-top: 2px;
        background: linear-gradient(135deg, #fff, #c8dbe8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .icon-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.25s;
    }

    .icon-btn:hover {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.3);
        color: #ef4444;
        transform: scale(1.05);
    }

    /* ===== DASHBOARD GRID LAYOUT ===== */
    .dashboard-top {
        display: grid;
        grid-template-columns: 380px 1fr;
        gap: 2rem;
        padding: 0 3rem;
    }

    /* ===== ENHANCED HERO CARD ===== */
    .hero-card {
        margin: 1rem 3rem;
        background: linear-gradient(135deg, #162447 0%, #1f4068 50%, #1a3a5c 100%);
        border-radius: 24px;
        padding: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 0 60px rgba(55, 176, 137, 0.03);
        position: relative;
        overflow: hidden;
    }

    .systeminfo-card {
        margin: 1rem 3rem;
    }

    .hero-card::before {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 180px;
        height: 180px;
        background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .hero-card .countdown {
        font-size: 3.2rem;
        font-weight: 800;
        letter-spacing: 4px;
        background: linear-gradient(135deg, #fff, #e0eaff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .timer-badge {
        font-size: 0.75rem;
        font-weight: 600;
        padding: 5px 14px;
        border-radius: 20px;
        letter-spacing: 0.3px;
    }

    /* ===== PRAYER SECTION ===== */
    .prayer-section-wrapper {
        margin: 0 3rem;
    }

    .prayer-section-wrapper .section-header {
        padding: 0;
        margin: 1.5rem 0 1rem;
    }

    .features-scroll {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        overflow-x: visible;
        padding: 0;
        padding-bottom: 1rem;
    }

    .feature-card {
        min-width: 0;
        height: 115px;
        border-radius: 18px;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .feature-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }

    .feature-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    /* ===== SECTION HEADER ===== */
    .section-header {
        padding: 0 3rem;
        margin: 2rem 0 1.2rem;
    }

    .section-title {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .see-all {
        font-size: 0.8rem;
        font-weight: 500;
        padding: 5px 12px;
        border-radius: 20px;
        background: rgba(55, 176, 137, 0.1);
        border: 1px solid rgba(55, 176, 137, 0.2);
        transition: all 0.25s;
    }

    .see-all:hover {
        background: rgba(55, 176, 137, 0.2);
        border-color: rgba(55, 176, 137, 0.4);
    }

    /* ===== MAGIC STUDIO SECTION ===== */
    .magic-studio-wrapper {
        margin: 0;
    }

    .magic-studio-wrapper .section-header {
        padding: 0 3rem;
    }

    .magic-section {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1rem;
        margin: 0 3rem 1.5rem;
        padding: 0;
    }

    .home-tab-grid {
        margin: 0 3rem 1.5rem;
        flex-direction: row;
    }

    .home-tab-grid .home-tab-card {
        flex: 1;
    }

    .magic-card {
        background: linear-gradient(135deg, rgba(43, 88, 118, 0.6) 0%, rgba(78, 67, 118, 0.6) 100%);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 18px;
        padding: 1.2rem;
        margin-bottom: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .magic-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
        background: linear-gradient(135deg, rgba(43, 88, 118, 0.8) 0%, rgba(78, 67, 118, 0.8) 100%);
    }

    .magic-thumb {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        flex-shrink: 0;
    }

    .magic-info h3 {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .magic-info p {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    /* ===== FEATURE MENU GRID (ALL FEATURES MODAL) ===== */
    .feature-menu-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
        padding: 0 3rem 3rem;
    }

    .feature-menu-card {
        border-radius: 20px;
        padding: 20px 14px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .feature-menu-card:hover {
        transform: translateY(-4px);
        background: rgba(255, 255, 255, 0.14);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }

    .feature-menu-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .feature-menu-label {
        font-size: 0.82rem;
    }

    /* ===== FEATURE PAGE (MODALS) — INLINE WITH SIDEBAR ===== */
    .feature-page {
        left: calc(240px + 20px);
        top: 20px;
        width: calc(100% - 240px - 40px);
        max-width: none;
        height: calc(100vh - 40px);
        min-height: auto;
        transform: translate3d(0, 12px, 0) scale(0.98);
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
        overflow: hidden;
    }

    .feature-page.active {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .feature-page .modal-content {
        height: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .feature-page .close-modal {
        top: 1.5rem;
        left: 2rem;
    }

    /* Chat group & assistant sit in the content area with padding */
    #chat-group-modal {
        left: calc(240px + 20px);
        top: 20px;
        width: calc(100% - 240px - 40px);
        max-width: none;
        height: calc(100vh - 40px);
        min-height: auto;
        transform: translate3d(0, 12px, 0) scale(0.98);
        border-radius: 18px;
    }

    #chat-group-modal.active {
        transform: translate3d(0, 0, 0) scale(1);
    }

    #chat-group-modal .modal-content {
        width: 100%;
        height: 100%;
        min-height: auto;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        border-radius: 18px;
    }

    #assistant-modal {
        left: calc(240px + 20px);
        top: 20px;
        width: calc(100% - 240px - 40px);
        max-width: none;
        height: calc(100vh - 40px);
        min-height: auto;
    }

    #assistant-modal .modal-content {
        height: 100%;
        min-height: auto;
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Quran modal also inline with padding */
    #quran-modal {
        left: calc(240px + 20px) !important;
        top: 20px !important;
        width: calc(100% - 240px - 40px) !important;
        max-width: none !important;
        height: calc(100vh - 40px) !important;
    }

    /* When a feature page is open on desktop, #app is hidden but sidebar stays */
    #app.desktop-feature-open {
        visibility: hidden;
        pointer-events: none;
    }

    /* ===== PROFILE SECTION ===== */
    .profile-header {
        padding-top: 4.5rem;
    }

    .profile-card {
        max-width: 500px;
        margin: 0 auto 2rem;
        border-radius: 20px;
    }

    /* ===== FOOTER ===== */
    .app-footer {
        text-align: center;
        padding: 1rem 3rem;
        margin: 1rem 0 2rem !important;
        font-size: 0.7rem;
        opacity: 0.5;
    }

    /* ===== MODAL DESKTOP LAYOUT ===== */
    .modal {
        justify-content: center;
        align-items: flex-end;
        padding: 3rem 4rem 0 4rem;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 24px 24px 0 0;
        display: flex;
        flex-direction: column;
        margin: 0;
        position: relative;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: none;
    }

    .close-modal {
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        float: none;
        z-index: 10;
    }

    .feature-grid-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        flex: 1;
        min-height: 0;
        height: auto;
    }

    .quran-page {
        min-height: 0;
    }

    .quran-page-left,
    .quran-page-right {
        height: 100%;
    }

    #input-section {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
        padding-right: 1rem;
    }

    [id$="-input-section"] {
        padding-bottom: 5rem;
    }

    #output-area {
        margin-top: 0 !important;
        border-top: none !important;
        padding-top: 0 !important;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #result-card {
        margin-top: 0 !important;
    }

    .result-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .result-grid.multi {
        grid-template-columns: 1fr 1fr;
    }

    .desktop-only-flex {
        display: flex !important;
    }

    /* ===== ONLINE INFO MODAL ===== */
    .chat-group-modal {
        z-index: 1400;
    }

    .chat-group-modal-content {
        max-width: 480px;
        border-radius: 20px;
    }

    /* ===== SPLASH SCREEN DESKTOP ===== */
    #splash {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 3rem;
    }

    #splash::before {
        background: linear-gradient(135deg, rgba(15, 28, 46, 0.85) 0%, rgba(15, 28, 46, 0.6) 100%);
    }

    .splash-content {
        max-width: 500px;
        margin-bottom: 0;
    }

    .splash-title {
        font-size: 3.2rem;
    }

    .verify-form {
        max-width: 380px;
    }

    /* ===== SCROLLBAR STYLING ===== */
    #app::-webkit-scrollbar {
        width: 6px;
    }

    #app::-webkit-scrollbar-track {
        background: transparent;
    }

    #app::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 3px;
    }

    #app::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* =========================================
   QURAN FEATURE LAYOUT (REFACTORED)
   ========================================= */

/* Override Feature Page Constraints — mobile only */
@media (max-width: 767px) {
    #quran-modal {
        max-width: 1400px !important;
        width: 95% !important;
    }
}

/* Modal Content Reset */
.quran-layout {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: auto;
    padding: 40px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Header Section */
.quran-header {
    position: relative;
    margin-bottom: 2rem;
}

.quran-header-center {
    text-align: center;
}

.quran-icon-box {
    width: 60px;
    height: 60px;
    background: var(--accent-green);
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.quran-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Grid Layout */
.quran-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

/* Card Styling */
.quran-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

/* Sidebar Specifics */
.quran-sidebar {
    max-height: 80vh;
}

/* Content Specifics */
.quran-content {
    min-height: 60vh;
}

/* Card Header */
.quran-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quran-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.quran-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.quran-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-gold);
}

/* Search Box */
.quran-search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 12px;
    height: 44px;
}

.quran-search-box i {
    color: var(--text-muted);
    margin-right: 8px;
}

.quran-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
}

/* List Containers */
.quran-list-container {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
    min-height: 0;
}

/* Surah List Specifics */
#quran-surah-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 550px;
}

/* Ayah List Specifics */
#quran-ayah-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- REUSED ITEM STYLES --- */
.quran-surah-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border 0.2s;
}

.quran-surah-item:hover {
    transform: translateX(2px);
    background: rgba(0, 0, 0, 0.35);
}

.quran-surah-item.active {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.12);
}

.quran-surah-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.quran-surah-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.quran-surah-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.quran-nav-controls {
    display: flex;
    gap: 8px;
}

.quran-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quran-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quran-ayah-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quran-ayah-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.quran-ayah-ar {
    font-size: 1.4rem;
    line-height: 2.1rem;
    text-align: right;
    direction: rtl;
    font-family: "Scheherazade New", "Amiri", serif;
}

.quran-ayah-latin {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.quran-ayah-translation {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quran-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1rem 0;
}

/* Quran Audio Button */
.quran-ayah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quran-audio-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.quran-audio-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.quran-audio-btn:active {
    transform: scale(0.95);
}

.quran-audio-btn i {
    font-size: 0.8rem;
    margin-left: 2px;
    /* Visual alignment for play icon */
}

.quran-audio-btn i.fa-pause {
    margin-left: 0;
}

/* Ayah Highlight */
.quran-ayah-card.active-ayah {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Responsive Rules */
@media (max-width: 900px) {
    .quran-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .quran-sidebar {
        height: 500px;
        max-height: 60vh;
    }

    #quran-surah-list {
        max-height: none;
    }

    .quran-header {
        margin-bottom: 1.5rem;
    }

    /* Mobile Content: Full Height (No internal scroll) */
    .quran-content {
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    #quran-ayah-list {
        max-height: none;
        overflow: visible;
    }
}

/* =========================================
   TOKEN KEY STYLES
   ========================================= */

/* Sidebar Token Key button */
.sidebar-token-key-btn {
    color: #fbbf24 !important;
}
.sidebar-token-key-btn i {
    color: #fbbf24 !important;
}
.sidebar-token-key-btn:hover {
    background: rgba(251, 191, 36, 0.12) !important;
}

/* Inline Token Key button (below online users) */
.token-key-inline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 0.75rem;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.token-key-inline-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
}
.token-key-inline-btn i {
    font-size: 0.85rem;
}

/* Token Key Modal Content */
.token-key-modal-content {
    width: min(92vw, 440px) !important;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
}

.token-key-modal-body {
    padding: 1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Alert Section */
.token-key-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.18);
    font-size: 0.78rem;
    color: #fbbf24;
}
.token-key-alert > i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1rem;
}
.token-key-alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}
.token-key-alert-desc {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}
.token-key-telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #229ED9;
    color: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}
.token-key-telegram-btn:hover {
    background: #1a8abf;
}

/* Tutorial Section */
.token-key-tutorial {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.token-key-tutorial h4 {
    color: var(--accent-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.token-key-tutorial ol {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Download Grid */
.token-key-download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 0.5rem 0;
}
.token-key-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.token-key-download-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Info Note */
.token-key-info-note {
    margin-top: 0.4rem;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.68rem;
    color: rgba(147, 197, 253, 0.9);
    line-height: 1.4;
}
.token-key-info-note i {
    margin-right: 4px;
}

/* Input Section */
.token-key-input-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.token-key-input-section label {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}
.token-key-input-section input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.token-key-input-section input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.token-key-input-section input:focus {
    border-color: var(--accent-green);
}

/* Actions */
.token-key-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.token-key-btn-cancel {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.token-key-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}
.token-key-btn-clear {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.token-key-btn-clear:hover {
    background: rgba(239, 68, 68, 0.15);
}
.token-key-btn-save {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    background: var(--accent-green);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.token-key-btn-save:hover {
    background: #2ea07a;
}

/* ========== Mode Booster - Sidebar ========== */
.sidebar-boost-card {
    margin: 4px 10px 8px;
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(55, 176, 137, 0.06));
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 14px;
    padding: 12px;
    transition: all 0.3s ease;
}
.sidebar-boost-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sidebar-boost-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.sidebar-boost-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sidebar-boost-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}
.sidebar-boost-status {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
}
.sidebar-boost-status.active {
    color: #10b981;
}
.sidebar-boost-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}
.sidebar-boost-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sidebar-boost-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    transition: 0.3s;
}
.sidebar-boost-toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.sidebar-boost-toggle input:checked + .sidebar-boost-toggle-slider {
    background: var(--accent-green);
}
.sidebar-boost-toggle input:checked + .sidebar-boost-toggle-slider::before {
    transform: translateX(16px);
}
.sidebar-boost-quota {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 2px;
}
.sidebar-boost-quota strong {
    color: var(--accent-gold);
}
.sidebar-boost-topup-btn {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.08);
    color: var(--accent-gold);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
}
.sidebar-boost-topup-btn:hover {
    background: rgba(251, 191, 36, 0.15);
}

/* ========== Mode Booster - Mobile Card ========== */
.boost-mode-card {
    margin-top: 12px;
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(55, 176, 137, 0.06));
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 14px;
    padding: 12px 14px;
}
.boost-mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.boost-mode-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.boost-mode-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.boost-mode-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.boost-mode-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}
.boost-mode-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.boost-mode-desc.active {
    color: #10b981;
    font-weight: 600;
}
.boost-mode-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.boost-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.boost-mode-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 24px;
    transition: 0.3s;
}
.boost-mode-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.boost-mode-switch input:checked + .boost-mode-switch-slider {
    background: var(--accent-green);
}
.boost-mode-switch input:checked + .boost-mode-switch-slider::before {
    transform: translateX(18px);
}
.boost-mode-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.boost-mode-quota {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.boost-mode-quota strong {
    color: var(--accent-gold);
}
.boost-mode-topup-btn {
    padding: 5px 12px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.08);
    color: var(--accent-gold);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.boost-mode-topup-btn:hover {
    background: rgba(251, 191, 36, 0.15);
}

/* ========== Boost Slider Info ========== */
.sf-boost-slider-info {
    margin-top: 4px;
    padding: 6px 10px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.12);
    border-radius: 8px;
    font-size: 0.65rem;
    color: var(--accent-gold);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.sf-boost-slider-info:hover {
    background: rgba(251, 191, 36, 0.12);
}
.sf-boost-slider-info.hidden {
    display: none;
}

/* ========== Desktop sidebar hide boost card on collapsed ========== */
@media (max-width: 767px) {
    .sidebar-boost-card {
        display: none;
    }
}
