/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Neo-Brutalism Color Palette - Saturated Candy Colors */
    --candy-pink: #FF6B9D;
    --candy-yellow: #FFD93D;
    --candy-blue: #6BCF7F;
    --candy-green: #4ECDC4;
    --candy-purple: #A78BFA;
    --candy-orange: #FF8C42;
    
    --primary-color: var(--candy-pink);
    --secondary-color: var(--candy-yellow);
    --accent-color: var(--candy-blue);
    --success-color: var(--candy-green);
    --warning-color: var(--candy-orange);
    --error-color: #FF5252;
    
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #7A7A7A;
    
    --border-color: #1A1A1A;
    --border-width: 3px;
    
    --background: #F8F3E6;
    --surface: #FFFFFF;
    
    /* Neo-Brutalism Shadows - Strong Offset */
    --shadow-offset: 6px;
    --shadow-brutal: var(--shadow-offset) var(--shadow-offset) 0 0 var(--border-color);
    --shadow-brutal-hover: 8px 8px 0 0 var(--border-color);
    --shadow-brutal-active: 2px 2px 0 0 var(--border-color);
    
    /* Bold Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Typography - Bold & Monospace */
    --font-family: 'Space Mono', 'Courier New', monospace;
    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Animation Easing - Exponential Out */
    --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-expo-out);
    --transition-base: 200ms var(--ease-expo-out);
}

body {
    font-family: var(--font-display);
    font-weight: 600;
    background: var(--background);
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 顶部导航栏 - Neo-Brutalism Style */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: var(--border-width) solid var(--border-color);
    box-shadow: 0 var(--shadow-offset) 0 0 rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-primary);
    font-size: 20px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.15));
}

.logo-text {
    font-size: 20px;
    text-transform: uppercase;
}

/* 日期选择器 - Neo-Brutalism */
.date-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

.week-nav-btn {
    width: 42px;
    height: 42px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--candy-yellow);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-brutal);
}

.week-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 3;
}

.week-nav-btn:hover {
    transform: translate(-2px, -2px) rotate(-2deg);
    box-shadow: var(--shadow-brutal-hover);
}

.week-nav-btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

.date-picker-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.current-date {
    padding: 10px 20px;
    background: var(--candy-pink);
    color: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    box-shadow: var(--shadow-brutal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-date:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-brutal-hover);
}

.current-date:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

/* 导航操作 - Neo-Brutalism */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    height: 42px;
    padding: 0 18px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.today-btn {
    background: var(--candy-blue);
    color: var(--text-primary);
    box-shadow: var(--shadow-brutal);
}

.today-btn:hover {
    transform: translate(-2px, -2px) rotate(1deg);
    box-shadow: var(--shadow-brutal-hover);
}

.today-btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

.settings-btn {
    background: var(--candy-purple);
    color: white;
    width: 42px;
    padding: 0;
    justify-content: center;
    box-shadow: var(--shadow-brutal);
}

.settings-icon {
    width: 20px;
    height: 20px;
}

.settings-btn:hover {
    transform: translate(-2px, -2px) rotate(90deg);
    box-shadow: var(--shadow-brutal-hover);
}

.settings-btn:active {
    transform: translate(2px, 2px) rotate(90deg);
    box-shadow: var(--shadow-brutal-active);
}

.install-script-btn {
    background: var(--candy-pink);
    color: white;
    box-shadow: var(--shadow-brutal);
}

.install-script-btn:hover {
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: var(--shadow-brutal-hover);
}

.install-script-btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

/* 页脚 */
.app-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    border-top: var(--border-width) solid var(--border-color);
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 4px 6px;
    transition: color var(--transition-base);
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--primary-color);
}

.footer-icon {
    width: 16px;
    height: 16px;
    flex: none;
}

.footer-note {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* 周视图 - Neo-Brutalism */
.week-view {
    margin-bottom: 32px;
}

.week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-brutal);
}

.week-day {
    text-align: center;
    padding: 16px 10px;
    border-radius: var(--radius-md);
    border: var(--border-width) solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--background);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow: 3px 3px 0 0 var(--border-color);
    animation: slideInX 0.5s var(--ease-expo-out) both;
}

