/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #111827;
    background: #fafafa;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 48px;
    padding: 48px 0 32px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111827;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    font-weight: 400;
}

/* 卡片通用样式 */
.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

/* 公告区域 */
.notices {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.notices h2 {
    color: #111827;
    margin-bottom: 16px;
    font-size: 1.25rem;
    font-weight: 600;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    margin-bottom: 12px;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-content {
    font-weight: 500;
    color: #92400e;
    font-size: 0.9375rem;
}

.notice-date {
    font-size: 0.8125rem;
    color: #78350f;
    background: rgba(255,255,255,0.6);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

/* 使用说明 */
.usage {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.usage h2 {
    color: #111827;
    margin-bottom: 16px;
    font-size: 1.25rem;
    font-weight: 600;
}

.usage-box p {
    margin-bottom: 12px;
    font-size: 0.9375rem;
    color: #374151;
    font-weight: 500;
}

.command-box {
    display: flex;
    align-items: center;
    background: #1f2937;
    border-radius: 6px;
    padding: 14px 16px;
    border: 1px solid #374151;
}

.command-box code {
    flex: 1;
    color: #10b981;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    font-weight: 500;
}

.copy-btn {
    background: #374151;
    color: white;
    border: 1px solid #4b5563;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* 脚本列表 */
.scripts {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.scripts h2 {
    color: #111827;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

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

.script-card {
    color: #111827;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
    background: #fafafa;
    border: 1px solid #e5e7eb;
}

.script-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

.script-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: #111827;
}

.script-command {
    background: #1f2937;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #374151;
}

.script-command code {
    color: #10b981;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
    word-break: break-all;
    font-weight: 500;
    display: block;
}

.script-actions {
    text-align: center;
}

.script-actions .btn {
    width: 100%;
    justify-content: center;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
    background: #ffffff;
    color: #111827;
}

.btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-primary {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.btn-primary:hover {
    background: #1f2937;
    border-color: #1f2937;
}

.btn-primary:active {
    background: #374151;
}

/* 赞助商区域 */
.sponsors {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.sponsors h2 {
    color: #111827;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

.sponsors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.sponsor-item {
    padding: 14px 16px;
    background: #fafafa;
    border-radius: 6px;
    transition: all 0.15s ease;
    border: 1px solid #e5e7eb;
}

.sponsor-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sponsor-item a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    display: block;
    font-size: 0.9375rem;
}

.sponsor-item a:hover {
    color: #374151;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 48px;
    padding: 24px;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: #374151;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .command-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .scripts-grid {
        grid-template-columns: 1fr;
    }
    
    .sponsors-list {
        grid-template-columns: 1fr;
    }
    
    .notice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .script-command {
        flex-direction: column;
        align-items: stretch;
    }
    
    .script-command .copy-btn {
        margin-top: 10px;
    }
    
    /* 后台响应式优化 */
    .dashboard {
        border-radius: 12px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        align-items: flex-start;
    }
    
    .dashboard-header h1 {
        font-size: 1.25rem;
    }
    
    .dashboard-header > div {
        width: 100%;
        justify-content: space-between;
    }
    
    .tabs {
        padding: 0 20px;
        overflow-x: auto;
    }
    
    .tab {
        padding: 12px 16px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 0.7rem;
        margin: 1px;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
    
    .modal-content h3 {
        font-size: 1.125rem;
        padding: 16px 20px;
    }
    
    .modal-content form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .script-card {
        padding: 20px;
    }
    
    .dashboard-header h1 {
        font-size: 1.125rem;
    }
    
    .tab {
        font-size: 0.75rem;
        padding: 10px 12px;
    }
    
    .tab-content {
        padding: 16px;
    }
    
    .table-wrapper {
        border-radius: 6px;
    }
}

/* 管理后台样式 */
.admin-container {
    max-width: 420px;
    margin: 80px auto;
    padding: 20px;
}

.login-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.login-form h2 {
    color: #111827;
    font-weight: 600;
    margin-bottom: 32px;
    font-size: 1.5rem;
    text-align: center;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 0.9375rem;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background: #ffffff;
    font-family: inherit;
}

.form-control:hover {
    border-color: #9ca3af;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-block:hover::before {
    left: 100%;
}

.btn-block:active {
    transform: translateY(0);
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* 后台管理面板样式 */
.dashboard {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header h1 {
    color: #111827;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

.dashboard-header > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-header span {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

.tabs {
    display: flex;
    padding: 0 32px;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    gap: 0;
}

.tab {
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab.active {
    color: #111827;
    border-bottom-color: #111827;
    background: #ffffff;
}

.tab:hover:not(.active) {
    color: #111827;
}

.tab-content {
    display: none;
    padding: 24px 32px;
    background: #ffffff;
}

.tab-content.active {
    display: block;
}

.tab-content > div:first-child {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.table th {
    background: #fafafa;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
}

.table tbody tr {
    transition: background-color 0.1s ease;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table td {
    color: #111827;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8125rem;
    margin: 0 2px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-success {
    background: #ffffff;
    color: #059669;
    border-color: #d1fae5;
}

.btn-success:hover {
    background: #d1fae5;
    border-color: #a7f3d0;
}

.btn-warning {
    background: #ffffff;
    color: #d97706;
    border-color: #fed7aa;
}

.btn-warning:hover {
    background: #fed7aa;
    border-color: #fdba74;
}

.btn-danger {
    background: #ffffff;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
    border-color: #fca5a5;
}

.btn-info {
    background: #ffffff;
    color: #2563eb;
    border-color: #dbeafe;
}

.btn-info:hover {
    background: #dbeafe;
    border-color: #bfdbfe;
}

.btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border-color: #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.modal-content h3 {
    color: #111827;
    font-weight: 600;
    margin: 0;
    padding: 20px 24px;
    font-size: 1.125rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-content form {
    padding: 24px;
}

.close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.close:hover {
    color: #111827;
    background: #f3f4f6;
}

/* 表格包装器 */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0;
    border: none;
}

/* 操作按钮组 */
.table td:last-child {
    white-space: nowrap;
}