/* ===== 重置与基础样式 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== 导航栏 ===== */
.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.nav-logo i { font-size: 1.5rem; color: #e94560; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
    color: rgba(255,255,255,0.75);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* ===== 主体内容 ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 64px - 80px);
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 1.5rem 2rem;
    font-size: 0.875rem;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.modal-header h3 { font-size: 1.25rem; color: #1a1a2e; }
.modal-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.25rem;
    transition: all 0.2s;
}
.modal-close:hover { background: #f0f0f0; color: #333; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
    background: #fafafa;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #e94560;
    background: #fff;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: #e94560;
    color: #fff;
}
.btn-primary:hover { background: #d63851; transform: translateY(-1px); }
.btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.btn-secondary:hover { background: #e0e0e0; }
.btn-danger {
    background: #e74c3c;
    color: #fff;
}
.btn-danger:hover { background: #c0392b; }
.btn-success {
    background: #27ae60;
    color: #fff;
}
.btn-success:hover { background: #219a52; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== 标签 ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tag-tragedy { background: #ffe0e6; color: #c0392b; }
.tag-comedy { background: #e0f7e0; color: #27ae60; }
.tag-modern { background: #e0e0ff; color: #2980b9; }
.tag-classic { background: #fff3e0; color: #e67e22; }
.tag-musical { background: #f3e0ff; color: #8e44ad; }
.tag-rehearsing { background: #fff3e0; color: #e67e22; }
.tag-ready { background: #e0f7e0; color: #27ae60; }
.tag-draft { background: #e0e0e0; color: #777; }
.tag-archived { background: #f5f5f5; color: #999; }

/* ===== 页面标题 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 1.75rem;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-links a { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
    .main-content { padding: 1rem; }
    .modal-content { width: 95%; padding: 1.5rem; }
    .form-row { flex-direction: column; gap: 0; }
}