.week-day:hover {
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: 5px 5px 0 0 var(--border-color);
}

.week-day:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 0 var(--border-color);
}

.week-day.active {
    background: var(--candy-pink);
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--border-color);
}

.week-day.today {
    background: var(--candy-yellow);
    color: var(--text-primary);
    font-weight: 800;
}

.week-day-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 900;
}

.week-day-date {
    font-size: 20px;
    font-weight: 900;
}

/* 课程容器 - Neo-Brutalism */
.course-container {
    position: relative;
    background: var(--surface);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    min-height: 400px;
    box-shadow: var(--shadow-brutal);
    overflow: hidden;
}

/* 课程列表 */
.course-list {
    padding: 24px;
    min-height: 400px;
}

.course-item {
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: visible;
    box-shadow: var(--shadow-brutal);
    /* X-axis slide-in animation */
    animation: slideInX 0.6s var(--ease-expo-out) both;
}

@keyframes slideInX {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.course-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--candy-blue);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.course-item:hover {
    transform: translate(-3px, -3px) rotate(-0.5deg);
    box-shadow: 10px 10px 0 0 var(--border-color);
}

.course-item:hover::before {
    opacity: 0.2;
}

.course-item:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

.course-item.current {
    border-color: var(--candy-green);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 6px 6px 0 0 var(--candy-green);
}

.course-item.current::after {
    content: '进行中';
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--candy-green);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-item.upcoming {
    border-color: var(--candy-orange);
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
    box-shadow: 6px 6px 0 0 var(--candy-orange);
}

.course-item.upcoming::after {
    content: '即将开始';
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--candy-orange);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.course-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.course-time {
    background: var(--candy-purple);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: var(--border-width) solid var(--border-color);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 3px 3px 0 0 var(--border-color);
    font-family: var(--font-family);
}

.course-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.course-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
}

.detail-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-primary);
}

.detail-icon-inline {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: text-top;
}

/* Empty state - Neo-Brutalism */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    color: var(--candy-pink);
    filter: drop-shadow(4px 4px 0 var(--border-color));
}

.empty-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.empty-description {
    font-size: 16px;
    font-weight: 600;
    max-width: 400px;
    color: var(--text-secondary);
}

/* 设置面板 - Neo-Brutalism */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.settings-panel.show {
    opacity: 1;
    visibility: visible;
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.settings-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9) rotate(-2deg);
    background: var(--surface);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 12px 12px 0 0 var(--border-color);
    transition: all var(--transition-base);
}

.settings-panel.show .settings-content {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--candy-yellow);
}

.settings-header h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.close-btn {
    width: 36px;
    height: 36px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0 0 var(--border-color);
}

.close-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 3;
}

.close-btn:hover {
    background: var(--error-color);
    color: white;
    transform: translate(-2px, -2px) rotate(90deg);
    box-shadow: 5px 5px 0 0 var(--border-color);
}

.close-btn:active {
    transform: translate(1px, 1px) rotate(90deg);
    box-shadow: 1px 1px 0 0 var(--border-color);
}

.settings-body {
    padding: 24px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    background: var(--background);
}

.settings-body section {
    margin-bottom: 32px;
}

.settings-body h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

/* 导入选项 - Neo-Brutalism */
.import-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.import-btn {
    flex: 1;
    padding: 20px;
    border: var(--border-width) dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.1);
}

.import-btn:hover {
    border-style: solid;
    border-color: var(--candy-blue);
    background: var(--candy-blue);
    color: white;
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: 6px 6px 0 0 var(--border-color);
}

.import-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 0 var(--border-color);
}

.import-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

/* 编辑器 - Neo-Brutalism */
.editor-container {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-brutal);
}

#dataEdit {
    width: 100%;
    height: 300px;
    border: none;
    padding: 16px;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px;
    background: var(--background);
    border-top: var(--border-width) solid var(--border-color);
}

/* 格式示例 - Neo-Brutalism */
.format-example {
    background: var(--surface);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: auto;
    box-shadow: var(--shadow-brutal);
}

