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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 70%;
    width: 70%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 4px;
    margin-top: 5px;
}

/* 主题选择器 */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

.theme-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.theme-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.theme-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.theme-btn.active {
    opacity: 1;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

/* 左侧面板 */
.left-panel {
    flex: 0 0 350px;
    position: sticky;
    top: 20px;
}

/* 右侧面板 */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.right-panel section {
    width: 100%;
    margin-bottom: 0;
}

section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background-color: var(--primary-color);
    margin-right: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

input[type="text"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

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

/* 按钮样式 */
button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--text-muted);
    color: var(--bg-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background-color: #cc3746;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 200px;
}

.search-box select {
    width: auto;
    min-width: 150px;
}

/* 日程列表样式 */
.schedule-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.schedule-list-header h2 {
    margin-bottom: 0;
}

/* 开关样式 */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background-color: white;
}

.toggle-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    user-select: none;
}

#scheduleContainer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-item {
    width: 100%;
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 1rem;
}

.schedule-item {
    background-color: var(--bg-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

.schedule-item.overdue {
    border-left-color: var(--danger-color);
}

.schedule-item.today {
    border-left-color: var(--warning-color);
}

.schedule-item.completed {
    border-left-color: var(--success-color);
    opacity: 0.7;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.schedule-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.schedule-actions {
    display: flex;
    gap: 10px;
}

.schedule-datetime {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.schedule-description {
    color: var(--text-color);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.schedule-reminder {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* 日期时间选择器样式 */
.datetime-picker-content {
    max-width: 400px;
}

.datetime-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.datetime-picker-grid .date-section,
.datetime-picker-grid .time-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.datetime-picker-grid label {
    font-weight: 600;
    color: var(--primary-color);
}

.picker-input {
    padding: 12px 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
}

.picker-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
}

.picker-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel {
        flex: none;
        position: static;
        width: 100%;
    }

    .right-panel {
        width: 100%;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    section {
        padding: 20px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input,
    .search-box select {
        width: 100%;
    }

    .schedule-header {
        flex-direction: column;
        gap: 10px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}
