/* ===== 站点状态监控面板 - 样式表 ===== */

:root {
    --bg: #0a0e1a;
    --bg-secondary: #111827;
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-bg-solid: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-10: rgba(99, 102, 241, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --border: rgba(148, 163, 184, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-bg-solid: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --primary: #6366f1;
    --primary-light: #4f46e5;
    --primary-10: rgba(99, 102, 241, 0.08);
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    z-index: -2;
    pointer-events: none;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== Header ===== */
.header {
    margin-bottom: 32px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 13px;
    color: var(--success);
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--success);
}

/* ===== Glass Card ===== */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ===== Section Title ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.section-icon {
    font-size: 18px;
}

/* ===== Status Section ===== */
.status-section {
    margin-bottom: 28px;
}

.status-card {
    padding: 28px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.status-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.status-indicator {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--success);
    animation: spin-ring 4s linear infinite;
    opacity: 0.3;
}

.status-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    transform: translateX(-50%);
}

.status-icon {
    font-size: 32px;
    z-index: 1;
}

.status-info {
    flex: 1;
}

.status-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.status-chevron {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.status-chevron svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-card.expanded .status-chevron svg {
    transform: rotate(180deg);
}

.status-card.expanded .status-chevron {
    background: var(--primary-10);
    color: var(--primary);
}

.status-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== Status Detail Panel ===== */
.status-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-card.expanded .status-detail {
    max-height: 800px;
}

.detail-inner {
    padding-top: 20px;
}

.detail-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}

.detail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(148, 163, 184, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.detail-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
}

/* ===== Uptime Section ===== */
.uptime-section {
    margin-bottom: 28px;
}

.uptime-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    flex-wrap: wrap;
}

.uptime-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.uptime-number {
    font-size: 42px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.uptime-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.uptime-sep {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0.4;
    margin-top: -10px;
}

/* ===== Ratio Section ===== */
.ratio-section {
    margin-bottom: 28px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ratio-card {
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.ratio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.ratio-period {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ratio-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--success);
    margin-bottom: 10px;
}

.ratio-bar {
    width: 100%;
    height: 4px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.ratio-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ===== Notice Section ===== */
.notice-section {
    margin-bottom: 28px;
}

.notice-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-card {
    padding: 18px 22px;
    transition: var(--transition);
    border-left: 3px solid var(--primary);
}

.notice-card:hover {
    transform: translateX(4px);
}

.notice-hidden {
    display: none;
}

.notice-list.expanded .notice-hidden {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.notice-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    background: var(--primary-10);
    padding: 3px 10px;
    border-radius: 20px;
}

.notice-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.notice-toggle {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--primary-10);
    color: var(--primary);
    border-color: var(--primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* ===== Visitor Counter Section ===== */
.visitor-section {
    margin-bottom: 28px;
}

.visitor-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 28px;
    transition: var(--transition);
}

.visitor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.visitor-icon {
    font-size: 36px;
    animation: float 3s ease-in-out infinite;
}

.visitor-text {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.visitor-label {
    font-size: 15px;
    color: var(--text-secondary);
}

.visitor-number {
    font-size: 32px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer p {
    margin-bottom: 6px;
}

.footer-copy {
    opacity: 0.6;
}

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px 14px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .status-main {
        flex-direction: column;
        text-align: center;
    }

    .status-chevron {
        display: none;
    }

    .status-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .meta-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
    }

    .meta-item:last-child {
        border-bottom: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .uptime-number {
        font-size: 32px;
    }

    .ratio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        flex-wrap: wrap;
    }

    .visitor-text {
        flex-direction: column;
        gap: 6px;
    }

    .visitor-number {
        font-size: 28px;
    }
}

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

    .uptime-grid {
        gap: 8px;
        padding: 20px;
    }

    .uptime-number {
        font-size: 28px;
    }

    .uptime-sep {
        display: none;
    }

    .visitor-card {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text);
}
