/* ===== Currency Converter - Modern Styles ===== */
.cc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.cc-main { min-width: 0; }
.cc-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); }
.cc-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* Form */
.cc-form { display: grid; gap: 18px; margin-bottom: 24px; }
.cc-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.cc-group { display: flex; flex-direction: column; gap: 8px; }
.cc-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.cc-select {
  padding: 14px 16px; border: 2px solid var(--border-light); border-radius: 12px;
  font-size: 15px; background: var(--bg); color: var(--text);
  outline: none; transition: all 0.2s ease; cursor: pointer; font-family: inherit; font-weight: 500;
}
.cc-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12); }
body[data-theme="dark"] .cc-select { background: var(--bg-muted); border-color: var(--border); }
body[data-theme="dark"] .cc-select:focus { background: var(--bg-card); }

.cc-input {
  padding: 16px 18px; border: 2px solid var(--border-light); border-radius: 12px;
  font-size: 22px; font-weight: 700; background: var(--bg); color: var(--text);
  outline: none; transition: all 0.2s ease; font-family: inherit;
}
.cc-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12); }
body[data-theme="dark"] .cc-input { background: var(--bg-muted); border-color: var(--border); }
body[data-theme="dark"] .cc-input:focus { background: var(--bg-card); }

.cc-swap {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none;
  cursor: pointer; font-size: 16px; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: transform 0.2s; display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.cc-swap:hover { transform: rotate(180deg); }

.cc-convert-btn {
  width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.cc-convert-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4); }
.cc-convert-btn:active { transform: translateY(0); }

/* Result */
.cc-result-card {
  background: linear-gradient(135deg, var(--primary-50), var(--bg-soft));
  border-radius: 16px; padding: 28px; text-align: center; margin-bottom: 20px;
  border: 1px solid var(--border-light);
}
.cc-result-big { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 8px; letter-spacing: -1px; }
.cc-result-info { font-size: 15px; color: var(--text-secondary); margin-bottom: 10px; font-weight: 500; }
.cc-result-rate { font-size: 13px; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border-light); }
body[data-theme="dark"] .cc-result-card { background: linear-gradient(135deg, rgba(99,102,241,0.12), var(--bg-muted)); }
body[data-theme="dark"] .cc-result-big { color: #a5b4fc; }

/* Quick reference table */
.cc-ref-table { margin-bottom: 16px; }
.cc-ref-title { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }
.cc-ref-grid { display: grid; gap: 8px; }
.cc-ref-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-soft); border-radius: 10px;
  font-size: 14px; color: var(--text-secondary); transition: background 0.15s;
}
.cc-ref-item:hover { background: var(--primary-50); }
.cc-ref-item i { color: var(--text-muted); font-size: 12px; }
.cc-ref-from { font-weight: 600; color: var(--text); }
.cc-ref-to { font-weight: 700; color: var(--primary); }
body[data-theme="dark"] .cc-ref-item { background: var(--bg-muted); }
body[data-theme="dark"] .cc-ref-item:hover { background: rgba(99,102,241,0.12); }

/* Error */
.error-msg { padding: 14px 18px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; color: #dc2626; font-size: 14px; font-weight: 500; }
body[data-theme="dark"] .error-msg { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* SEO */
.cc-seo { margin-top: 24px; padding: 20px 24px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.cc-seo p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* Sidebar (shared) */
.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; }
.ad-placeholder .ad-icon { font-size: 1.8rem; color: var(--text-muted); margin-bottom: 10px; opacity: 0.4; }
.ad-placeholder .ad-label { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.ad-placeholder .ad-size { font-size: 0.75rem; color: var(--text-muted); opacity: 0.6; }

/* Dark mode */
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"] .cc-seo { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .cc-card { background: var(--bg-card); border-color: var(--border); }

/* Responsive */
@media (max-width: 1024px) { .cc-layout { grid-template-columns: 1fr 280px; gap: 20px; } }
@media (max-width: 860px) { .cc-layout { grid-template-columns: 1fr; } .cc-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (max-width: 768px) {
  .cc-row { grid-template-columns: 1fr; }
  .cc-swap { justify-self: center; transform: rotate(90deg); margin: 0; }
  .cc-swap:hover { transform: rotate(270deg); }
  .cc-card { padding: 20px; }
  .cc-input { font-size: 18px; }
}
@media (max-width: 640px) { .cc-sidebar { grid-template-columns: 1fr; } }