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

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #0f1117;
    color: #e8eaed;
}

a {
    color: inherit;
    text-decoration: none;
}

.d-none {
    display: none !important;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
    background: #161b22;
    border-bottom: 1px solid #2a3140;
}

.site-logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff6b6b;
}

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

.site-coin {
    font-size: 0.85rem;
    color: #fbbf24;
}

.site-nav-link {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.site-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.site-main-full {
    max-width: none;
    margin: 0;
    padding: 0;
}

.home-section {
    width: 100%;
}

.home-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.home-empty {
    padding: 48px 16px;
    text-align: center;
    color: #94a3b8;
    background: #161b22;
    border-radius: 12px;
}

.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.live-card {
    background: #161b22;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.live-card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1e293b, #334155);
    overflow: hidden;
}

.live-card-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.live-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
}

.live-card-badge-vod {
    background: #f59e0b;
}

.live-card-viewers {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
}

.live-card-body {
    padding: 12px;
}

.live-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-card-anchor {
    font-size: 0.8rem;
    color: #94a3b8;
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 56px);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #161b22;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid #2a3140;
}

.auth-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: #0f1117;
    color: #94a3b8;
    cursor: pointer;
}

.auth-tab.active {
    background: #ff6b6b;
    color: #fff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a3140;
    background: #0f1117;
    color: #e8eaed;
}

.auth-row {
    display: flex;
    gap: 8px;
}

.auth-row .auth-input {
    flex: 1;
}

.auth-secondary {
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #2a3140;
    background: #1e293b;
    color: #e8eaed;
    cursor: pointer;
    white-space: nowrap;
}

.auth-submit {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #ff6b6b;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.auth-error {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 0.85rem;
}
