* {
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    }

    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --bg-tertiary: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-tertiary: #888888;
        --border-color: #333333;
        --scrollbar-thumb: #444444;
        --scrollbar-track: #111111;
        --card-bg: #111827;
        --input-bg: #1f2937;
        --method-badge: #374151;
        --social-bg: #1f2937;
        --social-text: #ffffff;
        --social-hover: #374151;
        --stats-bg: #111111;
        --stats-border: #333333;
        --stats-text: #ffffff;
        --stats-text-secondary: #cccccc;
    }

    .light-mode {
        --bg-primary: #ffffff;
        --bg-secondary: #f3f4f6;
        --bg-tertiary: #f9fafb;
        --text-primary: #000000;
        --text-secondary: #374151;
        --text-tertiary: #6b7280;
        --border-color: #d1d5db;
        --scrollbar-thumb: #cbd5e0;
        --scrollbar-track: #f3f4f6;
        --card-bg: #ffffff;
        --input-bg: #f9fafb;
        --method-badge: #e5e7eb;
        --social-bg: #f3f4f6;
        --social-text: #374151;
        --social-hover: #e5e7eb;
        --stats-bg: #ffffff;
        --stats-border: #e5e7eb;
        --stats-text: #1f2937;
        --stats-text-secondary: #6b7280;
    }

    body {
        font-family: 'Space Grotesk', sans-serif;
        background: var(--bg-primary);
        color: var(--text-primary);
        min-height: 100vh;
    }

    * {
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }
    *::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    *::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
    }
    *::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 10px;
    }
    *::-webkit-scrollbar-thumb:hover {
        background: var(--text-tertiary);
    }

    .card-hover {
        transition: all 0.3s ease-in-out;
    }

    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .theme-toggle-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
    }

    .theme-toggle-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .toast {
        position: fixed;
        top: 24px;
        right: 24px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        padding: 16px 20px;
        border-radius: 12px;
        color: var(--text-primary);
        z-index: 10000;
        transform: translateX(400px);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        backdrop-filter: blur(10px);
        opacity: 0.95;
    }

    .toast.show {
        transform: translateX(0);
    }

    .social-badge {
        transition: all 0.3s ease;
        background: var(--social-bg);
        color: var(--social-text);
    }

    .social-badge:hover {
        transform: scale(1.05);
        opacity: 0.9;
        background: var(--social-hover);
    }

    audio {
        border-radius: 30px;
        padding: 5px;
        width: 100%;
        background: var(--input-bg);
    }

    .media-preview {
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
        overflow: hidden;
    }
    .media-iframe {
        width: 100%;
        height: 400px;
        border: none;
        border-radius: 8px;
    }
    .media-image {
        max-width: 100%;
        max-height: 400px;
        border-radius: 8px;
    }

    .gray-gradient-text {
        background: linear-gradient(-45deg, var(--text-primary), var(--text-secondary), var(--text-tertiary), #666666);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-size: 300% 300%;
        animation: gradient 3s ease infinite;
    }

    @keyframes gradient {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    .code-font {
        font-family: 'JetBrains Mono', monospace;
    }

    .search-input {
        background: var(--input-bg);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
    }

    .search-input::placeholder {
        color: var(--text-tertiary);
    }

    .method-badge {
        background: var(--method-badge);
        color: var(--text-primary);
    }

    .status-ready {
        background: rgba(34, 197, 94, 0.2);
        color: rgb(34, 197, 94);
        border: 1px solid rgba(34, 197, 94, 0.4);
    }

    .status-update {
        background: rgba(234, 179, 8, 0.2);
        color: rgb(234, 179, 8);
        border: 1px solid rgba(234, 179, 8, 0.4);
    }

    .status-error {
        background: rgba(239, 68, 68, 0.2);
        color: rgb(239, 68, 68);
        border: 1px solid rgba(239, 68, 68, 0.4);
    }

    .status-warning {
        background: rgba(234, 179, 8, 0.1);
        border: 1px solid rgba(234, 179, 8, 0.3);
        color: var(--text-secondary);
    }

    .battery-container {
        position: relative;
        width: 40px;
        height: 18px;
        border: 2px solid currentColor;
        border-radius: 4px;
        overflow: hidden;
    }

    .light-mode .battery-container {
        border-color: #6b7280;
    }

    .battery-level {
        height: 100%;
        border-radius: 2px;
        transition: width 0.5s ease;
    }

    .battery-tip {
        position: absolute;
        right: -4px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 8px;
        background-color: currentColor;
        border-radius: 0 2px 2px 0;
    }

    .light-mode .battery-tip {
        background-color: #6b7280;
    }

    .battery-charging {
        animation: pulseCharge 2s infinite;
    }

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

    .battery-container.charging::before {
        content: "⚡";
        position: absolute;
        right: -25px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        animation: blink 1s infinite;
    }

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

    .fade-in {
        animation: fadeIn 0.3s ease-in-out;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .battery-status-text {
        font-size: 9px;
        opacity: 0.8;
        margin-top: 2px;
    }

    .stats-card {
        background: var(--stats-bg);
        border: 1px solid var(--stats-border);
        color: var(--stats-text);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .stats-text-secondary {
        color: var(--stats-text-secondary);
    }

    .spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(100, 100, 100, 0.3);
        border-top-color: var(--text-tertiary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .local-spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(100, 100, 100, 0.3);
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        display: none;
    }

    .local-spinner.active {
        display: inline-block;
    }

    .btn-loading {
        opacity: 0.7;
        cursor: not-allowed;
    }

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

    @media (max-width: 640px) {
        .theme-toggle-btn { width: 52px; height: 52px; bottom: 16px; right: 16px; }
    }
    /* ===== SKY BACKGROUND ===== */
.sky{
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:-1;
  overflow:hidden;
  background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #000000 100%);
}

/* ===== STARS ===== */
.stars{
  width:100%;
  height:100%;
  background: transparent;
  box-shadow:
    200px 100px #fff,
    500px 200px #fff,
    900px 300px #fff,
    1200px 100px #fff,
    1500px 400px #fff,
    1700px 600px #fff,
    100px 500px #fff,
    300px 700px #fff,
    800px 900px #fff,
    400px 1000px #fff;
  animation: twinkle 4s infinite alternate;
}

@keyframes twinkle{
  from{ opacity:.4; }
  to{ opacity:1; }
}

/* ===== METEOR ===== */
.meteor{
  position:absolute;
  width:3px;
  height:80px;
  background:linear-gradient(-45deg, white, rgba(255,255,255,0));
  opacity:0;
  transform:rotate(45deg);
  animation: meteorFall 3s linear infinite;
}

@keyframes meteorFall{
  0%{
    opacity:1;
    transform:translate(0,0) rotate(45deg);
  }
  100%{
    opacity:0;
    transform:translate(-600px,600px) rotate(45deg);
  }
}

/* Efek Text Gradient Berjalan */
.gray-gradient-text {
    background: linear-gradient(to right, #f97316, #fbbf24, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textGradient 3s linear infinite;
}

@keyframes textGradient {
    to { background-position: 200% center; }
}

/* Penyesuaian agar Logo melingkar sempurna */
#logoImg {
    border: 4px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(to right, #f97316, #fbbf24);
    background-origin: border-box;
    background-clip: content-box, border-box;
}


/*loading animasi*/
@keyframes loading {
    0% { width: 0%; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0%); }
    100% { width: 0%; transform: translateX(100%); }
}

/* Transisi Halus saat Loading Selesai */
#loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-out;
}
