/* ===== CRYPTO TRACKER STYLES ===== */

/* Root Variables */
:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --gray-900: #1a1a1a;
  --gray-800: #2a2a2a;
  --gray-700: #3a3a3a;
  --gray-600: #4a4a4a;
  --border-color: #444;
  --text-muted: #6c757d;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--gray-900);
  color: white;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  min-height: 100vh;
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1rem;
}

/* Header Styles */
.bg-white {
  background-color: white !important;
}

.text-dark {
  color: var(--dark-color) !important;
}

.text-center {
  text-align: center;
}

.border-bottom {
  border-bottom: 1px solid #dee2e6;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.d-print-none {
  display: block;
}

@media print {
  .d-print-none {
    display: none !important;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-bold {
  font-weight: 700;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.p-6 {
  padding: 1.5rem;
}

/* Card Styles */
.card {
  background-color: var(--gray-800);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  background-color: var(--gray-700);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-header h5 {
  margin: 0;
  color: white;
}

/* Table Styles */
.table {
  width: 100%;
  background-color: transparent;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: white;
}

.table td, .table th {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--border-color);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border-color);
  background-color: var(--gray-700);
}

.table-bordered {
  border: 1px solid var(--border-color);
}

.table-bordered td,
.table-bordered th {
  border: 1px solid var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.075);
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  -webkit-user-select: none;
  user-select: none;  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  color: #fff;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  text-decoration: none;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Text Colors */
.text-success {
  color: var(--success-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-white {
  color: white !important;
}

/* Code Styles */
code {
  font-size: 87.5%;
  color: #e83e8c;
  word-wrap: break-word;
  background-color: var(--gray-700);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
}

/* Small Text */
.small, small {
  font-size: 0.875em;
  font-weight: 400;
}

/* Loading Animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Crypto Specific Styles */
.crypto-balance {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--success-color);
}

.crypto-address {
  font-family: 'Courier New', monospace;
  background-color: var(--gray-700);
  padding: 0.5rem;
  border-radius: 0.25rem;
  word-break: break-all;
}

.crypto-percentage {
  font-weight: bold;
  color: var(--info-color);
}

.crypto-value {
  color: var(--warning-color);
}

/* Status Indicators */
.status-online {
  color: var(--success-color);
}

.status-offline {
  color: var(--danger-color);
}

.status-loading {
  color: var(--warning-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
  
  h5 {
    font-size: 1.1rem;
  }
  
  .crypto-address {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 0.25rem;
  }
  
  .py-2 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  
  .card-header, .card-body {
    padding: 0.75rem;
  }
  
  .table td, .table th {
    padding: 0.5rem;
  }
  
  .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Dark Theme Enhancements */
.bg-gray-900 {
  background-color: var(--gray-900);
}

.bg-gray-800 {
  background-color: var(--gray-800);
}

.bg-gray-700 {
  background-color: var(--gray-700);
}

/* Utility Classes */
.d-inline-block {
  display: inline-block;
}

.d-block {
  display: block;
}

.w-100 {
  width: 100%;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

/* Footer Styles */
footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--gray-800);
}

/* Hover Effects */
.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease-in-out;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.15s ease-in-out;
}

/* Print Styles */
@media print {
  body {
    background-color: white !important;
    color: black !important;
  }
  
  .card {
    border: 1px solid #000;
    background-color: white !important;
  }
  
  .table {
    color: black !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles for Accessibility */
.btn:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #fff;
    --text-muted: #ccc;
  }
}
