:root {
    --bunny-orange: #FF6600;
    --bunny-orange-light: #FF8533;
    --bunny-dark: #1a1a2e;
    --bunny-darker: #131328;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ffcc00;
    --blue: #007aff;
    --radius: 14px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo svg {
    display: block;
}

.protected-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFEDD5, #FFE4D1);
    color: var(--bunny-orange);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #FFD4B0;
}

.shield-icon {
    font-size: 16px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px 64px;
}

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

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--bunny-dark);
    margin-bottom: 16px;
}

.hero h1 .orange {
    background: linear-gradient(135deg, var(--bunny-orange), #FAA21B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 24px;
}

.hero-host {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 99px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.host-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-host code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--bunny-orange);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.stat-card.live {
    background: linear-gradient(135deg, var(--bunny-orange), #FAA21B);
    color: #fff;
    border-color: transparent;
}

.stat-card.live .stat-label {
    color: rgba(255,255,255,0.85);
}

.stat-card.pool {
    background: linear-gradient(135deg, #af52de, #c084fc);
    color: #fff;
    border-color: transparent;
}

.stat-card.pool .stat-label {
    color: rgba(255,255,255,0.85);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card.live .stat-value {
    font-size: 24px;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.live-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    animation: livepulse 1.2s infinite;
}

@keyframes livepulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.card-header {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--bunny-dark);
}

.card-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.chart-section .card {
    padding-bottom: 16px;
}

#rps-chart {
    width: 100%;
    height: 180px;
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 800px) {
    .grid-2 { grid-template-columns: 1fr; }
}

.ranked-list {
    list-style: none;
}

.ranked-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.ranked-list li:last-child {
    border-bottom: none;
}

.ranked-list li.empty {
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
}

.ranked-list .key {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: var(--bunny-dark);
}

.ranked-list .count {
    font-weight: 700;
    color: var(--bunny-orange);
    background: #FFF4ED;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px;
}

.recent-table {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
}

.recent-header,
.recent-body .row {
    display: grid;
    grid-template-columns: 80px 60px 1.5fr 110px 2fr;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.recent-header {
    background: #f9fafb;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.recent-body {
    max-height: 480px;
    overflow-y: auto;
}

.recent-body .row {
    transition: background 0.15s;
}

.recent-body .row:hover {
    background: #fffaf3;
}

.recent-body .method {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #E0F2FE;
    color: #0369A1;
    text-align: center;
    font-size: 10px;
}

.recent-body .path,
.recent-body .ip,
.recent-body .ua {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-body .path {
    color: var(--bunny-orange);
    font-weight: 600;
}

.recent-body .ip {
    color: var(--text);
}

.recent-body .ua {
    color: var(--text-muted);
}

.recent-body .time {
    color: var(--text-muted);
}

.recent-body .empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-cta {
    text-align: center;
    padding: 32px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-cta code {
    background: #fff;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--bunny-orange);
    font-weight: 600;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
