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

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-2: #1a1a1a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --green: #30d158;
    --green-glow: rgba(48, 209, 88, 0.4);
    --red: #ff453a;
    --red-glow: rgba(255, 69, 58, 0.4);
    --orange: #ff9f0a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo { font-size: 20px; }
.title { font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.subtitle {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    background: var(--surface-2);
    padding: 3px 8px;
    border-radius: 4px;
}

.status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 32px;
    margin-bottom: 20px;
}

.status-indicator {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.status-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--green);
    opacity: 0.3;
    animation: pulse-ring 2s ease-out infinite;
}

.status-dot {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 30px var(--green-glow), 0 0 60px var(--green-glow);
    transition: all 0.5s ease;
}

.status-indicator.down .status-ring {
    border-color: var(--red);
    animation: pulse-ring-down 1.5s ease-out infinite;
}

.status-indicator.down .status-dot {
    background: var(--red);
    box-shadow: 0 0 30px var(--red-glow), 0 0 60px var(--red-glow);
}

.status-indicator.checking .status-ring {
    border-color: var(--orange);
    animation: pulse-ring 1s ease-out infinite;
}

.status-indicator.checking .status-dot {
    background: var(--orange);
    box-shadow: 0 0 20px rgba(255, 159, 10, 0.3);
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
    100% { transform: scale(1); opacity: 0.3; }
}

@keyframes pulse-ring-down {
    0% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.1; }
    100% { transform: scale(1); opacity: 0.4; }
}

.status-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.status-sub {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 400;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.info-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.history { margin-bottom: 40px; }

.history-title {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
}

.history-item .time {
    color: var(--text-dim);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
}

.history-item .result {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-item .result .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.history-item .result .dot.ok { background: var(--green); }
.history-item .result .dot.fail { background: var(--red); }
.history-item .result .dot.slow { background: var(--orange); }

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toast-in 0.3s ease-out;
    pointer-events: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.toast.down {
    border-color: rgba(255, 69, 58, 0.3);
    background: rgba(255, 69, 58, 0.1);
}

.toast.up {
    border-color: rgba(48, 209, 88, 0.3);
    background: rgba(48, 209, 88, 0.1);
}

.toast .toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast .toast-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.toast .toast-text .toast-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.toast .toast-text .toast-desc {
    color: var(--text-dim);
    font-size: 11px;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

body.light-mode {
    --bg: #f2f2f7;
    --surface: #ffffff;
    --surface-2: #f9f9f9;
    --border: rgba(0, 0, 0, 0.08);
    --text: #1a1a1a;
    --text-dim: rgba(0, 0, 0, 0.45);
}

@media (max-width: 360px) {
    .info-grid { gap: 8px; }
    .info-card { padding: 12px 14px; }
    .status-indicator { width: 80px; height: 80px; }
}