/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  /* Dark Theme Variables (Default) */
  --bg-color: hsl(224, 71%, 4%);
  --text-primary: hsl(0, 0%, 100%);
  --text-secondary: hsl(215, 20%, 65%);
  --text-muted: hsl(215, 16%, 47%);
  
  --primary: hsl(256, 84%, 64%);
  --primary-hover: hsl(256, 84%, 70%);
  --primary-rgb: 104, 81, 245;
  --accent: hsl(172, 80%, 50%);
  --accent-rgb: 26, 229, 188;
  
  --card-bg: hsla(223, 47%, 11%, 0.65);
  --card-border: hsla(223, 47%, 20%, 0.5);
  --input-bg: hsla(223, 47%, 7%, 0.6);
  --input-border: hsla(223, 47%, 22%, 0.8);
  --input-focus: hsl(256, 84%, 64%);
  
  --dropdown-bg: hsl(223, 47%, 10%);
  --dropdown-hover: hsl(223, 47%, 16%);
  
  --danger: hsl(351, 89%, 60%);
  --success: hsl(142, 76%, 45%);
  
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --glass-blur: 16px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  /* Light Theme Variables */
  --bg-color: hsl(220, 40%, 96%);
  --text-primary: hsl(224, 71%, 4%);
  --text-secondary: hsl(220, 15%, 40%);
  --text-muted: hsl(220, 10%, 60%);
  
  --primary: hsl(256, 84%, 58%);
  --primary-hover: hsl(256, 84%, 50%);
  --primary-rgb: 87, 58, 237;
  --accent: hsl(172, 85%, 40%);
  --accent-rgb: 15, 178, 146;
  
  --card-bg: hsla(0, 0%, 100%, 0.7);
  --card-border: hsla(220, 20%, 85%, 0.7);
  --input-bg: hsl(0, 0%, 100%);
  --input-border: hsl(220, 20%, 82%);
  --input-focus: hsl(256, 84%, 58%);
  
  --dropdown-bg: hsl(0, 0%, 100%);
  --dropdown-hover: hsl(220, 20%, 96%);
  
  --danger: hsl(351, 80%, 50%);
  --success: hsl(142, 70%, 40%);
  
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient Background Blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  animation: floatBlobs 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.8) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  animation-duration: 25s;
}

@keyframes floatBlobs {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, -30px) scale(1.1);
  }
  100% {
    transform: translate(-20px, 40px) scale(0.95);
  }
}

/* Main Container Layout */
.app-container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1;
}

/* Header Styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.3);
}

.logo-icon i {
  width: 24px;
  height: 24px;
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  background: linear-gradient(to right, var(--text-primary), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text h1 span {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Theme Toggle Button */
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: hsla(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.btn-icon i {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Grid Dashboard Layout */
.app-content {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Card Common Styles */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: hsla(var(--primary-rgb), 0.25);
}

.card-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2, .card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Rate Status Badge */
.rate-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: hsla(0, 0%, 100%, 0.05);
  border: 1px solid var(--card-border);
}

[data-theme="light"] .rate-status {
  background: rgba(0, 0, 0, 0.03);
}

.rate-status span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  position: relative;
}

.status-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--success);
  animation: pulse 1.5s infinite ease-in-out;
  opacity: 0.6;
}

.status-pulse.loading {
  background-color: var(--primary);
}
.status-pulse.loading::after {
  background-color: var(--primary);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Inputs & Form Styling */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

#amount-input {
  width: 100%;
  padding: 1.1rem 1rem 1.1rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 700;
  transition: all 0.25s ease;
  outline: none;
}

#amount-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

/* Selectors Container (From, Swap, To) */
.selectors-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  gap: 1rem;
}

.selector-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.selector-wrapper label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Custom Searchable Dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
}

.dropdown-trigger:focus,
.custom-dropdown.active .dropdown-trigger {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.selected-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--card-border);
}

.selected-code {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.selected-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.custom-dropdown.active .chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu List */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background-color: var(--dropdown-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(25px);
}

.custom-dropdown.active .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  background-color: var(--dropdown-bg);
  z-index: 10;
}

.dropdown-search i {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
}

.dropdown-list {
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
}

/* Scrollbar Customization */
.dropdown-list::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
#watchlist-items::-webkit-scrollbar {
  width: 6px;
}

.dropdown-list::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track,
#watchlist-items::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-list::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
#watchlist-items::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover,
#watchlist-items::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Dropdown Item Styling */
.dropdown-item {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--dropdown-hover);
}

.dropdown-item.selected {
  background-color: hsla(var(--primary-rgb), 0.15);
}

.dropdown-item.selected .selected-check {
  color: var(--accent);
  margin-left: auto;
  display: block;
}

