/* ========================================
   RESET & CORE LAYOUT
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: 40px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0c10;
  color: #f5f5f5;
  line-height: 1.45;
}

a {
  color: inherit;
}

.hidden {
  display: none;
}

:root {
  --neon: #00b7ff;
  --neon-strong: #00a3e6;
  --bg: #0f1113;
  --card-bg: #0b0d0f;
  --muted: #9aa6b2;
  --blog-primary: #007bff;
  --blog-heading: #777777;
  --blog-body-text: #ffffff;
  --blog-soft-bg: #f8f9fa;
  --blog-soft-text: darkslategrey;
}

h1, h2 {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 183, 255, 0.06);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #111;
  border-bottom: 1px solid #222;
}

.nav a {
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 0.7;
}

.nav-link {
  position: relative;
}

.nav-link.active {
  color: #00b7ff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #00b7ff;
  border-radius: 1px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
}

.main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 24px;
  max-width: 1300px;
  margin: 0 auto;
}

.builder h1 {
  margin-top: 0;
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.component-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #aaa;
}

.component-group select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #0f1117;
  color: #f5f5f5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.component-group select:hover {
  border-color: #444;
  box-shadow: 0 0 8px rgba(0, 183, 255, 0.15);
}

.component-group select:focus {
  outline: none;
  border-color: #00b7ff;
  box-shadow: 0 0 12px rgba(0, 183, 255, 0.25);
}

.presets-section {
  margin-top: 16px;
}

.presets {
  display: grid;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.preset-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #15171f;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 0.85rem;
}

.preset-btn:hover {
  background: #1f2230;
}
.preset-card {
  background: #15171f;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preset-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.preset-info {
  padding: 12px;
}

.preset-price {
  font-weight: 700;
  margin: 8px 0;
}

.preset-select-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: #4caf50;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.preset-select-btn:hover {
  background: #43a047;
}

.summary-panel {
  background: #15171f;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #222;
  position: sticky;
  top: 16px;
  height: fit-content;
  margin-top: 115px;
}

.summary-list {
  margin-bottom: 12px;
}

.summary-item {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
}

.price-validity-note {
  margin: 12px 0;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: #d8efff;
  border: 1px solid rgba(0, 183, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 183, 255, 0.08);
}

.summary-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #222;
  gap: 10px;
}

.summary-label {
  font-weight: 600;
  color: #ccc;
  font-size: 0.85rem;
}

.summary-value {
  font-size: 0.9rem;
  color: #eee;
}

.summary-missing {
  color: #666;
  font-style: italic;
}

.summary-block {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #222;
}

.summary-header {
  font-weight: 700;
  color: #ccc;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-name {
  font-size: 0.9rem;
  color: #eee;
  max-width: 70%;
}

.summary-price {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  text-align: right;
  min-width: 60px;
}

.summary-suggestions {
  margin-top: 20px;
  padding: 12px;
  background: #1a1c24;
  border-radius: 8px;
  border: 1px solid #333;
}

.summary-suggestions h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #ccc;
}

.summary-suggestions ul {
  margin: 0;
  padding-left: 18px;
}

.summary-suggestions li {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #bbb;
}

.builder-notice {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 112, 67, 0.45);
  background: rgba(255, 112, 67, 0.14);
  color: #ffd4c7;
  border-radius: 10px;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 16px;
  border-bottom: 1px solid #333;
  padding-bottom: 12px;
}

.section-subtitle {
  color: #93a9bd;
  font-size: 0.9rem;
}

.compatibility-hint {
  margin-top: 8px;
  min-height: 18px;
  color: #93a9bd;
  font-size: 0.78rem;
  position: relative;
}

.compatibility-hint.has-tooltip {
  color: #f7c97a;
  cursor: help;
  text-decoration: underline dotted;
}

.compatibility-hint.has-tooltip:hover::after {
  content: attr(data-tooltip);
  white-space: pre-line;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(320px, 90vw);
  padding: 10px 12px;
  background: #0d141d;
  border: 1px solid rgba(0, 183, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  color: #e8f4ff;
}

.component-group select option:disabled {
  color: #667789;
}

.addons-section {
  margin-top: 24px;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.addon-card {
  position: relative;
  display: block;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 183, 255, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.addon-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 183, 255, 0.45);
  box-shadow: 0 14px 30px rgba(0, 183, 255, 0.08);
}

.addon-card input {
  position: absolute;
  top: 14px;
  right: 14px;
}

.addon-card.selected {
  border-color: #00b7ff;
  box-shadow: 0 0 0 1px rgba(0, 183, 255, 0.4), 0 12px 28px rgba(0, 183, 255, 0.12);
}

.addon-card.incompatible {
  opacity: 0.6;
  border-color: rgba(255, 89, 89, 0.35);
}

.addon-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-right: 28px;
}

.addon-name {
  font-weight: 700;
  color: #f2f8ff;
}

.addon-price {
  font-weight: 700;
  color: #98efff;
}

.addon-card p {
  margin: 10px 0 0;
  color: #a6b9ca;
  font-size: 0.9rem;
}

.addon-status {
  display: inline-block;
  margin-top: 12px;
  color: #93a9bd;
  font-size: 0.8rem;
}

.checkout-btn,
.btn,
.submit-btn {
  padding: 12px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.checkout-btn {
  width: 100%;
  margin-top: 12px;
  font-size: 1rem;
}

.btn {
  padding: 8px 14px;
  margin-top: 12px;
}

.submit-btn {
  width: 100%;
}

.checkout-btn:hover,
.btn:hover,
.submit-btn:hover {
  background: #43a047;
}

.submit-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 14px;
  background: #2a3d4a;
  color: #e6eef6;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-secondary:hover {
  background: #3a4d5a;
  border-color: #00b7ff;
  box-shadow: 0 0 8px rgba(0, 183, 255, 0.2);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.page {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 24px;
}

/* ========================================
   MODALS & OVERLAYS
   ======================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #15171f;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #333;
  max-width: 400px;
  width: 100%;
}

.modal-content h3 {
  margin-top: 0;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-overlay.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #444;
  border-top-color: #4caf50;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 900px) {
  .main {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }
}

/* ========================================
   CHECKOUT PAGE
   ======================================== */

