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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0d0d;
    color: #e8e8e8;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
}

.container {
    max-width: 540px;
    width: 100%;
    padding-bottom: 40px;
}

.header {
    text-align: center;
    margin-bottom: 28px;
    padding: 12px 0;
}

.header-logo {
    max-width: 160px;
    display: block;
    margin: 0 auto;
}

.section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-label {
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}

.card {
    background: #141414;
    border-radius: 14px;
    padding: 18px 20px;
}

.card.offline {
    opacity: 0.4;
}

.card-title {
    font-size: 19px;
    font-weight: 600;
    color: #f0f0f0;
    line-height: 1.3;
    margin-bottom: 3px;
}

.card-sub {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.card-meta .tag {
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tag.age {
    background: #2a1f0a;
    color: #fbbf24;
}

.tag.category {
    background: #0a1a2a;
    color: #60a5fa;
}

.tag.time {
    background: #0a1f1a;
    color: #34d399;
}

.card-cover {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 12px;
    display: block;
}

.card-placeholder {
    color: #444;
    font-size: 15px;
    text-align: center;
    padding: 10px 0;
}

.alert {
    background: #141414;
    border-radius: 14px;
    padding: 14px 18px;
}

.alert-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.alert-row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.alert-text {
    font-size: 15px;
    color: #e0e0e0;
}

.alert-time {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
    padding-left: 18px;
}

.history-toggle {
    background: transparent;
    border: none;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    padding: 2px 8px;
    border-radius: 4px;
}

.history-toggle:hover {
    color: #aaa;
}

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

.history-item {
    background: #111111;
    border-radius: 10px;
    padding: 10px 14px;
}

.history-item .h-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.history-row {
    display: flex;
    align-items: flex-start;
}

.history-text {
    font-size: 14px;
    color: #d0d0d0;
}

.history-meta {
    font-size: 11px;
    color: #444;
    margin-top: 2px;
    padding-left: 16px;
}

.history-empty {
    color: #333;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    background: #111111;
    border-radius: 10px;
}

.loading-pulse {
    animation: pulse 1.2s ease-in-out infinite;
}