/* ===== World Clock - Modern Styles ===== */

.wc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.wc-main { min-width: 0; }
.wc-card {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 18px;
  padding: 32px; box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.wc-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* Local bar */
.wc-local-bar {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 24px;
  color: #fff;
}
.wc-local-icon { font-size: 24px; opacity: 0.9; }
.wc-local-info { flex: 1; }
.wc-local-label { font-size: 12px; opacity: 0.8; display: block; margin-bottom: 2px; }
.wc-local-time { font-size: 28px; font-weight: 800; font-family: 'Consolas', monospace; letter-spacing: 1px; }
.wc-local-date { font-size: 14px; font-weight: 500; opacity: 0.9; text-align: right; }

/* Grid */
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.wc-city-card {
  background: var(--bg-soft); border: 1px solid var(--border-light); border-radius: 14px;
  padding: 18px 16px; text-align: center; transition: all 0.2s; cursor: pointer;
}
.wc-city-card:hover { transform: translateY(-2px); border-color: var(--primary-100); box-shadow: 0 4px 12px rgba(79,70,229,0.1); }
.wc-city-card .wc-city-icon { font-size: 20px; margin-bottom: 8px; color: var(--primary); }
.wc-city-card .wc-city-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.wc-city-card .wc-city-time { font-size: 22px; font-weight: 800; font-family: 'Consolas', monospace; color: var(--text); letter-spacing: 1px; }
.wc-city-card .wc-city-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.wc-city-card .wc-city-offset { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.wc-city-card .wc-city-remove {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border-radius: 6px; background: rgba(239,68,68,0.1); color: var(--danger);
  display: none; align-items: center; justify-content: center; font-size: 10px; cursor: pointer;
}
.wc-city-card:hover .wc-city-remove { display: flex; }
.wc-city-card.custom { position: relative; }
.wc-city-card.custom .wc-city-remove { display: flex; }
.wc-city-card .wc-city-daylight { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Custom city */
.wc-custom-section { border-top: 1px solid var(--border-light); padding-top: 20px; }
.wc-custom-header { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 12px; }
.wc-custom-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wc-custom-input {
  flex: 1; min-width: 160px; padding: 10px 14px; border: 2px solid var(--border-light);
  border-radius: 10px; font-size: 13px; outline: none; background: var(--bg);
  color: var(--text); transition: border-color 0.2s; font-family: inherit;
}
.wc-custom-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.wc-custom-input-sm { flex: 0.5; min-width: 100px; }
.wc-add-btn {
  padding: 10px 20px; background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 10px rgba(79,70,229,0.25);
}
.wc-add-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,70,229,0.35); }
.wc-custom-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.wc-error { margin-top: 12px; padding: 12px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; color: #dc2626; font-size: 13px; font-weight: 500; display: none; }
body[data-theme="dark"] .wc-error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

body[data-theme="dark"] .wc-card { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .sidebar-section { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .sidebar-tool { background: var(--bg-muted); }
body[data-theme="dark"] .sidebar-tool:hover { background: var(--primary-50); }
body[data-theme="dark"] .ad-placeholder { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .wc-city-card { background: var(--bg-muted); border-color: var(--border); }
body[data-theme="dark"] .wc-city-card:hover { border-color: var(--primary-100); }
body[data-theme="dark"] .wc-custom-input { background: var(--bg-muted); border-color: var(--border); }

.wc-howto-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wc-howto-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.wc-howto-num {
  width: 24px; height: 24px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sidebar-section { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.sidebar-header { text-align: center; padding: 28px 20px !important; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; border-color: transparent !important; }
.sidebar-header h1 { font-size: 1.35rem; font-weight: 800; color: #fff; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.sidebar-header p { font-size: 0.82rem; color: rgba(255,255,255,0.85); }
body[data-theme="dark"] .sidebar-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.sidebar-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sidebar-title i { color: var(--primary); font-size: 0.9rem; }
.sidebar-tools { display: flex; flex-direction: column; gap: 8px; }
.sidebar-tool { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: all 0.2s; text-decoration: none; background: var(--bg-soft); }
.sidebar-tool:hover { background: var(--primary-50); transform: translateX(3px); }
.sidebar-tool-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 16px; flex-shrink: 0; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.sidebar-tool-info { flex: 1; min-width: 0; }
.sidebar-tool-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.sidebar-tool-desc { font-size: 0.78rem; color: var(--text-muted); }
.ad-placeholder { width: 300px; height: 250px; flex-shrink: 0; margin: 0 auto; background: var(--bg-card); border: 2px dashed var(--border); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }

@media (max-width: 1024px) { .wc-layout { grid-template-columns: 1fr 280px; gap: 20px; } }
@media (max-width: 860px) { .wc-layout { grid-template-columns: 1fr; } .wc-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (max-width: 768px) {
  .wc-card { padding: 20px; }
  .wc-local-time { font-size: 22px; }
  .wc-custom-row { flex-direction: column; }
}
@media (max-width: 640px) { .wc-sidebar { grid-template-columns: 1fr; } }