/* Card Preview Variables & Base Styles */
:root {
  --card-padding: 1.25rem;
  --card-radius: 1rem;
  --frosted-glass-blur: 15px;
}

.site-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
  border-radius: var(--card-radius);
  width: 100%;
  background: white;
  border: 1px solid #f3f4f6; /* Subtle border */
  position: relative;
  overflow: hidden;
}

.site-card-content {
  padding: var(--card-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-card-fixed {
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  border-color: #d1d5db;
}

/* 图标消失动画 - Removed strict hover effects for cleaner look, or keep subtle */
.site-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.site-card:hover .site-icon {
  transform: scale(1.1);
}

/* 标题放大动画 */
.site-title {
  transform-origin: left center;
  transition: color 0.2s;
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

.site-card:hover .site-title {
  color: #2563eb;
}

.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word;
}

/* Settings Tabs */
.settings-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.settings-tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.settings-tab-btn:hover {
  color: #343a40;
}

.settings-tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

/* Switch / Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 48px !important; /* Force width to override form-group label styles */
  height: 24px;
  margin: 0 !important; /* Reset margin */
  min-width: 48px; /* Prevent shrinking */
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(24px);
  -ms-transform: translateX(24px);
  transform: translateX(24px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 毛玻璃效果 - Copied from style.css */
.frosted-glass-effect {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(var(--frosted-glass-blur, 15px)) !important;
  -webkit-backdrop-filter: blur(var(--frosted-glass-blur, 15px)) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.frosted-glass-effect:hover {
  background: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
}

/* Fix: Ensure datalist arrow is visible and interactive */
input[list]::-webkit-calendar-picker-indicator {
  opacity: 1 !important;
  display: block !important;
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: -10px; /* Pull it slightly left if needed, or stick to right */
  transition: all 0.2s;
}

input[list]:hover::-webkit-calendar-picker-indicator {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}

/* ========================================= */
/* 风格二 (Style 2): 垂直布局 - Copied from style.css */
/* ========================================= */
.site-card.style-2 .flex.items-start {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-card.style-2 .site-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 3rem; 
    height: 3rem;
    transition: transform 0.3s ease;
}

.site-card.style-2:hover .site-icon {
    transform: scale(1.1);
}

.site-card.style-2 .site-icon img,
.site-card.style-2 .site-icon div {
    margin: 0 auto;
}

.site-card.style-2 .site-title {
    text-align: center;
    margin-bottom: 0.25rem;
    display: block;
    width: 100%;
}

.site-card.style-2 .flex-1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-card.style-2 .preview-category {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.site-card .site-category {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-live-preview[data-device="mobile"] .site-card.style-2 .site-category,
.site-card.style-2 .preview-category {
    display: inline-block;
    max-width: min(100%, 5rem);
    vertical-align: middle;
}

.home-live-preview[data-device="mobile"] .live-card-category {
    display: inline-block;
    max-width: min(100%, 5rem);
    vertical-align: middle;
}

.site-card.style-2 p {
    text-align: center;
    margin-top: 0.5rem;
}

.site-card.style-2 .preview-links {
    margin-top: 0.75rem;
    justify-content: space-between; 
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

