/*
AI Admin System - Codesome Token 赞助活动协作网站
Copyright (c) 2026 Gary (https://gary.example.com)
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: #333;
    min-height: 100vh;
}

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

.header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.icon-schedule { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.icon-submit { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.icon-progress { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.card-subtitle {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

.full-width {
    grid-column: 1 / -1;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.table td {
    font-size: 14px;
    color: #666;
}

.table tr:hover {
    background: #f8f9fa;
}

.highlight-today {
    background: #e3f2fd !important;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #e8f5e9; color: #388e3c; }
.badge-pending { background: #fff3e0; color: #f57c00; }
.badge-info { background: #e0f2f1; color: #00796b; }

/* 提示消息 */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.alert-success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

/* 进度追踪 */
.progress-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.progress-item:last-child {
    border-bottom: none;
}

.progress-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.progress-status {
    font-size: 18px;
}

.status-submitted {
    color: #388e3c;
}

.status-pending {
    color: #ccc;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -24px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
}

.timeline-item:after {
    content: '';
    position: absolute;
    left: -18px;
    top: 20px;
    width: 2px;
    height: calc(100% - 10px);
    background: #e0e0e0;
}

.timeline-item:last-child:after {
    display: none;
}

.timeline-time {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-content {
    font-size: 14px;
    color: #666;
}

.countdown {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.countdown-waiting {
    background: #e3f2fd;
    color: #1976d2;
}

.countdown-soon {
    background: #fff3e0;
    color: #f57c00;
}

.countdown-now {
    background: #e8f5e9;
    color: #388e3c;
    animation: pulse 1.5s ease-in-out infinite;
}

.countdown-passed {
    background: #f5f5f5;
    color: #999;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 响应式 */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 24px;
    }

    .card {
        padding: 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.8;
    font-size: 14px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* 轮转日卡片样式 */
.rotation-day-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.rotation-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rotation-date {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.rotation-progress {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

.rotation-people {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.rotation-submissions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 8px;
}

.submission-name {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.submission-link {
    flex: 1;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submission-link:hover {
    text-decoration: underline;
}

.submission-link.pending {
    color: #999;
    pointer-events: none;
    cursor: not-allowed;
}

/* 待审核标签 */
.badge-pending {
    background: #ff9800;
    color: white;
}

/* 时间线日期分组 */
.timeline-day-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.timeline-day-section:last-child {
    border-bottom: none;
}

.timeline-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.timeline-day-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.day-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.timeline-person-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.timeline-person-name {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.timeline-person-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* 内联提交按钮 */
.btn-submit-inline {
    padding: 6px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-inline:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

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

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

#modalMessage {
    padding: 0 25px 20px;
}
