html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background: #f7f7fa;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  margin-bottom: 60px;
}

/* Main container styling */
.main-container {
  background: #fff;
  border-radius: 10px;
  padding: 2rem 1rem;
  margin: 2rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  max-width: 900px;
}

/* Bank section styling */
.bank-section {
  background: #fafbfc;
  border-radius: 8px;
  padding: 1.2rem 0.5rem 1rem 0.5rem;
  margin-bottom: 2rem;
  border: 1px solid #f0f0f0;
  box-shadow: none;
}

.bank-title {
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.bank-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* Table styling */
.currency-table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: none;
}

.currency-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.currency-table thead th {
  font-weight: 600;
  text-align: center;
  padding: 1rem 0.75rem;
  border: none;
  position: relative;
}

.currency-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.currency-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.currency-table tbody td {
  padding: 1rem 0.75rem;
  text-align: center;
  font-weight: 500;
  border: none;
  vertical-align: middle;
}

.currency-value {
  font-weight: 600;
  color: #333;
}

.timestamp {
  color: #666;
  font-size: 0.9rem;
}

/* Pagination styling */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.pagination-custom {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-custom .page-item {
  border-radius: 8px;
  overflow: hidden;
}

.pagination-custom .page-link {
  border: none;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  color: #667eea;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination-custom .page-link:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pagination-custom .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pagination-custom .page-item.disabled .page-link {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

/* Page info styling */
.page-info {
  background: rgba(102, 126, 234, 0.1);
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #667eea;
  font-weight: 600;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #666;
}

.empty-state i {
  font-size: 3rem;
  color: #ddd;
  margin-bottom: 1rem;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
  .main-container {
    margin: 1rem;
    padding: 1rem;
    border-radius: 15px;
  }
  
  .bank-section {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .bank-title {
    font-size: 1.5rem;
  }
  
  .currency-table {
    font-size: 0.9rem;
  }
  
  .currency-table thead th,
  .currency-table tbody td {
    padding: 0.75rem 0.5rem;
  }
  
  .pagination-wrapper {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pagination-custom .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Status indicators */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.status-active {
  background: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

.status-warning {
  background: #ffc107;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
}

/* Header styling */
.main-header {
  text-align: center;
  margin-bottom: 2rem;
}

.main-title {
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.main-subtitle {
  color: #666;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Footer styling */
.footer {
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  padding: 1.5rem 0;
  margin-top: auto;
  backdrop-filter: blur(10px);
}

.footer small {
  color: #666;
  font-weight: 500;
}

/* Currency symbol styling */
.currency-symbol {
  font-weight: 700;
  color: #667eea;
}

/* Hover effects for tables */
.currency-table tbody tr:hover .currency-value {
  color: #667eea;
  font-weight: 700;
}

/* Bank specific colors */
.bank-section[data-bank="Enpara"] .bank-title {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bank-section[data-bank="Ziraat"] .bank-title {
  background: linear-gradient(45deg, #2ecc71, #27ae60);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bank-section[data-bank="Isbank"] .bank-title {
  background: linear-gradient(45deg, #3498db, #2980b9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bank-section[data-bank="Garanti"] .bank-title {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bank-section[data-bank="YapiKredi"] .bank-title {
  background: linear-gradient(45deg, #9b59b6, #8e44ad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bank-section[data-bank="ING"] .bank-title {
  background: linear-gradient(45deg, #ff6900, #ff4500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Toggle controls styling */
.toggle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.toggle-group label:first-child {
  font-weight: 600;
  color: #667eea;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  gap: 0.5rem;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.slider {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-switch:hover .slider {
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.chart-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-instructions {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.chart-actions {
  text-align: center;
}

@media (max-width: 768px) {
  .toggle-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .toggle-group {
    justify-content: flex-start;
    margin-right: 0;
  }
  
  .chart-controls {
    text-align: center;
  }
}

/* Last update indicator */
.last-update {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 20px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Animation for data refresh */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.bank-section {
  animation: fadeIn 0.6s ease-out;
}

/* Print styles */
@media print {
  body {
    background: white !important;
  }
  
  .main-container {
    background: white !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 1rem !important;
  }
  
  .pagination-wrapper,
  .scroll-to-top {
    display: none !important;
  }
  
  .bank-section {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* Chart section styling */
.chart-section {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #ececec;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.chart-header {
  margin-bottom: 1.5rem;
}

.chart-header h3 {
  color: #333;
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-end;
}

.chart-instructions {
  flex: 1;
  min-width: 300px;
}

.instruction-text {
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
  border: 1px solid #e9ecef;
  display: inline-block;
}

.chart-actions {
  display: flex;
  gap: 0.5rem;
}

.chart-actions button {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  border: none;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
}

.toggle-controls {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
}

.toggle-group > label {
  font-weight: 500;
  color: #444;
}

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch input:checked + .slider {
  background-color: #007bff;
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.chart-container {
  position: relative;
  height: 400px;
  margin-top: 1rem;
}

.chart-container canvas {
  border-radius: 4px;
}

@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .chart-instructions {
    min-width: auto;
    text-align: center;
  }
  
  .instruction-text {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .chart-actions {
    justify-content: center;
  }
  
  .toggle-controls {
    justify-content: center;
  }
  
  .chart-container {
    height: 300px;
  }
}