* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1c2b4a;
    --secondary: #3a5175;
    --accent: #eabf3e;
    --accent-light: #f7d777;
    --battle-1: #4a6fa5;
    --battle-2: #d65d0e;
    --battle-3: #17ab8d;
    --battle-4: #b16286;
    --light: #ffffff;
    --dark-light: #8e9aaf;
    --gray: #6c757d;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
}

body {
    font-family: 'Roboto', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #0f1a30 0%, #1c2b4a 100%);
    color: var(--light);
    min-height: 100vh;
    padding: 20px 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    font-size: 2.8rem;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--dark-light);
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.current-battle {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(26, 41, 68, 0.8) 0%, rgba(35, 54, 89, 0.8) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* 小部件容器 */
.widget-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px; /* 统一小部件高度 */
}

.widget-content {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget-content.slide-out-left {
    opacity: 0;
    transform: translateX(-30px);
}

.widget-content.slide-out-right {
    opacity: 0;
    transform: translateX(30px);
}

.widget-content.slide-in-left {
    opacity: 0;
    transform: translateX(30px);
}

.widget-content.slide-in-right {
    opacity: 0;
    transform: translateX(-30px);
}

/* 小部件切换指示器 */
.widget-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
    padding: 5px;
}

.widget-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.widget-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.widget-indicator.active {
    background: var(--accent);
    border-color: var(--accent-light);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(234, 191, 62, 0.5);
}

/* 滑动区域 */
.widget-swipe-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 5;
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.widget-swipe-area:active {
    cursor: grabbing;
}

/* 防止拖拽时选中文本 */
.widget-container * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.current-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--light);
}

.current-title i {
    font-size: 1.8rem;
    margin-right: 15px;
    color: var(--accent);
}

.battle-info {
    text-align: center;
    padding: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.battle-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-light);
}

.battle-type {
    font-size: 1.3rem;
    color: var(--dark-light);
    margin-bottom: 10px;
}

.date-info {
    margin-top: 15px;
    font-size: 1.1rem;
}

.next-title {
    text-align: center;
    margin: 15px 0;
    font-weight: 500;
    color: var(--dark-light);
}

.next-battle {
    display: flex;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 1.1rem;
}

.battle-info.battle-0 { background: rgba(74, 111, 165, 0.25); }
.battle-info.battle-1 { background: rgba(214, 93, 14, 0.2); }
.battle-info.battle-2 { background: rgba(23, 171, 141, 0.2); }
.battle-info.battle-3 { background: rgba(177, 98, 134, 0.2); }

/* 水晶冲突地图背景色 */
.battle-info.crystal-0 { background: rgba(74, 111, 165, 0.25); } /* 角力学校 - 蓝色 */
.battle-info.crystal-1 { background: rgba(214, 93, 14, 0.2); }   /* 火山之心 - 橙红色 */
.battle-info.crystal-2 { background: rgba(138, 43, 226, 0.2); }  /* 机关大殿 - 紫色 */
.battle-info.crystal-3 { background: rgba(135, 206, 235, 0.2); } /* 九霄云上 - 天蓝色 */
.battle-info.crystal-4 { background: rgba(205, 92, 92, 0.2); }   /* 赤土红沙 - 红褐色 */
.battle-info.crystal-4 { background: rgba(205, 92, 92, 0.2); }   /* 赤土红沙 - 红褐色 */
.battle-info.crystal-5 { background: rgba(0, 69, 107, 0.2); }   /* 海岸斗场 - 海蓝色 */

/* 水晶冲突网格时间轴样式 */
.crystal-timeline {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.timeline-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
}

.timeline-item.current {
    background: rgba(234, 191, 62, 0.2);
    border: 2px solid var(--accent);
    box-shadow: 0 0 12px rgba(234, 191, 62, 0.4);
    transform: scale(1.05);
}

.timeline-map {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--light);
    text-align: center;
    margin-bottom: 8px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-map.crystal-0 { background: rgba(74, 111, 165, 0.8); }
.timeline-map.crystal-1 { background: rgba(214, 93, 14, 0.8); }
.timeline-map.crystal-2 { background: rgba(138, 43, 226, 0.8); }
.timeline-map.crystal-3 { background: rgba(135, 206, 235, 0.8); }
.timeline-map.crystal-4 { background: rgba(205, 92, 92, 0.8); }
.timeline-map.crystal-5 { background: rgba(0, 69, 107, 0.2); }  

.timeline-time {
    font-size: 0.85rem;
    color: var(--dark-light);
    font-weight: 500;
    text-align: center;
}

.timeline-item.current .timeline-time {
    color: var(--accent-light);
    font-weight: 600;
}

.timeline-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--accent-light);
}

.timeline-item.current .timeline-icon {
    color: var(--accent);
}

.calendar-container {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, rgba(26, 41, 68, 0.8) 0%, rgba(35, 54, 89, 0.8) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--light);
}

.calendar-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin: 0 5px;
}

.calendar-nav button:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--dark-light);
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    cursor: default;
    font-size: 0.95rem;
    position: relative;
}

.day.empty {
    background: transparent;
}

.day-num {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.day-battle {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
}

.today {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(234, 191, 62, 0.5);
}

.today .day-num {
    font-weight: 700;
}

.battle-0 .day-battle { background: var(--battle-1); }
.battle-1 .day-battle { background: var(--battle-2); }
.battle-2 .day-battle { background: var(--battle-3); }
.battle-3 .day-battle { background: var(--battle-4); }

.info-section {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(26, 41, 68, 0.5);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.info-title {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.info-item-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent-light);
}

.notes {
    background: rgba(234, 191, 62, 0.1);
    border-left: 3px solid var(--accent);
    padding: 15px;
    border-radius: 0 8px 8px 0;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: var(--dark-light);
    margin-top: 30px;
}

footer a {
    color: var(--accent-light);
    text-decoration: none;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .current-battle, .calendar-container {
        max-width: 100%;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .battle-name {
        font-size: 1.8rem;
    }
}
