@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&display=swap');
:root {
  --primary: #c42021;
  --primary-light: #ffebec;
  --primary-dark: #9e1819;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; background: var(--bg); color: var(--text-main); }
body { padding-bottom: 70px; padding-top: 60px; }

header.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: 60px; 
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05); z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.04);
}
header.app-header .logo-container { display: flex; align-items: center; gap: 10px; }
header.app-header .logo-icon { color: var(--primary); }
header.app-header h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin: 0; line-height: 1; }
header.app-header .menu-btn { background: none; border: none; color: var(--text-main); padding: 8px; border-radius: 50%; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 75px; 
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04); z-index: 100; 
  border-top-left-radius: 24px; border-top-right-radius: 24px;
  border-top: 1px solid rgba(0,0,0,0.04); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; gap: 4px; padding: 8px 12px; border-radius: 12px;
  transition: all 0.2s ease;
}
.bottom-nav a.active { color: var(--primary); background: var(--primary-light); }
.bottom-nav a span { font-size: 0.75rem; font-weight: 600; }
.bottom-nav a i { width: 24px; height: 24px; }

main { padding: 16px; max-width: 600px; margin: 0 auto; width: 100%; }
h1.page-title, h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; color: var(--text-main); }
.h2-hd { font-size: 1.35rem; font-weight: 700; color: var(--primary-dark); margin: 8px 0; text-align: center; }

section, article { background: var(--surface); border-radius: 24px; padding: 24px; margin-bottom: 24px; box-shadow: 0 8px 30px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.02); }
article p { font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 12px; }
article a { color: var(--primary); text-decoration: none; font-weight: 600; }

.buttons { display: flex; background: #e5e7eb; border-radius: 12px; padding: 4px; margin-bottom: 20px; gap: 4px; }
.buttons button {
  flex: 1; background: transparent; border: none; padding: 10px; font-size: 0.95rem; font-weight: 600;
  color: var(--text-muted); border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.buttons button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.refresh { text-align: center; margin-bottom: 20px; }
.refresh button {
  background: var(--surface); color: var(--text-main); border: 1px solid #e5e7eb; padding: 10px 24px;
  border-radius: 20px; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.refresh button i { width: 18px; height: 18px; }

.download { margin-top: 16px; text-align: center; }
.download-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; 
  background: linear-gradient(135deg, #df2a2b 0%, #a81213 100%);
  color: #fff; padding: 16px 20px; font-size: 1.15rem; font-weight: 700; border-radius: 18px; text-decoration: none;
  box-shadow: 0 8px 25px rgba(196, 32, 33, 0.4); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); border: none;
}
.download-btn:active { transform: scale(0.96); box-shadow: 0 4px 12px rgba(196, 32, 33, 0.3); }

.iframe-wrapper {
  position: relative; width: 100%; aspect-ratio: 525/731; margin: 16px auto;
  background: #f4f4f4 url('logo.png') center center no-repeat;
  border-radius: 16px; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0,0,0,0.05); border: 2px solid #f0f0f0;
}
.iframe-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }
.coming-soon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 1.5rem; font-weight: 900; color: var(--primary); text-align: center;
  animation: pulse 1.5s ease-in-out infinite; z-index: 10;
  background: rgba(255,255,255,0.95); padding: 12px 20px; border-radius: 12px;
  box-shadow: var(--shadow-md); width: 85%; border: 2px solid var(--primary-light);
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); } }

footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.85rem; padding-bottom: 90px; }
footer .links { margin-top: 12px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--text-muted); text-decoration: none; }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0; font-size: 0.9rem; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
table th { background-color: #f9fafb; font-weight: 600; color: var(--text-main); }
table tr:last-child td { border-bottom: none; }

.iframe-wrapper.loading::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; z-index: 5; border-radius: 14px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

main { animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.fab {
  position: fixed; bottom: 90px; right: 20px; width: 56px; height: 56px;
  background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(196, 32, 33, 0.4); border: none; cursor: pointer; z-index: 90;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fab:active { transform: scale(0.9); }
.refresh { display: none; } 
html.dark-mode {
  --bg: #121212; --surface: #1e1e1e; --text-main: #f3f4f6; --text-muted: #9ca3af;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}
html.dark-mode header.app-header, html.dark-mode .bottom-nav { background: rgba(30, 30, 30, 0.85); border-color: rgba(255,255,255,0.05); }
html.dark-mode .iframe-wrapper { border-color: #333; }
html.dark-mode .coming-soon { background: rgba(30,30,30,0.95); border-color: #333; }
html.dark-mode table th { background-color: #2d2d2d; }
html.dark-mode table th, html.dark-mode table td { border-color: #333; }


.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 24px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.04); }
.seo-tables h3, .seo-faq h3 { color: var(--primary); margin-top: 30px; margin-bottom: 12px; font-size: 1.4rem; font-weight: 700; }
details { background: var(--surface); border: 1px solid rgba(0,0,0,0.04); border-radius: 12px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
details summary { font-weight: 600; cursor: pointer; padding: 16px; background: rgba(0,0,0,0.02); color: var(--text-main); list-style: none; display: flex; align-items: center; justify-content: space-between; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 1.5rem; color: var(--primary); font-weight: 300; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 16px; color: var(--text-muted); margin: 0; border-top: 1px solid rgba(0,0,0,0.04); }
body.dark-mode details { border-color: rgba(255,255,255,0.05); }
body.dark-mode details summary { background: rgba(255,255,255,0.02); }

.breadcrumb { display: none; }

.buttons a.seo-btn {
  flex: 1; background: transparent; border: none; padding: 10px; font-size: 0.95rem; font-weight: 600;
  color: var(--text-muted); border-radius: 8px; cursor: pointer; transition: all 0.2s; text-decoration: none; text-align: center; display: inline-block;
}
.buttons a.seo-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.iframe-refresh-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.iframe-refresh-btn:active { transform: scale(0.95); }
.iframe-refresh-btn i { width: 14px; height: 14px; }
body.dark-mode .iframe-refresh-btn {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

.pwa-banner {
  position: fixed;
  bottom: 75px;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
  z-index: 9999;
  padding: 16px 20px;
  transform: translateY(100%);
  animation: slideUp 0.6s forwards cubic-bezier(0.16, 1, 0.3, 1);
  animation-delay: 2s; }
@keyframes slideUp { to { transform: translateY(0); } }
.pwa-banner-content { display: flex; align-items: center; gap: 12px; max-width: 600px; margin: 0 auto; }
.pwa-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.05); }
.pwa-text { flex: 1; }
.pwa-text strong { display: block; font-size: 1rem; color: var(--text-main); margin-bottom: 2px; }
.pwa-text p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.pwa-actions { display: flex; align-items: center; gap: 4px; }
.pwa-btn-install {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(232, 28, 36, 0.35);
  cursor: pointer;
  transition: all 0.2s;
}
.pwa-btn-install:active { transform: scale(0.95); }
.pwa-btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
  display: flex;
  transition: color 0.2s;
}
.pwa-btn-close:hover { color: var(--text-main); }
body.dark-mode .pwa-banner { background: rgba(20, 20, 20, 0.95); border-color: rgba(255,255,255,0.1); }
