/* Enhanced Download Page Styles */
.download-section {
  padding: 20px 0;
}

/* Unified Comic Title Styling */
.comic-ranking-header {
  position: relative;
  margin: 0 auto 25px;
  text-align: center;
}

.manga-splash-title {
  background-color: #ff6700;
  border: 4px solid #000;
  border-radius: 8px;
  padding: 12px 20px;
  display: inline-block;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 1;
  transform: rotate(-1deg);
  margin: 0 auto;
  max-width: 90%;
}

.splash-text {
  color: white;
  font-family: "Bangers", cursive, var(--heading-font);
  font-size: 2.2rem;
  margin: 0;
  text-shadow: 2px 2px 0 #000;
  -webkit-text-stroke: 1px black;
  letter-spacing: 1px;
}

.splash-subtitle {
  color: white;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 3px;
  text-shadow: 1px 1px 0 #000;
}

/* New intro text style */
.download-intro {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin: -5px auto 25px;
  color: #333;
  max-width: 90%;
  font-family: var(--body-font);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 15px;
  border-radius: 8px;
  border: 2px dashed var(--manga-border-color);
}

.download-intro i {
  color: #ff6700;
  margin-right: 6px;
}

/* Enhanced Platform Cards */
.platforms-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.platform-card {
  position: relative;
  background-color: #fff;
  border: 3px solid var(--manga-border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform-origin: center;
  animation: cardFadeIn 0.7s ease forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.platform-card:nth-child(1) {
  animation-delay: 0.1s;
}

.platform-card:nth-child(2) {
  animation-delay: 0.2s;
}

.platform-card:nth-child(3) {
  animation-delay: 0.3s;
}

.platform-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.platform-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 1;
}

.platform-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, white);
}

