* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-color: #ffffff;
    color: #333;
}

/* 导航栏 */
.navbar {
    background-color: #000000;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.navbar.festive {
    background-color: #dc2626;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand svg {
    width: 2rem;
    height: 2rem;
    color: #facc15;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 主题切换开关 */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.toggle-switch {
    position: relative;
    width: 3.5rem;
    height: 2rem;
    background-color: #4b5563;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #ef4444;
}

.toggle-slider {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(1.5rem);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content {
    padding: 2rem 0;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 2px solid #facc15;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.stat-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-info p:first-child {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card-info p:last-child {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
}

.stat-card-icon {
    width: 3rem;
    height: 3rem;
    color: #facc15;
}

/* 按钮 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: #facc15;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: #fbbf24;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-small {
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.btn-edit {
    color: #2563eb;
    background-color: transparent;
}

.btn-edit:hover {
    background-color: #dbeafe;
}

.btn-delete {
    color: #dc2626;
    background-color: transparent;
}

.btn-delete:hover {
    background-color: #fee2e2;
}

/* 表格 */
.table-container {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #000;
    color: white;
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
}

th.text-right {
    text-align: right;
}

th.text-center {
    text-align: center;
}

tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

tbody tr:nth-child(even) {
    background-color: #fffbeb;
}

tbody tr:hover {
    background-color: #fef3c7;
}

td {
    padding: 1rem 1.5rem;
}

td.text-right {
    text-align: right;
}

td.text-center {
    text-align: center;
}

.platform-badge {
    display: inline-block;
    background-color: #facc15;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.amount {
    color: #16a34a;
    font-weight: bold;
}

.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.modal-header {
    background-color: #facc15;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group label {
    display: block;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group label .required {
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #facc15;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
}

.empty-state {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
}

.empty-state p {
    color: #6b7280;
    font-size: 1.125rem;
}

/* 图标 SVG */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    vertical-align: middle;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar-brand h1 {
        font-size: 1.125rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
