/**
 * Main Stylesheet - RedM Brasil
 * Importa todos os módulos CSS
 */

/* Base */
@import 'base/variables.css';
@import 'base/reset.css';

/* Components */
@import 'components/header.css';
@import 'components/buttons.css';
@import 'components/cards.css';
@import 'components/forms.css';

/* Layout */
@import 'layout/hero.css';
@import 'layout/sections.css';

/* Additional Components */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-item {
  display: grid;
  grid-template-columns: 50px 1fr 120px 100px 120px;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.server-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
}

.server-status {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.server-status.online {
  background: #dcfce7;
  color: #16a34a;
  border: 2px solid #16a34a;
}

.server-status.offline {
  background: #fee2e2;
  color: #dc2626;
  border: 2px solid #dc2626;
}

.server-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.server-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.server-players .count {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.server-players .label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.server-game {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.partner-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
}

.partner-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

.partner-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.partner-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.partner-card p {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* Terms */
.terms-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
}

.terms-content h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
  color: var(--text);
}

.terms-content p,
.terms-content ul {
  color: var(--gray-600);
  margin-bottom: 14px;
}

.terms-content ul {
  padding-left: 24px;
}

.terms-content ul li {
  margin-bottom: 8px;
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* News Detail */
.news-detail {
  max-width: 800px;
  margin: 0 auto;
}

.news-detail-header {
  margin-bottom: 30px;
}

.news-detail-header .card-tag {
  margin-bottom: 16px;
}

.news-detail-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.news-detail-meta {
  display: flex;
  gap: 20px;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.news-detail-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.news-detail-content p {
  color: var(--gray-600);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.8;
}

/* Loading */
.server-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.server-loading p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.license-terms {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 45vh;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-700);
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.terms-accept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.terms-accept input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.terms-accept label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#downloadBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Notification */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.3s;
  box-shadow: var(--shadow-lg);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #16a34a;
}

.notification.error {
  border-left: 4px solid #dc2626;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optimization Pages */
.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: -40px auto 48px;
  max-width: 800px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.toc h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.toc-grid a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.toc-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.toc-grid a .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.opt-section {
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.opt-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
  padding-left: 20px;
}

.opt-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 80%;
  background: var(--accent);
  border-radius: 3px;
}

.opt-section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.opt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
}

.opt-card:hover {
  box-shadow: var(--shadow-md);
}

.opt-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.opt-card h3 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(201,162,39,0.1);
  color: var(--accent);
  border-radius: 10px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.opt-card p,
.opt-card li {
  color: var(--gray-600);
  line-height: 1.8;
}

.opt-card ul,
.opt-card ol {
  padding-left: 24px;
  margin: 12px 0;
}

.opt-card li {
  margin-bottom: 8px;
}

.opt-card code {
  background: var(--gray-100);
  color: var(--accent-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.opt-card strong {
  color: var(--text);
  font-weight: 700;
}

.opt-tip {
  background: rgba(201,162,39,0.1);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.opt-tip .tip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.opt-tip p {
  color: var(--gray-700);
  margin: 0;
  line-height: 1.7;
}

.opt-warning {
  background: rgba(139,26,26,0.1);
  border: 1px solid rgba(139,26,26,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.opt-warning .warn-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.opt-warning p {
  color: var(--red);
  margin: 0;
  line-height: 1.7;
}

.opt-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--gray-100);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 12px;
}

.opt-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.opt-step-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.opt-step-content p {
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.config-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.config-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.config-card .config-icon {
  width: 56px;
  height: 56px;
  background: rgba(201,162,39,0.1);
  color: var(--accent);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.config-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.config-card .config-subtitle {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.config-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.config-card ul li {
  font-size: 0.9rem;
  color: var(--gray-600);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
}

.config-card ul li:last-child {
  border-bottom: none;
}

.config-card ul li span {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 1024px) {
  .server-item {
    grid-template-columns: 50px 1fr 100px;
  }
  
  .server-game {
    display: none;
  }
}

@media (max-width: 768px) {
  .server-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .server-status {
    margin: 0 auto;
  }
  
  .terms-content {
    padding: 24px;
  }
  
  .opt-section {
    padding: 0 16px;
  }
  
  .opt-section-title {
    font-size: 2rem;
  }
  
  .opt-card {
    padding: 24px;
  }
  
  .config-grid {
    grid-template-columns: 1fr;
  }
  
  .toc {
    margin: -30px 16px 40px;
    padding: 24px;
  }
  
  .toc-grid {
    grid-template-columns: 1fr;
  }
  
  .page-header h1 {
    font-size: 2.8rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
}

/* Responsive - About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  border: 1px solid var(--border);
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
}

.about-feature-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.about-feature-text {
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
}
