* {
        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; }
    }
