/* Claw-Calendar - 用户界面样式 */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
}

/* 隐藏滚动条但保留滚动功能（适用于需要此效果的特定元素） */
.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* 布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--gray-50);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
}

/* 主内容区 */
.main-content {
  padding-top: 84px;
  padding-bottom: 40px;
}

/* 卡片 */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.card-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--gray-100);
}

.card-body {
  padding: 32px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.card-subtitle {
  color: var(--gray-500);
  font-size: 0.95rem;
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input.error {
  border-color: var(--danger);
}

.form-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.form-error {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--danger);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* 表单元素过渡动画 - 避免页面跳动 */
.form-group {
  transition: opacity 0.2s ease, transform 0.2s ease, height 0.2s ease, margin 0.2s ease, padding 0.2s ease;
}

/* 使用更高优先级覆盖 .hidden 的 display:none */
.form-group.form-group--hidden {
  opacity: 0;
  transform: scaleY(0);
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  pointer-events: none;
  display: block !important;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-block {
  width: 100%;
}

/* 登录/注册页面 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-box .card {
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  color: white;
  font-size: 0.95rem;
}

.auth-footer a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
}

/* 提示消息 */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Toast 通知 - 页面顶部居中 */
.toast-container {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  max-width: 90vw;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  min-width: 280px;
  max-width: 450px;
  line-height: 1;
}

.toast svg {
  flex-shrink: 0;
}

.toast span {
  flex: 1;
}

.toast a {
  flex-shrink: 0;
}

.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.toast.hide {
  animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* 全局消息提示 - 页面顶部居中 */
.global-message {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  max-width: 90vw;
  z-index: 10000;
  padding: 14px 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: globalMsgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 280px;
  max-width: 500px;
  text-align: center;
}

.global-message.hidden {
  display: none;
}

.global-message.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.global-message.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.global-message.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.global-message.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.global-message.show {
  animation: globalMsgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.global-message.hide {
  animation: globalMsgSlideOut 0.25s ease forwards;
}

@keyframes globalMsgSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes globalMsgSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* 用户信息卡片 */
.user-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.user-info h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.user-info p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* API Key 列表 */
.apikey-list {
  space-y: 12px;
}

.apikey-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.apikey-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.apikey-item.inactive {
  opacity: 0.6;
}

.apikey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.apikey-name {
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.apikey-name:hover {
  background-color: var(--gray-100);
}

.apikey-name-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.key-name-input {
  font-size: 1rem;
  font-weight: 600;
  padding: 4px 8px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  outline: none;
  flex: 1;
  min-width: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--gray-500);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.btn-icon-success {
  color: var(--success);
}

.btn-icon-success:hover {
  background-color: rgba(16, 185, 129, 0.1);
}

.btn-icon-secondary {
  color: var(--gray-500);
}

.btn-icon-secondary:hover {
  background-color: var(--gray-100);
}

.apikey-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.apikey-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.apikey-badge.inactive {
  background: var(--gray-200);
  color: var(--gray-600);
}

.apikey-value {
  font-family: 'Monaco', 'Menlo', monospace;
  background: var(--gray-800);
  color: #4ade80;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  overflow-wrap: break-word;
  word-break: break-all;
}

.apikey-value span {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-all;
}

.apikey-value .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 日历列表样式 */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
}

.calendar-item:hover {
  border-color: var(--gray-300);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calendar-name-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.calendar-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gray-900);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.calendar-name:hover {
  background-color: var(--gray-100);
}

.calendar-name-input {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 4px 8px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  outline: none;
  flex: 1;
  min-width: 0;
}

.calendar-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.calendar-badge.public {
  background: #dbeafe;
  color: #1e40af;
}

.calendar-badge.private {
  background: var(--gray-200);
  color: var(--gray-600);
}

.calendar-description {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.calendar-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.calendar-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 日程列表样式 */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.event-date-group {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
}

.event-date-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.event-date-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gray-900);
}

.event-date-header.today .event-date-title {
  color: var(--primary);
}

.event-today-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.event-date-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s;
}

.event-item:hover {
  border-color: var(--gray-300);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.event-description {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.event-location {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.event-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event-calendar-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--gray-200);
  color: var(--gray-600);
  border-radius: 4px;
  font-size: 0.75rem;
}

.event-badge.alarm {
  background: #fef3c7;
  color: #92400e;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* 输入框组 */
.input-group {
  display: flex;
  gap: 8px;
}

.input-group .form-input {
  flex: 1;
}

/* 帮助文本 */
.help-text {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.help-text ul {
  margin-top: 8px;
}

.help-text li {
  margin-bottom: 4px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}

/* 响应式导航 */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--gray-600);
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .navbar-nav.active {
    display: flex;
  }

  .navbar-nav .nav-link {
    padding: 12px;
    border-radius: var(--radius);
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    background: var(--gray-100);
  }

  .navbar-nav .btn {
    margin-left: 0;
    margin-top: 8px;
  }

  /* 移动端卡片调整 */
  .card {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .card-header .btn {
    width: 100%;
    justify-content: center;
  }

  /* 移动端表单调整 */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* 移动端按钮组调整 */
  .apikey-actions,
  .calendar-actions {
    flex-direction: column;
  }

  .apikey-actions .btn,
  .calendar-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* 移动端元信息调整 */
  .apikey-meta,
  .calendar-meta {
    flex-direction: column;
    gap: 8px;
  }

  /* 移动端事件项调整 */
  .event-item {
    flex-direction: column;
    gap: 12px;
  }

  .event-item .btn-icon {
    align-self: flex-end;
  }

  /* 移动端模态框调整 */
  .modal-content {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  /* 移动端筛选栏调整 */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .form-input {
    width: 100% !important;
  }
}

.apikey-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.apikey-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apikey-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--gray-600);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--gray-300);
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--gray-700);
}

/* 加载动画 */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 隐藏 */
.hidden {
  display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar .container {
    padding: 0 16px;
  }
  
  .navbar-brand span {
    display: none;
  }
  
  .card-header,
  .card-body {
    padding: 20px;
  }
  
  .user-profile {
    flex-direction: column;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .apikey-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .apikey-meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.breadcrumb-item {
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--gray-700);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--gray-400);
}

/* 搜索框样式 */
.search-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-input {
  padding: 10px 40px 10px 16px;
  width: 280px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
  position: absolute;
  right: 12px;
  color: var(--gray-400);
  pointer-events: none;
}

/* 批量操作样式 */
.batch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.selected-count {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.calendar-item.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.calendar-checkbox {
  margin-right: 12px;
}

.calendar-checkbox input {
  width: 18px;
  height: 18px;
}

/* 视图切换器 */
.view-switcher {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-btn {
  border: none;
  border-radius: 0;
  padding: 8px 12px;
  background: white;
  color: var(--gray-600);
}

.view-btn:hover {
  background: var(--gray-50);
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

.view-btn:first-child {
  border-right: 1px solid var(--gray-200);
}

/* 网格视图 */
.calendar-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.calendar-list.grid-view .calendar-item {
  margin-bottom: 0;
}

.calendar-list.grid-view .calendar-actions {
  flex-direction: column;
  gap: 8px;
}

.calendar-list.grid-view .calendar-actions .btn {
  width: 100%;
  justify-content: center;
}

.calendar-list.grid-view .calendar-meta {
  flex-direction: column;
  gap: 8px;
}