.item-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--card-border);
}

.item-code {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 42px;
}

.item-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-check {
  display: none;
  width: 16px;
  height: 16px;
}

/* Swap Button */
.swap-action {
  display: flex;
  justify-content: center;
  padding-bottom: 2px;
}

.btn-swap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: var(--shadow-sm);
}

.btn-swap:hover {
  border-color: var(--primary);
  background-color: hsla(var(--primary-rgb), 0.1);
  transform: rotate(180deg) scale(1.05);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.swap-icon {
  width: 20px;
  height: 20px;
}

/* Output Display Area */
.conversion-output {
  margin-top: 0.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: hsla(0, 0%, 100%, 0.02);
  border: 1px solid var(--card-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .conversion-output {
  background: rgba(0, 0, 0, 0.015);
}

.base-rate, .inverse-rate {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.result-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.from-amount-val {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.equals-symbol {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
}

.result-amount {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Primary Action Buttons */
.btn-primary {
  width: 100%;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(256, 84%, 55%) 100%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px -6px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(var(--primary-rgb), 0.5);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary i {
  width: 18px;
  height: 18px;
  transition: transform 0.6s ease;
}

.btn-primary:hover i {
  transform: rotate(180deg);
}

/* Watchlist UI */
.btn-small-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: hsla(0, 0%, 100%, 0.05);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small-icon:hover {
  background: hsla(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.btn-small-icon i {
  width: 16px;
  height: 16px;
}

/* Watchlist Add dropdown form */
.watchlist-form-dropdown {
  background: hsla(0, 0%, 100%, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.watchlist-form-dropdown.hidden {
  display: none;
}

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

.watchlist-selectors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.min-dropdown {
  flex-grow: 1;
}

.min-dropdown .dropdown-trigger {
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
}

.min-dropdown .selected-code {
  font-size: 0.9rem;
}

.arrow-between {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.btn-confirm {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-confirm:hover {
  background: var(--primary-hover);
}

/* Watchlist items containers */
.watchlist-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.watchlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background: hsla(0, 0%, 100%, 0.03);
  border: 1px solid var(--card-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .watchlist-item {
  background: rgba(0, 0, 0, 0.02);
}

.watchlist-item:hover {
  transform: translateX(4px);
  border-color: hsla(var(--primary-rgb), 0.3);
  background: hsla(var(--primary-rgb), 0.02);
}

.wl-pair-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wl-flags {
  display: flex;
  align-items: center;
  position: relative;
  width: 32px;
  height: 18px;
}

.wl-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--card-border);
  position: absolute;
}

.wl-flag-from {
  left: 0;
  z-index: 2;
}

.wl-flag-to {
  right: 0;
  z-index: 1;
}

.wl-names {
  display: flex;
  flex-direction: column;
}

.wl-pair-text {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.wl-name-labels {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.wl-values {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wl-rate {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-wl-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 2px;
}

.btn-wl-delete:hover {
  color: var(--danger);
  transform: scale(1.15);
}

.btn-wl-delete i {
  width: 16px;
  height: 16px;
}

/* Placeholders */
.watchlist-placeholder,
.history-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  gap: 0.75rem;
}

.placeholder-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  opacity: 0.6;
}

.watchlist-placeholder p,
.history-placeholder p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 220px;
}

/* History UI */
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-text:hover {
  color: var(--danger);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: hsla(0, 0%, 100%, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .history-item {
  background: rgba(0, 0, 0, 0.015);
}

.history-item:hover {
  background: hsla(var(--primary-rgb), 0.05);
  border-color: hsla(var(--primary-rgb), 0.2);
  transform: translateY(-1px);
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.history-calc {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.1px;
}

.history-calc span {
  color: var(--accent);
}

.history-timestamp {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.history-arrow-btn {
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.history-item:hover .history-arrow-btn {
  opacity: 1;
  color: var(--primary);
  transform: translateX(2px);
}

.history-arrow-btn i {
  width: 16px;
  height: 16px;
}

/* Footer Styling */
.app-footer {
  text-align: center;
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-footer p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.app-footer .copyright {
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .app-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .side-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 680px) {
  .side-panel {
    grid-template-columns: 1fr;
  }
  
  .selectors-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .swap-action {
    padding: 0.25rem 0;
    align-self: center;
  }
  
  .btn-swap {
    transform: rotate(90deg);
  }
  
  .btn-swap:hover {
    transform: rotate(270deg) scale(1.05);
  }
  
  .app-container {
    padding: 1rem;
  }
  
  #amount-input {
    font-size: 1.4rem;
  }
  
  .result-amount {
    font-size: 1.8rem;
  }
}
