* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
  width: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-header h1 {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 5px;
}

.sidebar-header p {
  font-size: 14px;
  opacity: 0.8;
}

.view-section {
  margin-bottom: 30px;
}

.view-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.view-section h3::before {
  content: '';
  width: 4px;
  height: 16px;
  background: rgba(255,255,255,0.6);
  margin-right: 10px;
  border-radius: 2px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.radio-item:hover {
  background: rgba(255,255,255,0.1);
}

.radio-item input[type="radio"] {
  margin-right: 10px;
  accent-color: #fff;
}

.radio-item label {
  cursor: pointer;
  font-size: 14px;
  flex: 1;
}

.radio-item.active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

.action-buttons {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.action-buttons h3 {
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.action-buttons h3::before {
  content: '';
  width: 4px;
  height: 16px;
  background: rgba(255,255,255,0.6);
  margin-right: 10px;
  border-radius: 2px;
}

.btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-primary:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

.calendar-container {
  flex: 1;
  padding: 20px;
  overflow: hidden;
}

#calendar {
  height: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* FullCalendar 自定义样式 */
.fc {
  height: 100% !important;
}

.fc-toolbar {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
}

.fc-toolbar-title {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
}

.fc-button {
  background: #667eea !important;
  border-color: #667eea !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.fc-button:hover {
  background: #5a6fd8 !important;
  border-color: #5a6fd8 !important;
  transform: translateY(-1px);
}

.fc-button-active {
  background: #764ba2 !important;
  border-color: #764ba2 !important;
}

/* 自定义工具栏按钮组样式 */
.toolbar-button-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toolbar-button-group:not(:last-child) {
  margin-right: 20px;
}

.toolbar-btn {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  justify-content: center;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toolbar-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.toolbar-btn-group {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toolbar-btn-group .toolbar-btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid #dee2e6;
  min-width: 50px;
  padding: 8px 12px;
}

.toolbar-btn-group .toolbar-btn:last-child {
  border-right: none;
}

.toolbar-btn-group .toolbar-btn.active {
  background: #667eea;
  color: white;
}

.toolbar-btn-group .toolbar-btn:not(.active):hover {
  background: #f8f9fa;
}

/* 工具栏右侧容器样式 */
.fc-toolbar-chunk:last-child {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-direction: row !important;
}

/* 确保工具栏按钮组横向排列 */
.fc-toolbar-chunk:last-child .toolbar-button-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

/* 覆盖FullCalendar默认样式 */
.fc-toolbar-chunk:last-child > * {
  display: inline-flex !important;
  flex-direction: row !important;
}

/* 响应式工具栏 */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    padding: 15px;
  }
  
  .calendar-container {
    padding: 10px;
  }
  
  .toolbar-button-group {
    gap: 8px;
  }
  
  .toolbar-button-group:not(:last-child) {
    margin-right: 12px;
  }
  
  .toolbar-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 50px;
  }
  
  .toolbar-btn-group .toolbar-btn {
    padding: 6px 10px;
    min-width: 40px;
  }
}

.fc-daygrid-day {
  transition: background-color 0.2s ease;
}

.fc-daygrid-day:hover {
  background-color: #f8f9fa;
}

/* 选中日期样式 */
.fc-daygrid-day.fc-day-selected {
  background-color: #e3f2fd !important;
  border: 2px solid #2196f3 !important;
}

.fc-daygrid-day.fc-day-selected:hover {
  background-color: #bbdefb !important;
}

.fc-event {
  border-radius: 4px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-event:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    padding: 15px;
  }
  
  .calendar-container {
    padding: 10px;
  }
}

/* 隐藏文件输入框 */
#importFile {
  display: none;
}

/* 颜色统计样式 */
.color-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.color-stat-row:hover {
  background-color: rgba(255,255,255,0.1);
}

.color-stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.color-stat-count {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
}

/* 颜色选择器样式 */
.color-picker {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 4px;
  justify-content: flex-start;
}

.color-option {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.color-option.selected {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px #333, 0 2px 8px rgba(0,0,0,0.3);
  transform: scale(1.15);
} 