        :root {
            --bg-color: #f0f4f8;
            --bg-gradient: radial-gradient(circle at top right, #f8fafc, #e2e8f0);
            --card-bg: rgba(255, 255, 255, 0.7);
            --text-main: #1e293b;
            --text-muted: #64748b;
            --accent-success: #10b981;
            --accent-warning: #f59e0b;
            --accent-danger: #ef4444;
            --card-border: rgba(255, 255, 255, 0.4);
            --header-bg: rgba(255, 255, 255, 0.85);
            --backdrop: blur(16px);
            --modal-bg: rgba(255, 255, 255, 0.95);
            --history-bar-up: #10b981;
            --history-bar-down: #ef4444;
            --history-bar-empty: rgba(226, 232, 240, 0.6);
            --btn-bg: #3b82f6;
            --btn-text: #ffffff;
            --input-bg: #ffffff;
            --input-border: #cbd5e1;
        }

        [data-theme="dark"] {
            --bg-color: #050b14;
            --bg-gradient: radial-gradient(circle at top right, #111827, #020617);
            --card-bg: rgba(15, 23, 42, 0.5);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --card-border: rgba(255, 255, 255, 0.05);
            --header-bg: rgba(15, 23, 42, 0.7);
            --backdrop: blur(16px);
            --modal-bg: rgba(15, 23, 42, 0.95);
            --history-bar-up: #10b981;
            --history-bar-down: #ef4444;
            --history-bar-empty: rgba(30, 41, 59, 0.6);
            --input-bg: #050b14;
            --input-border: #334155;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Inter', sans-serif;
        }

        body {
            background: var(--bg-gradient);
            background-color: var(--bg-color); /* Fallback */
            background-attachment: fixed;
            color: var(--text-main);
            transition: background 0.5s ease, color 0.3s;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        #particles-js {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -1;
        }

        header {
            background-color: var(--header-bg);
            backdrop-filter: var(--backdrop);
            -webkit-backdrop-filter: var(--backdrop);
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--card-border);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-title {
            font-size: 1.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            letter-spacing: -0.5px;
        }

        .header-controls {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .icon-btn {
            background: none;
            border: none;
            color: var(--text-main);
            font-size: 1.25rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 50%;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
        }

        .icon-btn:hover {
            background-color: rgba(128, 128, 128, 0.15);
            transform: scale(1.05);
        }

        .dashboard-grid {
            padding: 1rem 1.5rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
            flex: 1;
        }

        .monitor-card {
            background-color: var(--card-bg);
            backdrop-filter: var(--backdrop);
            -webkit-backdrop-filter: var(--backdrop);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 0.85rem 1rem;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .monitor-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.2);
            border-color: rgba(59, 130, 246, 0.4);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.6rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--card-border);
        }

        .domain-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .domain-icon {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            color: #fff;
            font-weight: 700;
            box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 4px 8px rgba(0,0,0,0.15);
        }

        .domain-details {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .domain-name {
            font-weight: 700;
            font-size: 1.05rem;
            letter-spacing: -0.3px;
        }

        .domain-url {
            color: var(--text-muted);
            font-size: 0.85rem;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .status-badge {
            background-color: rgba(16, 185, 129, 0.15);
            color: var(--accent-success);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
        }

        .status-badge.down {
            background-color: rgba(239, 68, 68, 0.15);
            color: var(--accent-danger);
            box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
        }

        .metrics-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.35rem;
            margin-bottom: 0.75rem;
        }

        .metric-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            padding-bottom: 0.35rem;
            border-bottom: 1px dashed var(--card-border);
        }

        .metric-row:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .metric-label {
            color: var(--text-muted);
            font-weight: 500;
        }

        .metric-value {
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .metric-pill {
            border: 1px solid var(--accent-success);
            color: var(--accent-success);
            padding: 0.1rem 0.6rem;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            background: rgba(16, 185, 129, 0.05);
        }

        .metric-pill.down {
            border-color: var(--accent-danger);
            color: var(--accent-danger);
            background: rgba(239, 68, 68, 0.05);
        }

        .history-section {
            margin-top: auto;
        }

        .history-title {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
            font-weight: 500;
        }

        .history-bars {
            display: flex;
            gap: 2px;
            height: 18px;
            align-items: flex-end;
        }

        .tech-badges {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            justify-content: flex-end;
            max-width: 140px;
        }

        .history-bar {
            flex: 1;
            background-color: var(--history-bar-up);
            border-radius: 4px 4px 0 0;
            min-width: 4px;
            transition: height 0.5s ease;
        }

        .history-bar.down {
            background-color: var(--history-bar-down);
        }

        .history-bar.empty {
            background-color: var(--history-bar-empty);
            height: 20% !important;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background: var(--card-bg);
            width: 90%;
            max-width: 600px;
            border-radius: 16px;
            padding: 2.5rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            border: 1px solid var(--card-border);
            transform: translateY(20px);
            transition: transform 0.3s ease;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-group {
            margin-bottom: 1.25rem;
        }

        .form-group input {
            width: 100%;
            padding: 0.85rem 1rem;
            border: 1px solid var(--input-border);
            border-radius: 8px;
            background-color: var(--input-bg);
            color: var(--text-main);
            outline: none;
            font-size: 0.95rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .form-group input:focus {
            border-color: var(--btn-bg);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .btn {
            padding: 0.85rem 1.5rem;
            border-radius: 8px;
            border: none;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .btn-primary {
            background-color: var(--btn-bg);
            color: var(--btn-text);
        }

        .domain-list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.25rem;
            background: var(--input-bg);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            margin-bottom: 0.75rem;
            transition: border-color 0.2s;
        }

        .domain-list-item:hover {
            border-color: var(--btn-bg);
        }

        .domain-list-actions button {
            background: rgba(239, 68, 68, 0.1);
            border: none;
            cursor: pointer;
            color: var(--accent-danger);
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .domain-list-actions button:hover {
            background: var(--accent-danger);
            color: #fff;
        }

        /* TV Mode Optimizations */
        @media (min-width: 1920px) {
            .dashboard-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.25rem;
                padding: 1.5rem;
            }

            .monitor-card {
                padding: 1rem 1.25rem;
            }

            .domain-name {
                font-size: 1.1rem;
            }

            .metric-row {
                font-size: 0.9rem;
            }
        }

        /* About Modal Custom Styles */
        .about-qr-container {
            background: white;
            padding: 15px;
            border-radius: 16px;
            display: inline-block;
            margin-bottom: 1rem;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }
        
        .about-qr-img {
            width: 180px;
            height: 180px;
            display: block;
        }

        .about-qr-label {
            font-size: 1.1rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            font-weight: 500;
        }

        .about-copy-box {
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.5rem 0.5rem 1rem;
            margin-bottom: 1rem;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
        }

        .about-btc-address {
            font-family: monospace;
            font-size: 0.95rem;
            color: var(--text-main);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            margin-right: 10px;
        }

        .about-copy-btn {
            background: #f59e0b;
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background 0.2s;
        }

        .about-copy-btn:hover {
            background: #d97706;
        }

        .about-wa-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: #25D366;
            color: white;
            text-decoration: none;
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            font-size: 1.05rem;
            transition: background 0.2s, transform 0.2s;
        }

        .about-wa-btn:hover {
            background: #128C7E;
            transform: translateY(-2px);
        }

        /* Mobile Responsiveness */
        @media (max-width: 768px) {
            header {
                padding: 1rem;
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .header-title {
                width: 100%;
            }
            
            .header-title span:first-child {
                font-size: 1.15rem !important;
            }
            
            .header-title span:last-child {
                font-size: 0.75rem !important;
            }

            #liveClock {
                display: none !important; /* Hide clock on mobile to save space */
            }

            .header-controls {
                position: absolute;
                top: 1rem;
                right: 1rem;
                gap: 0.5rem;
            }

            .dashboard-grid {
                padding: 1rem;
                grid-template-columns: 1fr;
            }

            .monitor-card {
                padding: 1rem;
            }

            .modal-content {
                margin: 1rem;
                padding: 1.5rem;
                width: calc(100% - 2rem);
            }
            
            #addDomainForm {
                flex-direction: column;
            }
        }