/* General Styles */
body {
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  line-height: 1.6;
}

/* CSS Variables for Themes */
:root {
  --bg-color: #ffffff;
  --text-color: #2c3e50;
  --accent-color: #f1c40f;
  --border-color: #ecf0f1;
}

body.dark-mode {
  --bg-color: #1a252f;
  --text-color: #ecf0f1;
  --accent-color: #f1c40f;
  --border-color: #34495e;
}

/* Header Styles */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  background-color: #2c3e50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.dark-mode-container {
  position: absolute;
  top: 20px;
  left: 20px;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--accent-color);
  transition: color 0.3s;
}

.dark-mode-toggle:hover {
  color: #c39c0b;
}

.mode-text {
  font-size: 16px;
  margin-left: 8px;
  color: var(--accent-color);
}

.light-text {
  display: none;
}

body.dark-mode .moon,
body.dark-mode .mode-text {
  display: none;
}

body.dark-mode .sun,
body.dark-mode .light-text {
  display: inline;
}

.header-content {
  display: flex;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.logo {
  width: 120px;
  height: auto;
  margin-right: 20px;
}

body.dark-mode .logo {
  filter: none;
}

.site-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/* Price Tracker Section */
.price-tracker-section {
  padding: 40px 20px;
  background: var(--bg-color);
}

.price-tracker {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.price-tracker label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
  display: block;
}

.price-tracker input[type="number"] {
  width: 150px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.3s;
}

.price-tracker input[type="number"]:focus {
  border-color: var(--accent-color);
  outline: none;
}

.output {
  margin-top: 20px;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  color: var(--text-color);
}

.output input[type="number"] {
  width: 150px;
}

.currency-selector {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

#currency-search {
  padding: 10px;
  width: 200px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.3s;
}

#currency-search:focus {
  border-color: var(--accent-color);
  outline: none;
}

.controls button {
  background: none;
  border: 2px solid var(--border-color);
  cursor: pointer;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--text-color);
  transition: background-color 0.3s;
}

.controls button:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* Chart Section */
.chart-section {
  padding: 40px 20px;
  background: var(--bg-color);
}

.chart-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Content Section */
.content-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.content-section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--accent-color);
  font-weight: 700;
}

.content-section p {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--text-color);
}

/* News Section */
.news-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
  text-align: center;
}

.news-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.news-item {
  display: inline-flex;
  align-items: center;
  margin-right: 30px;
  animation: pan 30s linear infinite; /* Continuous right-to-left panning */
}

.news-image {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 5px 0 0 5px;
  border: 2px solid var(--border-color);
}

.news-box {
  background: var(--bg-color);
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-left: none;
  border-radius: 0 5px 5px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-text {
  font-size: 18px; /* Increased from 16px for bigger text */
  color: var(--text-color);
  white-space: nowrap;
}

@keyframes pan {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Donation Section */
.donation-section {
  padding: 40px 20px;
  background: var(--bg-color);
}

.donation {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.donate-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.qr-code {
  width: 120px;
  height: 120px;
  margin: 15px auto;
  display: block;
  cursor: pointer;
  border: 3px solid var(--accent-color);
  border-radius: 10px;
  transition: transform 0.3s;
}

.qr-code:hover {
  transform: scale(1.1);
}

.address {
  font-size: 16px;
  word-wrap: break-word;
  color: var(--text-color);
  margin-top: 15px;
}

/* Advertisement Styles */
.advertisement {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* QR Modal Styles */
#qr-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s;
}

.qr-modal-content {
  margin: 10% auto;
  text-align: center;
  width: 80%;
  max-width: 400px;
  background: var(--bg-color);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  color: var(--text-color);
  animation: fadeIn 0.3s;
}

.enlarged-qr {
  width: 350px;
  height: 350px;
  border: 3px solid var(--accent-color);
  border-radius: 10px;
  display: block;
  margin: 0 auto 20px;
}

.qr-close {
  color: var(--bg-color);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: var(--accent-color);
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.3s;
}

.qr-close:hover,
.qr-close:focus {
  background: #c39c0b;
  color: var(--bg-color);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer Styles */
.footer {
  text-align: center;
  padding: 20px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 600px) {
  header {
    padding: 15px 20px;
  }
  .dark-mode-container {
    top: 15px;
    left: 15px;
  }
  .logo {
    width: 90px;
  }
  .site-title {
    font-size: 28px;
  }
  .price-tracker input[type="number"],
  .output input[type="number"] {
    width: 100%;
  }
  .currency-selector {
    flex-direction: column;
    gap: 10px;
  }
  #currency-search {
    width: 100%;
  }
  .chart-container, .content-section, .news-section, .donation {
    padding: 15px;
  }
  .news-image {
    width: 90px;
    height: 70px;
  }
  .news-box {
    padding: 8px 12px;
  }
  .news-text {
    font-size: 16px; /* Slightly reduced for mobile readability */
  }
  .qr-code {
    width: 100px;
    height: 100px;
  }
  .donate-title {
    font-size: 24px;
  }
  .enlarged-qr {
    width: 300px;
    height: 300px;
  }
  .qr-modal-content {
    max-width: 320px;
  }
}
