/* ============================================================
   7m-Goal.com — ELECTRIC FOOTBALL THEME
   Shared base styles included in every page
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-deep:       #080c14;
  --bg-card:       #0e1422;
  --bg-header:     #070b11;
  --accent-green:  #00e676;
  --accent-green2: #00c853;
  --accent-red:    #ff1744;
  --accent-orange: #ff9800;
  --accent-blue:   #29b6f6;
  --text-primary:  #f0f4ff;
  --text-secondary:#8892aa;
  --text-muted:    #4a5568;
  --border:        rgba(0,230,118,0.15);
  --border-hover:  rgba(0,230,118,0.5);
  --glow-green:    0 0 20px rgba(0,230,118,0.3), 0 0 40px rgba(0,230,118,0.15);
  --glow-red:      0 0 15px rgba(255,23,68,0.4);
  --radius:        10px;
  --radius-lg:     16px;
  --font-display:  'Oswald', sans-serif;
  --font-body:     'Sarabun', sans-serif;
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  /* Football pitch grid overlay */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,230,118,0.06) 0%, transparent 60%),
    linear-gradient(rgba(0,230,118,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,230,118,0.025) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
}

/* ── LIVE PULSE ANIMATION ── */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255,23,68,0.6); }
  50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255,23,68,0); }
}
@keyframes scoreFlash {
  0%   { background: rgba(0,230,118,0.3); }
  100% { background: transparent; }
}
@keyframes slideDown {
  from { opacity:0; transform: translateY(-10px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0,230,118,0.2); }
  50%       { border-color: rgba(0,230,118,0.7); }
}

/* ── LIVE BADGE ── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.4s ease-in-out infinite;
}

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  background: var(--bg-header);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,230,118,0.2);
  box-shadow: 0 4px 30px rgba(0,0,0,0.6), 0 1px 0 rgba(0,230,118,0.1);
  animation: fadeIn 0.4s ease;
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* ── CONTENT SECTION (SEO text blocks) ── */
.content {
  width: 100%;
  max-width: 920px;
  margin: 16px auto;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.6s ease;
  line-height: 1.8;
}
.content h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 20px rgba(0,230,118,0.4);
}
.content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-green);
}
.content h3 { font-size: 1.15rem; color: var(--accent-blue); margin: 16px 0 8px; }
.content h4 { font-size: 1.05rem; color: var(--accent-orange); margin: 14px 0 8px; }
.content h5 { font-size: 1rem; color: var(--text-secondary); margin: 12px 0 6px; }
.content h6 { font-size: 0.9rem; color: var(--text-muted); margin: 10px 0 6px; }
.content p  { color: var(--text-secondary); margin: 0 0 12px; font-size: 0.95rem; }
.content strong { color: var(--accent-green); }
.content em     { color: var(--accent-orange); font-style: normal; }
.content u      { text-decoration-color: var(--accent-green); }
.content b      { color: var(--text-primary); }

/* ── BANNER ADS ── */
.banner-over-header {
  width: 100%;
  max-width: 980px;
  height: 90px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}
.banner-over-header img {
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: cover;
}

/* ── IFRAME CONTAINERS ── */
.iframe-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 70px);
  overflow: hidden;
  background: #fff;
}
.iframe-stage {
  position: absolute;
  top: 0; left: 0;
  transform-origin: top left;
}
.iframe-stage iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

/* Desktop table iframe */
table.desktop-table {
  width: 1000px;
  border-collapse: collapse;
  background: #fff;
}
td.desktop-td {
  padding: 0;
  width: 1000px;
}
iframe.desktop-iframe {
  width: 1000px;
  height: 20000px;
  border: none;
  display: block;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer a { color: var(--accent-green); text-decoration: none; }
footer a:hover { color: var(--text-primary); }

/* ── BACK TO TOP ── */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 20px;
  display: none;
  background: var(--accent-green);
  color: var(--bg-deep);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow-green);
  transition: transform var(--transition), box-shadow var(--transition);
  z-index: 9998;
  line-height: 1;
}
#backToTop:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 30px rgba(0,230,118,0.6);
}

/* ── FLAG ICONS ── */
.flag-icons-mobile, .flag-icons-desktop {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
}
.flag-icons-mobile img, .flag-icons-desktop img {
  width: 26px;
  height: auto;
  border-radius: 3px;
  cursor: pointer;
  transition: transform var(--transition);
}
.flag-icons-mobile img:hover, .flag-icons-desktop img:hover {
  transform: scale(1.15);
}
.flag-icons-mobile { justify-content: center; padding: 8px 0 4px; }
.flag-icons-desktop { display: none; justify-content: flex-end; padding: 6px 12px 0 0; }

@media (min-width: 769px) {
  .flag-icons-desktop { display: flex; }
  .flag-icons-mobile  { display: none; }
}

/* ── IFRAME WRAPPER (scale type) ── */
.iframe-wrapper {
  transform: scale(0.74);
  transform-origin: top center;
  margin-bottom: -400px;
  background: #fff;
}
@media (max-width: 768px) {
  .iframe-wrapper { transform: scale(0.665); }
}
@media (max-width: 480px) {
  .iframe-wrapper { transform: scale(0.495); }
}
iframe {
  border: none;
}