.format-example pre {
    padding: 16px;
    font-family: var(--font-family);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 按钮样式 - Neo-Brutalism */
.btn {
    padding: 10px 20px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--candy-pink);
    color: white;
    box-shadow: var(--shadow-brutal);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-brutal-hover);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-brutal);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-brutal-hover);
}

.btn-outline:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-active);
}

/* 课程详情弹窗 - Neo-Brutalism */
.course-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.course-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9) rotate(2deg);
    background: var(--surface);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 12px 12px 0 0 var(--border-color);
    transition: all var(--transition-base);
}

.course-modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--candy-blue);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.modal-body {
    padding: 24px;
    background: var(--background);
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-content {
    color: var(--text-secondary);
    padding-left: 26px;
    font-weight: 600;
    font-size: 15px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: var(--border-width) solid var(--border-color);
    background: var(--background);
    justify-content: flex-end;
}

.modal-footer .btn {
    margin: 0;
}

/* 加载指示器 - Neo-Brutalism */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.loading-indicator.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: var(--border-width) solid var(--border-color);
    border-top-color: var(--candy-pink);
    border-right-color: var(--candy-yellow);
    border-bottom-color: var(--candy-blue);
    border-left-color: var(--candy-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: var(--shadow-brutal);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator p {
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 通知消息 - Neo-Brutalism */
.notification {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1002;
    transform: translateX(120%);
    transition: transform var(--transition-base);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-brutal);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.notification.success .notification-content {
    background: var(--candy-green);
    color: white;
}

.notification.error .notification-content {
    background: var(--error-color);
    color: white;
}

.notification.warning .notification-content {
    background: var(--candy-yellow);
    color: var(--text-primary);
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 3;
}

.notification-text {
    flex: 1;
    font-size: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .nav-content {
        padding: 0 12px;
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        min-height: 80px;
        gap: 10px 12px;
        padding-top: 12px;
        padding-bottom: 12px;
        align-items: center;
    }
    
    .logo {
        align-self: center;
        flex: 0 1 auto;
        min-width: 0;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .date-selector {
        order: 2;
        flex: 1 0 100%;
        min-width: 0;
        justify-content: center;
        gap: 12px;
    }
    
    .nav-actions {
        position: static;
        align-self: center;
        margin-left: auto;
        gap: 6px;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .week-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .current-date {
        padding: 6px 12px;
        font-size: 16px;
    }
    
    .action-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 14px;
    }
    
    .settings-btn {
        width: 32px;
        padding: 0;
    }
    
    /* 主内容优化 */
    .main-content {
        padding: 12px;
        margin-top: 8px;
    }
    
    /* 周视图优化 */
    .week-view {
        margin-bottom: 16px;
    }
    
    .week-days {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        padding: 8px;
    }
    
    .week-day {
        padding: 6px 2px;
        border-radius: 6px;
        min-height: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .week-day-name {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .week-day-date {
        font-size: 14px;
    }
    
    /* 课程列表优化 */
    .course-container {
        border-radius: 8px;
    }
    
    .course-list {
        padding: 16px 12px;
    }
    
    .course-item {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .course-title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .course-time {
        align-self: flex-end;
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .course-details {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 8px;
    }
    
    .course-detail-item {
        font-size: 13px;
        gap: 6px;
    }
    
    .detail-icon {
        width: 14px;
        height: 14px;
    }
    
    .empty-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }
    
    /* 空状态优化 */
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .empty-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .empty-description {
        font-size: 14px;
    }
    
    /* 设置面板优化: 手机端改为全屏底部抽屉, 便于内部滚动 */
    .settings-content {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: none;
        height: 100%;
        height: 100dvh;
        margin: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .settings-panel.show .settings-content {
        transform: translateY(0);
    }

    .settings-header {
        flex: 0 0 auto;
        padding: 16px;
    }

    .settings-header h2 {
        font-size: 18px;
    }

    .settings-body {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        height: auto;
        max-height: none;
        padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    }
    
    .settings-body h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .import-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .import-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .import-icon {
        font-size: 20px;
    }
    
    #dataEdit {
        height: 200px;
        font-size: 13px;
        padding: 12px;
    }
    
    .editor-actions {
        padding: 12px;
        gap: 8px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .format-example pre {
        font-size: 11px;
        padding: 12px;
        line-height: 1.3;
    }
    
    /* 课程详情弹窗优化 */
    .modal-content {
        width: 90%;
        max-width: 500px;
        margin: 10px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
        font-size: 14px;
    }
    
    /* 通知优化 */
    .notification {
        top: 90px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .notification-content {
        padding: 12px;
        font-size: 14px;
    }
    
    .notification-icon {
        font-size: 16px;
    }
    
    /* 加载指示器优化 */
    .loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
        margin-bottom: 12px;
    }
    
    .loading-indicator p {
        font-size: 14px;
    }
    
    /* 页脚优化 */
    .app-footer {
        padding: 20px 16px 36px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
}

/* 更小屏幕优化 */
@media (max-width: 480px) {
    .nav-content {
        min-height: 70px;
        padding: 8px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .current-date {
        font-size: 14px;
        padding: 4px 8px;
    }
    
    .week-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .action-btn {
        height: 28px;
        padding: 0 8px;
        font-size: 12px;
    }
    
    .settings-btn {
        width: 28px;
    }
    
    .week-day {
        min-height: 40px;
        padding: 4px 1px;
    }
    
    .week-day-name {
        font-size: 9px;
    }
    
    .week-day-date {
        font-size: 12px;
    }
    
    .course-title {
        font-size: 15px;
    }
    
    .course-detail-item {
        font-size: 12px;
    }
    
    .empty-icon {
        width: 40px;
        height: 40px;
    }
    
    .empty-title {
        font-size: 16px;
    }
    
    .empty-description {
        font-size: 13px;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-content {
        flex-direction: row;
        height: 56px;
        min-height: 56px;
        padding: 0 12px;
    }
    
    .date-selector {
        order: 0;
        width: auto;
        flex: 1;
    }
    
    .nav-actions {
        position: static;
        align-self: center;
    }
    
    .main-content {
        padding: 8px 12px;
        margin-top: 4px;
    }
    
    .week-view {
        margin-bottom: 12px;
    }
    
    .course-list {
        padding: 12px;
    }
    
    .course-item {
        padding: 12px;
        margin-bottom: 8px;
    }
}

/* 移动端特殊样式 */
.mobile-device {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile-device .course-item,
.mobile-device .week-day,
.mobile-device .action-btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* 触摸反馈 */
.course-item:active,
.week-day:active,
.action-btn:active,
.nav-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 滑动提示 */
.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
    pointer-events: none;
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* 移动端日期选择器 
@media (max-width: 768px) {
    .date-input[type="date"] {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 9999 !important;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 12px;
        box-shadow: var(--shadow-lg);
    }
}
*/
/* 触摸优化 */
@media (pointer: coarse) {
    .week-nav-btn,
    .action-btn,
    .close-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .course-item {
        min-height: 60px;
        padding: 18px;
    }
    
    .week-day {
        min-height: 52px;
    }
    
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
}

/* 动画增强 - Neo-Brutalism with Staggered X-axis Entry */

/* Staggered animation delays for course items */
.course-item:nth-child(1) { animation-delay: 0.05s; }
.course-item:nth-child(2) { animation-delay: 0.1s; }
.course-item:nth-child(3) { animation-delay: 0.15s; }
.course-item:nth-child(4) { animation-delay: 0.2s; }
.course-item:nth-child(5) { animation-delay: 0.25s; }
.course-item:nth-child(6) { animation-delay: 0.3s; }
.course-item:nth-child(7) { animation-delay: 0.35s; }
.course-item:nth-child(8) { animation-delay: 0.4s; }

/* Week day staggered x-axis slide in */
.week-day:nth-child(1) { animation-delay: 0.05s; }
.week-day:nth-child(2) { animation-delay: 0.1s; }
.week-day:nth-child(3) { animation-delay: 0.15s; }
.week-day:nth-child(4) { animation-delay: 0.2s; }
.week-day:nth-child(5) { animation-delay: 0.25s; }
.week-day:nth-child(6) { animation-delay: 0.3s; }
.week-day:nth-child(7) { animation-delay: 0.35s; }
