:root {
  --primary-red: #d32f2f;
  --primary-blue: #0d47a1;
  --accent-yellow: #ffeb3b;
  --dark-gray: #212121;
  --light-gray: #f4f4f4;

  --bg-color: #6b86a8;
  --bg-top: #7c96b6;
  --bg-mid: #5f789a;
  --bg-bottom: #3e556f;
  --text-color: #212121;
  --card-bg: #ffffff;
  --header-bg: transparent;
  --nav-color: #0d47a1;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --bg-top: #2d3d52;
  --bg-mid: #1f2b3b;
  --bg-bottom: #141c26;
  --text-color: #e0e0e0;
  --card-bg: #2d2d2d;
  --header-bg: transparent;
  --nav-color: #64b5f6;
  --primary-red: #ef5350;
  --primary-blue: #42a5f5;
  --accent-yellow: #ffee58;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  background-image: linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom));
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  background-color: var(--header-bg);
  text-align: center;
  padding: 20px 0;
  border-bottom: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.logo-placeholder {
  display: block;
  max-width: 800px;
  width: 100%;
  height: auto;
  margin: 0 auto -25px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  letter-spacing: 0.5px;
  background: var(--primary-blue);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  width: max-content;
  margin: -100px auto 0;
}

nav a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  text-transform: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-yellow);
}

nav a.current-page {
  background-color: var(--accent-yellow);
  color: var(--dark-gray);
  padding: 4px 8px;
  border-radius: 4px;
}

.nav-dot {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.contact-info {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 16px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.toggle-switch:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 3px;
}

[data-theme="dark"] .toggle-switch {
  background-color: var(--primary-blue);
}

[data-theme="dark"] .toggle-switch::before {
  transform: translateX(30px);
}

.theme-label {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

.info-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 18px 20px;
  flex-wrap: wrap;
}

.show-card {
  width: min(100%, 320px);
  flex: 1;
  max-width: 340px;
  min-width: 280px;
  background: #dfe4ea;
  border: 2px solid #111111;
  border-radius: 6px;
  box-shadow: 0 2px 0 #111111;
  overflow: hidden;
}

.show-card h3 {
  margin: 0;
  padding: 8px 14px;
  text-align: center;
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  background: linear-gradient(180deg, #d52727, #8f0f0f);
  border-bottom: 2px solid #111111;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.show-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.show-list li {
  padding: 9px 18px;
  color: #101010;
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  border-top: 1px solid #b8bfc7;
}

.show-list li:nth-child(odd) {
  background: #f0f3f6;
}

.show-list li:nth-child(even) {
  background: #d5dbe2;
}

#top10-comics-list li,
#top10-cards-list li {
  font-size: 1.1rem;
  line-height: 1.25;
}

#top10-comics-list li:nth-child(odd),
#top10-cards-list li:nth-child(odd) {
  background: #f5f8ff;
}

#top10-comics-list li:nth-child(even),
#top10-cards-list li:nth-child(even) {
  background: var(--primary-blue);
  color: #ffffff;
}

.main-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.intro-box {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  border-left: 10px solid var(--primary-blue);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.cta-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cta-box {
  background: var(--primary-red);
  color: #ffffff;
  padding: 40px 20px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
  border: 3px solid #9a1a1a;
  text-transform: uppercase;
}

.cta-box:visited {
  color: #ffffff;
}

.cta-box:focus {
  outline: 3px solid var(--accent-yellow);
  outline-offset: 2px;
}

.cta-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta-title {
  display: block;
  line-height: 1.05;
}

.cta-card-image {
  display: block;
  width: min(88%, 270px);
  height: auto;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: #ffffff;
  image-rendering: optimizeQuality;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.cta-box:hover {
  transform: scale(1.02);
  background: var(--primary-blue);
}

.cta-secondary {
  background: var(--primary-blue);
  border-color: #08306b;
}

footer {
  text-align: center;
  padding: 40px;
  background: var(--dark-gray);
  color: #888888;
  margin-top: 50px;
}

.footer-facebook-link {
  color: #1877f2;
  font-weight: 700;
}

.footer-facebook-link:hover {
  color: #5aa2ff;
}

/* Modal Dialog Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
  background: var(--primary-blue);
  color: white;
  border-radius: 12px 12px 0 0;
}

[data-theme="dark"] .modal-header {
  border-bottom: 1px solid #444444;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-form {
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  border-color: #555555;
  background: #333333;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cancel {
  background: #f5f5f5;
  color: #666666;
  border: 2px solid #ddd;
}

[data-theme="dark"] .btn-cancel {
  background: #444444;
  color: #cccccc;
  border-color: #666666;
}

.btn-cancel:hover {
  background: #e0e0e0;
  border-color: #bbb;
}

[data-theme="dark"] .btn-cancel:hover {
  background: #555555;
  border-color: #777777;
}

.btn-submit {
  background: var(--primary-red);
  color: white;
  border: 2px solid #9a1a1a;
}

.btn-submit:hover {
  background: var(--primary-blue);
  border-color: #08306b;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .show-list li {
    font-size: 1.6rem;
  }

  #top10-comics-list li,
  #top10-cards-list li {
    font-size: 1rem;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .modal-form {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    padding: 15px 20px;
  }
}

/* Contact Page Styles */
.intro-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-color);
}

.contact-section {
  margin: 40px 0;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .contact-section {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.contact-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--primary-blue);
  font-weight: 600;
}

.contact-item p {
  margin: 0;
}

.contact-item a {
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.info-section {
  margin: 35px 0;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

[data-theme="dark"] .info-section {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.info-section h2 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  color: var(--primary-blue);
}

.info-section p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .contact-section {
    margin: 25px 0;
    padding: 20px;
  }
  
  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-item {
    padding: 20px;
  }
  
  .info-section {
    margin: 25px 0;
    padding-bottom: 20px;
  }
}
