:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-blue: #38bdf8;
    --accent-purple: #a855f7;
    --p0-color: #ef4444;
    --p1-color: #f59e0b;
    --p2-color: #10b981;
    --border-dim: rgba(255, 255, 255, 0.1);
    --radius-lg: 16px;
    --radius-sm: 8px;
    --font-main: 'Inter', 'Noto Sans SC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    background: radial-gradient(circle at top right, #111827, #0a0a0a);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Header Section */
.app-header {
    margin-bottom: 4rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.brand-meta {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.cloud-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    display: flex;
    gap: 0.5rem;
}

.logo-group .accent-blue {
    color: var(--accent-blue);
}

.logo-group .accent-purple {
    background: linear-gradient(to right, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

/* Buttons */
.btn-capsule {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-capsule:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Filters */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-pill.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Grid Layout */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

/* Card Style */
.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

.topic-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.card-top {
    margin-bottom: 1.5rem;
}

.priority-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(239, 68, 68, 0.1);
    color: var(--p0-color);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.priority-P1 {
    background: rgba(245, 158, 11, 0.1);
    color: var(--p1-color);
}

.priority-P2 {
    background: rgba(16, 185, 129, 0.1);
    color: var(--p2-color);
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a1a1aa;
}

.status-进行中 .status-dot-inner,
.status-策划中 .status-dot-inner {
    background: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.status-制作中 .status-dot-inner {
    background: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple);
    animation: p-pulse 2s infinite;
}

.status-已完成 .status-dot-inner,
.status-已发布 .status-dot-inner {
    background: var(--p2-color);
}

@keyframes p-pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Pinned Card Enhancement */
.pinned-card {
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    background: linear-gradient(135deg, #141414 0%, #1a1510 100%);
}

.pin-indicator {
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--p1-color);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pin-indicator::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--p1-color);
    border-radius: 50%;
}

/* Modal Styling (matching Dark Theme) */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #18181b;
    border: 1px solid var(--border-dim);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

input,
select {
    background: #09090b;
    border: 1px solid var(--border-dim);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel {
    background: transparent;
    color: white;
    border: 1px solid var(--border-dim);
}

/* Edit/Delete Overlays (Optional Interaction) */
.card-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.topic-card:hover .card-actions {
    opacity: 1;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}