/* ===== RESET & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-dark: #0a0c10;
  --bg-card: #12161f;
  --bg-card-hover: #1a202c;
  --neon-blue: #00c8ff;
  --neon-blue-glow: rgba(0, 200, 255, 0.6);
  --neon-accent: #3a86ff;
  --text-light: #eef4ff;
  --text-dim: #a0b3d0;
  --border-glow: rgba(0, 200, 255, 0.3);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 200, 255, 0.15);
  --radius-card: 20px;
  --radius-sm: 12px;
  --transition: all 0.25s ease;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 20% 10%, #0e121c, #040608);
  color: var(--text-light);
  min-height: 100vh;
  padding: 1.5rem 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

.app-container {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

/* ===== HEADER ===== */
.main-header { text-align: center; margin-bottom: 2rem; }

.logo-area {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}

.neon-icon {
  font-size: 2.2rem; color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
}

.main-header h1 {
  font-size: 2.4rem; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(135deg, #fff, #9ac7ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.neon-text { color: var(--neon-blue); text-shadow: 0 0 8px var(--neon-blue), 0 0 16px #0077ff; }
.tagline { color: var(--text-dim); font-size: 1rem; margin-top: 6px; letter-spacing: 0.5px; }

/* ===== SEARCH PANEL ===== */
.search-panel {
  background: rgba(10, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 60px;
  padding: 1rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.search-box {
  flex: 2; min-width: 220px; display: flex; align-items: center;
  background: #0b0f16; border-radius: 40px; padding: 0.4rem 1.2rem;
  border: 1px solid #2a3442; transition: var(--transition);
}

.search-box:focus-within { border-color: var(--neon-blue); box-shadow: 0 0 15px var(--neon-blue-glow); }
.search-box i { color: var(--neon-blue); font-size: 1.1rem; margin-right: 10px; }
.search-box input {
  background: transparent; border: none; width: 100%; padding: 0.7rem 0;
  color: white; font-size: 1rem; font-weight: 500; outline: none;
}
.search-box input::placeholder { color: #5b6f8a; font-weight: 400; }

.filter-group {
  display: flex; gap: 0.8rem; flex-wrap: wrap;
  flex: 2; justify-content: flex-end;
}

select {
  background: #0b0f16; border: 1px solid #2a3442; color: var(--text-light);
  padding: 0.7rem 2.2rem 0.7rem 1.2rem; border-radius: 40px;
  font-size: 0.9rem; font-weight: 500; outline: none; cursor: pointer;
  transition: var(--transition); min-width: 130px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300c8ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 1rem center;
}

select:hover, select:focus { border-color: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue-glow); }

/* ===== DEVICE GRID ===== */
.section-title {
  font-size: 1.4rem; font-weight: 600; margin-bottom: 1.2rem;
  color: #d0e2ff; display: flex; align-items: center; gap: 10px;
}
.section-title i { color: var(--neon-blue); }

.device-list-wrapper { margin-bottom: 2.5rem; }

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}

.device-card {
  background: var(--bg-card);
  border: 1px solid #1f2a3a;
  border-radius: var(--radius-sm);
  padding: 1rem 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  overflow: hidden;
}

.device-card i { font-size: 1.8rem; color: var(--neon-blue); opacity: 0.8; }
.device-card span { font-weight: 600; font-size: 0.95rem; word-break: break-word; }
.device-card small { color: var(--text-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Badge de gama */
.device-card .tier-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-baja { background: #4a2020; color: #ff8b8b; border: 1px solid #ff5b5b; }
.tier-media { background: #4a3a20; color: #ffcc8b; border: 1px solid #ffb45b; }
.tier-alta { background: #1e3a4a; color: #8bd4ff; border: 1px solid #00c8ff; }

.device-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 200, 255, 0.15), 0 0 0 1px var(--neon-blue);
}

.device-card.active {
  border-color: var(--neon-blue);
  background: #0d1a2b;
  box-shadow: 0 0 20px var(--neon-blue-glow);
}

/* ===== CONFIG CARD ===== */
.config-card {
  background: linear-gradient(145deg, #0f141e, #0a0e14);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-card);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(4px);
  animation: fadeSlideUp 0.4s ease;
  margin-bottom: 2rem;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.config-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; margin-bottom: 1.8rem;
  border-bottom: 1px solid #1f2e44; padding-bottom: 1.2rem;
  gap: 12px;
}

.config-header h2 {
  font-size: 1.9rem; font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #7bb9ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.config-header .badge {
  background: #0e1f32; border: 1px solid var(--neon-blue);
  border-radius: 40px; padding: 0.4rem 1.2rem;
  font-size: 0.85rem; font-weight: 600; color: var(--neon-blue);
  letter-spacing: 0.5px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.spec-group {
  background: rgba(8, 12, 20, 0.7);
  border-radius: 18px;
  padding: 1.2rem 1.2rem 1rem;
  border: 1px solid #1a2537;
  transition: var(--transition);
}
.spec-group:hover { border-color: #2b3f5c; background: #0d1422; }

.spec-group h3 {
  font-size: 1rem; font-weight: 600; color: #b6d0ff;
  margin-bottom: 0.8rem; display: flex; align-items: center; gap: 8px;
  letter-spacing: 0.3px; border-left: 4px solid var(--neon-blue);
  padding-left: 12px;
}
.spec-group h3 i { color: var(--neon-blue); font-size: 0.9rem; }

.spec-item {
  display: flex; justify-content: space-between; padding: 0.55rem 0;
  border-bottom: 1px dashed #1e2c40; font-size: 0.95rem;
}
.spec-item:last-child { border-bottom: none; }

.spec-label { color: #a0b3d0; font-weight: 500; }
.spec-value {
  font-weight: 700; color: #e0f0ff; background: #091624;
  padding: 0.15rem 0.7rem; border-radius: 30px; font-size: 0.9rem;
  border: 1px solid #1d3d5c;
}

.extra-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  margin-top: 1.2rem;
}

.info-block {
  background: #0b111c; border-radius: 16px; padding: 1.2rem;
  border: 1px solid #1e3147;
}

.info-block h4 {
  color: var(--neon-blue); font-size: 1rem; font-weight: 600;
  margin-bottom: 0.8rem; display: flex; align-items: center; gap: 8px;
}

.info-block ul { list-style: none; }
.info-block li {
  margin-bottom: 0.6rem; font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 8px; color: #cbd8f0;
}
.info-block li i { color: var(--neon-blue); font-size: 0.8rem; margin-top: 5px; }

.reason-text {
  grid-column: span 2;
  background: linear-gradient(145deg, #0d1a2b, #09121e);
  border-radius: 16px; padding: 1.2rem;
  border-left: 6px solid var(--neon-blue);
  font-size: 0.95rem; color: #d3e2ff; line-height: 1.6; margin-top: 0.8rem;
}
.reason-text i { color: var(--neon-blue); margin-right: 8px; }

.hidden { display: none; }

/* ============================================================ */
/* ADS                                                          */
/* ============================================================ */
.ad-container {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  padding: 0.5rem 0.75rem 0.75rem;
  background: rgba(10, 15, 25, 0.55);
  border: 1px dashed rgba(0, 200, 255, 0.25);
  border-radius: 16px;
  overflow: hidden;
  min-height: 90px;
  transition: border-color 0.3s ease;
}
.ad-container:hover { border-color: rgba(0, 200, 255, 0.5); }

.ad-label {
  display: block; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: #5b6f8a; margin-bottom: 6px;
  padding-left: 4px; font-weight: 600;
}

.ad-top { margin-top: 0; margin-bottom: 2rem; }
.ad-mid { margin: 0 0 2rem; }
.ad-feed { margin: 2rem 0 1rem; background: rgba(8, 12, 20, 0.5); }
.ad-bottom { margin-top: 1.5rem; margin-bottom: 1rem; }

.ad-container ins.adsbygoogle {
  display: block !important;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

/* Sidebar sticky (solo desktop) */
.ad-sidebar-desktop {
  display: none;
  position: fixed;
  right: 1rem;
  top: 120px;
  width: 160px;
  min-height: 600px;
  padding: 0.6rem;
  background: rgba(10, 15, 25, 0.75);
  border: 1px dashed rgba(0, 200, 255, 0.3);
  border-radius: 16px;
  z-index: 50;
}
.ad-sidebar-desktop .ad-label { font-size: 0.6rem; }

/* Mostrar sidebar solo en pantallas grandes */
@media (min-width: 1500px) {
  .ad-sidebar-desktop { display: block; }
  .app-container { max-width: 1300px; }
}

/* ===== FOOTER ===== */
.main-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-top: 1px solid #1a2333;
}
.main-footer i { color: var(--neon-blue); margin-right: 6px; }
.small-note { font-size: 0.75rem; margin-top: 6px; color: #5b6f8a; }

/* ===== RESPONSIVE ===== */
@media (max-width: 750px) {
  .search-panel { border-radius: 30px; padding: 1.2rem; flex-direction: column; align-items: stretch; }
  .filter-group { justify-content: stretch; }
  .filter-group select { flex: 1; }
  .config-header h2 { font-size: 1.5rem; }
  .extra-info { grid-template-columns: 1fr; }
  .reason-text { grid-column: span 1; }
  .device-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  .main-header h1 { font-size: 1.8rem; }
  .neon-icon { font-size: 1.8rem; }
  .config-card { padding: 1.5rem 1rem; }
  .spec-group { padding: 1rem 0.8rem; }
  .spec-item { font-size: 0.85rem; }
  .spec-value { font-size: 0.8rem; }
  .device-card span { font-size: 0.8rem; }
  .ad-container { margin: 1rem 0; padding: 0.4rem 0.5rem 0.6rem; min-height: 70px; }
  .ad-label { font-size: 0.6rem; }
}