.platform-header {
  display: flex;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.platform-icon {
  width: 60px;
  height: 60px;
  background-color: var(--dragonballschoolonline-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 2rem;
  border: 3px solid var(--manga-border-color);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.platform-card:hover .platform-icon {
  transform: rotate(15deg) scale(1.1);
}

.platform-card:nth-child(1) .platform-icon {
  background-color: #3ddc84;
  /* Android green */
}

.platform-card:nth-child(2) .platform-icon {
  background-color: #007aff;
  /* iOS blue */
}

.platform-card:nth-child(3) .platform-icon {
  background-color: #0078d7;
  /* Windows blue */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-card:nth-child(4) .platform-icon {
  background-color: #ff9500;
  /* Java orange */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fix for the PC icon to ensure proper display */
.platform-icon .fa-desktop {
  font-size: 1.8rem;
  /* Slightly reduced from 2rem to better fit the circle */
  position: relative;
  top: -1px;
  /* Adjust vertical alignment */
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.platform-header h3 {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  margin: 0;
  color: var(--dragonballschoolonline-orange);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
}

.platform-desc {
  padding: 0 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  font-size: 1rem;
  color: #666;
}

/* Enhanced Download Buttons */
.download-buttons {
  padding: 0 20px 20px;
  z-index: 2;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 220px;
  overflow: hidden;
  transition: max-height 0.5s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--dragonballschoolonline-orange) #f0f0f0;
}

.download-buttons.expanded {
  max-height: 600px;
  overflow-y: auto;
}

.download-buttons::-webkit-scrollbar {
  width: 8px;
}

.download-buttons::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.download-buttons::-webkit-scrollbar-thumb {
  background-color: var(--dragonballschoolonline-orange);
  border-radius: 10px;
  border: 2px solid #f0f0f0;
}

.show-more-downloads {
  text-align: center;
  padding: 8px 0;
  margin-top: 10px;
  margin-bottom: 10px;
  color: var(--dragonballschoolonline-orange);
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.8);
  border: 2px dashed var(--manga-border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: calc(100% - 40px);
  margin-left: 20px;
  position: relative;
  z-index: 3;
}

.show-more-downloads:hover {
  background-color: rgba(255, 103, 0, 0.1);
  transform: translateY(-2px);
}

.show-more-downloads i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.show-more-downloads.active i {
  transform: rotate(180deg);
}

.download-buttons-wrapper {
  position: relative;
}

.download-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 1)
  );
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.download-buttons.expanded + .download-fade {
  opacity: 0;
}

.multi-version-indicator {
  text-align: center;
  padding: 5px 0;
  font-size: 0.8rem;
  color: #666;
  position: sticky;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.8)
  );
  border-top: 1px dashed #ddd;
  margin-top: 5px;
}

.download-item {
  background-color: rgba(245, 245, 245, 0.8);
  border: 2px solid var(--manga-border-color);
  border-radius: 10px;
  padding: 15px;
  position: relative;
  transition: all 0.3s ease;
}

.download-item:hover {
  background-color: rgba(255, 250, 240, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.download-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.download-version {
  font-weight: bold;
  color: #555;
}

.version-tag {
  color: #888;
  font-weight: normal;
  margin-right: 5px;
}

.version-number {
  font-family: monospace;
  background-color: #f1f1f1;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
}

.download-size {
  display: inline-block;
  background-color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.download-description {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.download-btn {
  width: 100%;
  text-align: center;
  background-color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  color: white;
  border: 2px solid var(--manga-border-color, #333);
  border-radius: 8px;
  padding: 12px;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-block;
}

.download-btn:hover {
  background-color: var(
    --dragonballschoolonline-orange-hover,
    #ff8c00
  ); /* Added fallback hover color */
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.download-effect {
  position: absolute;
  top: -50%;
  left: -100%;
  width: 300%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: all 0.6s ease;
}

.download-btn:hover .download-effect {
  left: 100%;
}

.download-btn i {
  margin-right: 8px;
  font-size: 1.1rem;
}

.no-download {
  background-color: rgba(245, 245, 245, 0.8);
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.no-download p {
  margin-bottom: 15px;
  color: #777;
  font-style: italic;
}

.notify-btn {
  background-color: #4caf50;
  display: inline-block;
}

/* Enhanced System Requirements */
.system-requirements {
  margin: 40px 0;
}

.requirements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.requirement-group {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid var(--manga-border-color);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.requirement-group:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
}

.req-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  border: 3px solid var(--manga-border-color);
}

.req-icon.android {
  background-color: #3ddc84;
}

.req-icon.ios {
  background-color: #007aff;
}

.req-icon.pc {
  background-color: #0078d7;
}

.req-icon.java {
  background-color: #ff9500;
}

.requirement-group h3 {
  margin-bottom: 15px;
  color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  font-size: 1.4rem;
  font-family: var(--heading-font);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.req-list {
  list-style-type: none;
  padding: 0;
  text-align: left;
}

.req-list li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.req-list li:last-child {
  border-bottom: none;
}

.req-label {
  font-weight: bold;
  color: #555;
}

/* Enhanced Info Note */
.dragonball-note {
  background-color: #fff9c4;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 20px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.dragonball-note::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    transparent 50%,
    rgba(255, 193, 7, 0.5) 50%
  );
  transform-origin: 0 100%;
  transform: rotate(-90deg);
  z-index: 1;
}

.dragonball-note-icon {
  font-size: 2rem;
  color: #ff6d00;
  flex-shrink: 0;
}

.dragonball-note-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #ff6d00;
  font-family: var(--heading-font);
}

.dragonball-note-content p {
  margin: 0;
  color: #333;
}

/* Enhanced Installation Guide */
.download-guide {
  margin-top: 40px;
}

.guide-tabs {
  margin-top: 20px;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-button {
  padding: 12px 25px;
  background-color: transparent;
  border: 2px solid var(--manga-border-color, #333);
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-color, #333);
}

.tab-button.active {
  background-color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  color: white;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.tab-button:hover:not(.active) {
  background-color: rgba(255, 103, 0, 0.1);
  transform: translateY(-2px);
}

.tab-button i {
  font-size: 1.3rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

/* Enhanced Step Items */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.step-item {
  display: flex;
  background-color: white;
  border: 2px solid var(--manga-border-color);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  gap: 20px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.step-number {
  width: 40px;
  height: 40px;
  background-color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid var(--manga-border-color, #333);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  font-family: var(--heading-font);
  font-size: 1.3rem;
}

.step-content p {
  margin-bottom: 15px;
  color: #444;
}

.step-image {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.step-item:hover .step-image {
  transform: scale(1.02);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
}

.step-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Enhanced FAQ Section */
.faq-container {
  margin: 30px 0;
}

.faq-item {
  margin-bottom: 15px;
  border: 2px solid var(--manga-border-color);
  border-radius: 10px;
  overflow: hidden;
  background-color: white;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
}

.faq-question {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.9);
  position: relative;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: rgba(255, 103, 0, 0.1);
}

.faq-question i:first-child {
  margin-right: 10px;
  color: var(
    --dragonballschoolonline-orange,
    #ff6700
  ); /* Added fallback color */
  font-size: 1.3rem;
}

.faq-question i:last-child {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.faq-question.active i:last-child {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
  border-top: 0 solid #eee;
}

.faq-answer p {
  padding: 15px 20px;
  margin: 0;
}

.faq-item.active .faq-answer {
  padding: 10px;
  height: auto;
  border-top: 1px solid #eee;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  .platforms-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .platforms-container {
    grid-template-columns: 1fr;
  }

  .step-item {
    flex-direction: column;
    padding: 15px;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .tab-button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .tab-button i {
    font-size: 1.1rem;
  }

  .dragonball-note {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
  }

  .platform-header h3 {
    font-size: 1.5rem;
  }

  .req-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .download-buttons {
    max-height: 250px;
  }

  .tab-buttons {
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-around;
  }

  .tab-button {
    padding: 10px 15px;
    font-size: 0.9rem;
    flex: 0 1 auto;
    min-width: 100px;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .download-section {
    padding: 10px 0;
  }

  .comic-ranking-header {
    margin: 0 auto 15px;
  }

  .manga-splash-title {
    padding: 8px 12px;
    border-width: 3px;
    transform: rotate(0deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
  }

  .splash-text {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
  }

  .splash-subtitle {
    font-size: 0.85rem;
    margin-top: 2px;
  }

  .download-intro {
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 8px 10px;
  }

  /* Better spacing for mobile */
  .platform-card {
    margin-bottom: 15px;
  }

  .tab-buttons {
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tab-button {
    flex: 0 1 calc(50% - 8px); /* Make buttons take roughly half width minus gap */
    min-width: 0;
    justify-content: center;
    padding: 8px;
    margin-bottom: 8px;
  }

  /* Make tab buttons more compact on small screens */
  .tab-button {
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .tab-button i {
    font-size: 1.2rem;
    margin-right: 5px;
  }

  /* Make requirement groups more compact */
  .requirement-group {
    padding: 15px 10px;
  }

  .req-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .requirement-group h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  /* Make FAQ more compact */
  .faq-question {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .faq-answer p {
    padding: 12px 15px;
    font-size: 0.85rem;
  }

  .faq-question i:first-child {
    font-size: 1.1rem;
  }
}

/* Fix for very small screens */
@media (max-width: 375px) {
  .platform-icon {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  .platform-header h3 {
    font-size: 1.3rem;
  }

  .download-intro {
    font-size: 0.85rem;
    padding: 6px 8px;
  }

  .step-content h4 {
    font-size: 1.1rem;
  }

  .step-content p {
    font-size: 0.85rem;
  }

  .download-size {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .faq-item {
    margin-bottom: 10px;
  }

  .tab-button {
    flex: 0 1 100%; /* Full width on very small screens */
    margin-bottom: 5px;
  }
}