.checkout-container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 24px;
}

.checkout-section {
  background: #15171f;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #222;
  margin-bottom: 24px;
}

.checkout-section h2 {
  margin-top: 0;
}

.checkout-section label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.checkout-section input,
.checkout-section textarea,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #0f1117;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-section input:focus,
.checkout-section textarea:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00b7ff;
  box-shadow: 0 0 8px rgba(0, 183, 255, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.checkout-section textarea {
  margin-top: 6px;
}

.error-message {
  color: #ff6b6b;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
/* ========================================
   BUILDER PAGE SPECIFIC
   ======================================== */

.component-group, .summary-block, .preset-card, .component-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(0,183,255,0.08);
  box-shadow: 0 0 16px rgba(0, 183, 255, 0.04), 0 6px 18px rgba(0, 0, 0, 0.6);
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.component-group:hover, 
.summary-block:hover, 
.preset-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 183, 255, 0.12);
  border: 1px solid var(--neon);
}

.component-group.incompatible, 
.summary-block.incompatible {
  border: 1px solid #ff4444 !important;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.3), inset 0 0 10px rgba(255, 68, 68, 0.1) !important;
}

.component-group.incompatible select {
  border-color: #ff4444;
}

.summary-header {
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.6px;
}

/* PayPal container highlight */
#paypal-button-container {
  border: 2px dashed rgba(0,183,255,0.12);
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0,183,255,0.02), transparent);
}

/* Build summary styles */
.build-summary {
  margin-bottom: 20px;
}

.build-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.item-name {
  flex: 1;
  margin-right: 16px;
}

.item-price {
  font-weight: 600;
  color: #e6f9ff;
  text-align: right;
  min-width: 60px;
}

.build-total {
  border-top: 2px solid #333;
  padding-top: 16px;
  margin-top: 16px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
}

.total-row.total-final {
  font-weight: 700;
  font-size: 1.1rem;
  color: #e6f9ff;
  border-top: 1px solid #333;
  padding-top: 12px;
  margin-top: 8px;
}

/* Small helper */
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-weight: 700;
  color: #e6f9ff;
}

