/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid #2980b9;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    min-height: 70vh;
}

/* 侧边栏样式 */
.sidebar {
    flex: 0 0 350px;
    background-color: #f8f9fa;
    padding: 30px;
    border-right: 1px solid #eaeaea;
}

.create-form h2, .instructions h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 颜色选择器 */
.color-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 3px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #2c3e50;
    transform: scale(1.1);
}

/* 按钮样式 */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

/* 说明区域 */
.instructions {
    margin-top: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.instructions ul {
    padding-left: 20px;
    margin-top: 15px;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 30px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.controls h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: flex;
    gap: 15px;
}

/* 倒计时容器 */
.countdowns-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* 倒计时卡片 */
.countdown-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 6px solid;
    position: relative;
    overflow: hidden;
}

.countdown-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.countdown-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.countdown-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.countdown-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* 倒计时显示 */
.countdown-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    text-align: center;
}

.time-unit {
    flex: 1;
    padding: 15px 5px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 0 5px;
}

.time-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

.time-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* 进度条 */
.progress-container {
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.progress-bar {
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* 卡片操作 */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.card-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state i {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #7f8c8d;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.modal-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* 页脚 */
footer {
    padding: 25px;
    text-align: center;
    background-color: #2c3e50;
    color: white;
    font-size: 1rem;
    border-top: 5px solid #3498db;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }

    .countdowns-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }

    .countdowns-container {
        grid-template-columns: 1fr;
    }

    .time-value {
        font-size: 1.8rem;
    }
}