/* ========================================
   BLOG & ARTICLE STYLES
   ======================================== */

.blog-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-header {
  text-align: center;
  margin-bottom: 50px;
}

.blog-header h1 {
  font-size: 36px;
  margin: 20px 0;
  color: var(--blog-heading);
}

.blog-header p {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.blog-list {
  display: grid;
  gap: 30px;
}

.blog-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.blog-card h2 {
  font-size: 24px;
  color: var(--blog-primary);
  margin: 0 0 10px 0;
}

.blog-card .blog-meta {
  margin-bottom: 12px;
}

.blog-card .blog-excerpt {
  color: var(--blog-body-text);
  line-height: 1.6;
  margin-bottom: 15px;
}

.blog-card a {
  color: var(--blog-primary);
  text-decoration: none;
  font-weight: 600;
}

.blog-card a:hover {
  text-decoration: underline;
}

.blog-article {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-article h1 {
  font-size: 36px;
  color: var(--blog-heading);
  margin: 30px 0 10px 0;
}

.blog-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 30px;
}

.blog-article h2 {
  font-size: 24px;
  color: var(--blog-primary);
  margin: 40px 0 20px 0;
  border-bottom: 2px solid var(--blog-primary);
  padding-bottom: 10px;
}

.blog-article h3 {
  font-size: 18px;
  color: #d3ddea;
  margin: 25px 0 12px 0;
}

.blog-article p {
  line-height: 1.8;
  color: var(--blog-body-text);
  margin: 15px 0;
}

.blog-article ul,
.blog-article ol {
  margin: 15px 0 15px 25px;
  color: var(--blog-body-text);
  line-height: 1.8;
}

.blog-article li {
  margin: 8px 0;
}

.blog-article strong {
  color: var(--blog-primary);
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--blog-primary);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 40px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: #00b7ff;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.tip-box {
  background: var(--blog-soft-bg);
  border-left: 4px solid var(--blog-primary);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  color: var(--blog-soft-text);
}

.tip-box strong {
  color: #1a1a1a;
}

.compat-list {
  background: var(--blog-soft-bg);
  padding: 15px 25px;
  border-radius: 4px;
  margin: 15px 0;
  color: var(--blog-soft-text);
}

.compat-list strong {
  color: #1a1a1a;
}

.comparison-table {
  margin: 25px 0;
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.comparison-table th {
  background: #eef4fb;
  font-weight: 600;
  color: var(--blog-primary);
}

.comparison-table td {
  color: #1f2f40;
  background: #ffffff;
}

.comparison-table tr:nth-child(even) td {
  background: var(--blog-soft-bg);
}

/* ========================================
   FAQ & CONTENT PAGES
   ======================================== */

/* FAQ shared styles */

.faq-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.faq-section {
  margin-bottom: 50px;
}

.faq-section h2 {
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 25px;
  color: var(--blog-heading);
  border-bottom: 2px solid var(--blog-primary);
  padding-bottom: 10px;
}

.faq-item {
  margin-bottom: 30px;
}

.faq-item h3 {
  font-size: 18px;
  color: var(--blog-primary);
  margin-bottom: 10px;
  margin-top: 0;
}

.faq-item p {
  margin: 10px 0;
  line-height: 1.6;
  color: var(--blog-body-text);
}

.faq-item ul {
  margin: 10px 0;
  padding-left: 25px;
}

.faq-item li {
  margin: 8px 0;
  line-height: 1.6;
}

.cta-section {
  background: var(--blog-soft-bg);
  color: var(--blog-soft-text);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
}

.cta-section p {
  color: var(--blog-soft-text);
}

.cta-section a {
  color: var(--blog-primary);
  text-decoration: none;
  font-weight: 600;
}

.cta-section a:hover {
  text-decoration: underline;
}

/* ========================================
   CONTACT FORM & FOOTER
   ======================================== */

/* Contact Form */

.contact-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 24px;
}

.contact-form {
  background: #15171f;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #222;
}

/* ========================================
   FORM INPUTS & CONTROLS
   ======================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #ccc;
}

.form-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  display: none;
}

.form-message.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  display: block;
}

.form-message.error {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  display: block;
}
