:root{
  --bg:#f5f5f5;
  --card:#ffffff;
  --muted:#6c757d;
  --accent:#111111;
  --glass: rgba(255,255,255,0.6);
  --link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23555' viewBox='0 0 24 24'%3E%3Cpath d='M3.9 12a4.6 4.6 0 0 1 0-6.5l2.6-2.6a4.6 4.6 0 0 1 6.5 0l1.4 1.4-1.4 1.4-1.4-1.4a3 3 0 0 0-4.2 0L6.6 8.3a3 3 0 0 0 0 4.2l.7.7-1.4 1.4-.7-.7A4.6 4.6 0 0 1 3.9 12z'/%3E%3C/svg%3E");
}

body{font-family:'Poppins',sans-serif;background:var(--bg);color:var(--accent);transition:background .25s,color .25s}
.light{--bg:#f5f5f5;--card:#ffffff;--accent:#111111;--muted:#6c757d;}
.dark{--bg:#0f0f10;--card:#141414;--accent:#f8f9fa;--muted:#b5b5b5;}

.site-header .nav-link{color:var(--muted)}
.card{background:var(--card);border:none}
.card-hover{transition:transform .18s,box-shadow .18s}
.card-hover:hover{transform:translateY(-6px);box-shadow:0 8px 30px rgba(0,0,0,0.06)}
.rounded-4{border-radius:18px}
.bg-light{background:#ffffff}
a{color:var(--accent);text-decoration:none}
a.link-with-icon{display:inline-flex;align-items:center;gap:6px;color:var(--accent)}
a.link-with-icon::after{
  content: "";
  display:inline-block;
  width:16px;height:16px;
  background-image:var(--link-icon);
  background-repeat:no-repeat;background-size:16px;
  opacity:.7;margin-left:6px;
}

/* HERO speciﬁc */
.hero-card{
  background: #ffffff;
  padding: 3.25rem;
  border-radius: 30px;
  box-shadow: 0 6px 20px rgba(16,24,40,0.06);
}

/* gradient heading (black <-> white subtle) */
.gradient-heading{
  background: #000000;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight:700;
}

/* category card with big faint icon behind */
.category-card{
  position:relative;
  overflow:hidden;
}
.category-card .bg-icon{
    position: absolute;
    right: -21px;
    bottom: -10px;
    font-size: 120px;
    opacity: 0.2;
    transform: rotate(-12deg);
    pointer-events: none;
    filter: grayscale(1);
}

/* make the whole card linkable */
.category-card a.card-link{
  display:block;color:inherit;text-decoration:none;
}

/* FAQ layout */
.faq-layout{display:flex;gap:30px}
.faq-questions{
  width:33%;
  max-height:70vh;
  overflow:auto;
  position:sticky;
  top:90px;
  border-right:1px solid rgba(0,0,0,0.04);
  padding-right:18px;
}
.faq-question{
  padding:10px 6px;border-radius:10px;margin-bottom:6px;cursor:pointer;
}
.faq-question.active{background:linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));border-left:3px solid rgba(0,0,0,0.12)}
.faq-answer{flex:1;max-width:100%}

/* related questions */
.related-questions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.related-questions a{padding:8px 10px;border-radius:10px;border:1px solid rgba(0,0,0,0.06);text-decoration:none;color:var(--accent)}

/* search modal */
.search-modal{
  position:fixed;left:0;top:0;width:100%;height:100%;display:none;align-items:flex-start;justify-content:center;padding-top:6vh;background:rgba(0,0,0,0.45);z-index:1200;
}
.search-modal .panel{
  width:min(920px,95%);background:var(--card);border-radius:14px;padding:18px;box-shadow:0 25px 60px rgba(0,0,0,0.25);
}
.search-input{width:100%;padding:10px 14px;border-radius:10px;border:1px solid rgba(0,0,0,0.08);font-size:16px}
.search-results{margin-top:10px;max-height:340px;overflow:auto}
.search-result{padding:10px;border-radius:8px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(0,0,0,0.04)}
.search-result .meta{font-size:13px;color:var(--muted)}

/* mobile */
@media(max-width:900px){
  .faq-layout{flex-direction:column}
  .faq-questions{width:100%;position:relative;max-height:300px;top:0;border-right:none;padding-right:0}
  .faq-question.active{border-left:none}
  .category-card .bg-icon{display:none}
  .hero-card{padding:2rem}
}

/* ===== DARK MODE FIXES ===== */
.dark .card,
.dark .hero-card,
.dark .category-card,
.dark .bg-white,
.dark .list-group-item,
.dark .shadow-sm,
.dark .rounded-4,
.dark .faq-answer article {
    background: #1b1b1d !important;
    color: #f1f1f1 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* ===== Dark-mode text helpers (paste at end of style.css) ===== */
.dark .text-muted,
.dark .muted,
.dark .small,
.dark .lead,
.dark .form-text,
.dark .nav-link,
.dark .card .text-muted,
.dark .list-group-item .text-muted {
  color: #cfcfcf !important;    /* readable light-gray on dark bg */
}

/* stronger emphasis for headings inside dark containers */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #f6f6f6 !important;
}

/* links in dark mode (non-blue) */
.dark a, .dark a:link, .dark a:visited {
  color: #e8e8e8 !important;
}

/* subtle borders for list-group and white containers in dark mode */
.dark .list-group-item {
  background: #181818 !important;
  border-color: rgba(255,255,255,0.04) !important;
  color: #e6e6e6 !important;
}

/* small helper: badges / pills */
.dark .badge {
  background: rgba(255,255,255,0.08) !important;
  color: #efefef !important;
}

/* make sure the muted color also applies to pseudo-elements if used */
.dark .text-muted::before,
.dark .text-muted::after {
  color: #cfcfcf !important;
}

.faq-item {
    background: var(--card);
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

/* Dark mode support */
.dark .faq-item {
    background: #1b1b1d !important;
    color: #f0f0f0 !important;
    border-color: rgba(255,255,255,0.1) !important;
}

.faq-search-input {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.15);
}

.faq-search-input:focus {
    border-color: #888;
    box-shadow: 0 0 0 3px rgba(120,120,120,0.15);
}

.dark .faq-search-input {
    background: #2a2a2a !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

/* FAQ Search Bar */
.faq-search-box {
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.faq-search-box .input-group-text {
    padding: 14px 16px;
    border-radius: 18px 0 0 18px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--muted);
}

.faq-search-input {
    border: none;
    padding: 14px 18px;
    border-radius: 0 18px 18px 0;
    font-size: 15px;
    background: transparent;
}

.faq-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Dark mode */
.dark .faq-search-box {
    background: #1e1e1f !important;
    box-shadow: 0 4px 14px rgba(255,255,255,0.05);
}

.dark .faq-search-icon {
    color: #cfcfcf !important;
}

.dark .faq-search-input {
    background: transparent !important;
    color: #fff !important;
}
.faq-search-container {
    margin-bottom: 60px !important;
}

/* Dark mode placeholder fix */
.dark .faq-search-input::placeholder {
    color: #bfbfbf !important;
    opacity: 1 !important;
}

.dark .faq-search-input::-webkit-input-placeholder {
    color: #bfbfbf !important;
}

.dark .faq-search-input:-ms-input-placeholder {
    color: #bfbfbf !important;
}

.dark .faq-search-input::-ms-input-placeholder {
    color: #bfbfbf !important;
}

.dark .faq-search-input::-moz-placeholder {
    color: #bfbfbf !important;
    opacity: 1 !important;
}

.dark .input-group-text i {
    color: #cfcfcf !important;
}

/* Related Questions Box */
.related-box {
    margin-top: 100px !important;
    background: #f1f1f1;
    border: 1px solid rgba(0,0,0,0.06);
}

.related-title {
    font-weight: 600;
    font-size: 17px;
    color: #333;
}

.related-item {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
    color: #111;
    font-size: 14px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

/* Dark mode */
.dark .related-box {
    background: #1c1c1e !important;
    border-color: rgba(255,255,255,0.07);
}

.dark .related-title {
    color: #eaeaea !important;
}

.dark .related-item {
    background: #2a2a2c !important;
    border-color: rgba(255,255,255,0.05);
    color: #f0f0f0;
}

.dark .related-item:hover {
    box-shadow: 0 6px 25px rgba(255,255,255,0.05);
}
/* Universal List Page UI */

.list-page-title {
    font-weight: 700;
    font-size: 28px;
}

.list-page-subtitle {
    color: var(--muted);
    margin-top: -4px;
    margin-bottom: 20px;
}

.list-search-container {
    margin: 0 auto 60px auto !important; 
    max-width: 600px;
}

.list-card {
    background: var(--card);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 18px 20px;
    border-radius: 16px;
    color: var(--accent);
    text-decoration: none;
    display: block;
    transition: transform .2s ease, box-shadow .2s ease;
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Dark mode */
.dark .list-card {
    background: #1b1b1d !important;
    border-color: rgba(255,255,255,0.08) !important;
    color: #f1f1f1 !important;
}

.dark .list-page-subtitle {
    color: #cfcfcf !important;
}

/* Input group */
.list-search-box {
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.list-search-box .input-group-text {
    padding: 14px 16px;
    border-radius: 18px 0 0 18px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--muted);
}

.list-search-input {
    border: none;
    padding: 14px 18px;
    border-radius: 0 18px 18px 0;
    font-size: 15px;
    background: transparent;
}

.list-search-input:focus {
    box-shadow: none !important;
}

/* Dark mode input */
.dark .list-search-box {
    background: #1e1e1f !important;
    box-shadow: 0 4px 14px rgba(255,255,255,0.05);
}

.dark .list-search-input {
    background: transparent !important;
    color: #fff !important;
}

.dark .list-search-input::placeholder {
    color: #bfbfbf !important;
}

footer {
    padding: 25px 0;
}

/* Home Section Titles */
.home-section-title {
    font-size: 28px;
    font-weight: 700;
}

.home-section-subtitle {
    margin-top: -5px;
    font-size: 15px;
}

/* Popular FAQ Cards */
.popular-faq-card {
    background: var(--card);
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    color: var(--accent);
    transition: transform .2s ease, box-shadow .2s ease;
}

.popular-faq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Gradient Fade Effect */
.popular-faq-section {
    position: relative;
}

.popular-faq-fade {
    position: absolute;
    bottom: 60px; /* just above the See More button */
    left: 0;
    width: 100%;
    height: 350px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #f5f5f5 80%);
}

/* Dark mode fade */
.dark .popular-faq-fade {
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #0f0f10 80%);
}

/* Dark mode cards */
.dark .popular-faq-card {
    background: #1c1c1e !important;
    border-color: rgba(255,255,255,0.08) !important;
    color: #eaeaea !important;
}

/* See More button */
.see-more-btn {
    font-weight: 600;
    border: none;
}

.dark .see-more-btn {
    background: #fff !important;
    color: #000 !important;
}

/* See More Button – Light Mode */
.see-more-btn {
    display: inline-block;
    background: #000;
    color: #fff !important;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.see-more-btn:hover {
    background: #111;
    transform: translateY(-2px);
}

/* Dark Mode Button */
.dark .see-more-btn {
    background: #353535 !important;
    color: #000 !important;
}

.dark .see-more-btn:hover {
    background: #393939 !important;
}

.panel-card-big {
  border: 1px solid #e5e5e5;
}

.other-panel-card:hover {
  transform: translateY(-4px);
  transition: 0.25s;
  background: #f6f6f6;
}
.dark .other-panel-card:hover {
  background: #222 !important;
}

.feature-box {
  border: 1px solid rgba(0,0,0,0.06);
}
.dark .feature-box {
  border: 1px solid rgba(255,255,255,0.08);
}

/* Panel single page styling */
.panel-main-card {
    background: var(--card);
    color: var(--accent);
    border-radius: 16px;
}
.panel-main-card h1 { margin-bottom: .2rem; }
.panel-details { font-size: 15px; color: var(--muted); }
.panel-long-description { margin-top: 12px; color: var(--accent); line-height:1.6; }

/* Make the main card a little larger visually */
.panel-main-card { padding: 28px; }

/* Smaller panels listing */
.small-panel-card {
    background: var(--card);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    display: block;
    text-decoration: none;
    color: var(--accent);
    transition: transform .18s ease, box-shadow .18s ease;
}
.small-panel-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

/* Dark mode */
.dark .panel-main-card, .dark .small-panel-card {
    background: #171717 !important;
    color: #f2f2f2 !important;
    border-color: rgba(255,255,255,0.04) !important;
}

 .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 700;
  }

  /* Player Single Page */
.player-main-card {
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
}

.player-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.player-link:hover {
  text-decoration: underline;
}

/* Device Badges */
.device-badge {
  background: rgba(0,0,0,0.06);
  padding: 6px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.dark .device-badge {
  background: rgba(255,255,255,0.08);
  color: #eee;
}

.device-badge i {
  font-size: 18px;
}

/* Other players (hover cards) */
.small-panel-card {
  background: var(--card);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .18s, box-shadow .18s;
}

.small-panel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.dark .small-panel-card {
  background: #1a1a1a !important;
  border-color: rgba(255,255,255,0.06);
}
/* Player Single Page uses same layout as panel single */
.player-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--accent);
}
.player-link:hover { text-decoration: underline; }

/* Device badges */
.device-badge {
    background: rgba(0,0,0,0.06);
    padding: 6px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.device-badge i { font-size: 18px; }

.dark .device-badge {
    background: rgba(255,255,255,0.1);
    color: #eee;
}

.feedback-box {
    background: var(--card);
    border: 1px solid #dddddd;
}

.feedback-up,
.feedback-down {
    transition: 0.2s;
}

.feedback-up:hover,
.feedback-down:hover {
    opacity: 0.7;
}


.dark .feedback-box {
    background: #1c1c1e !important;
}

.my-5 {
    margin-top: 2rem !important;
    margin-bottom: 7rem !important;
}

.mobile-nav {
  background: var(--bs-body-bg);
  border-top: 1px solid #ddd;
  padding: 10px;
}

.mobile-nav .nav-link {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* Light mode header */
body.light .site-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e5e5;
}

body.light .site-header a.nav-link {
    color: #333;
}

/* Dark mode header */
body.dark .site-header {
    background: #111 !important;
    border-bottom: 1px solid #222;
}

body.dark .site-header a.nav-link {
    color: #ddd;
}

body.dark #mainNav .nav-link:hover {
    color: #fff;
}

/* Mobile menu */
body.light .mobile-nav {
    background: #fff;
}
body.dark .mobile-nav {
    background: #000;
}

/* ----------------------------- */
/* DARK MODE FORM ELEMENT FIXES  */
/* ----------------------------- */

body.dark input.form-control,
body.dark textarea.form-control,
body.dark select.form-select {
    background-color: #1f1f1f !important;
    color: #e6e6e6 !important;
    border-color: #444 !important;
}

body.dark input.form-control::placeholder,
body.dark textarea.form-control::placeholder {
    color: #999 !important;
}

/* Input group left icon background */
body.dark .input-group-text {
    background-color: #1f1f1f !important;
    border-color: #444 !important;
    color: #e6e6e6 !important;
}

/* Dropdown menu in dark mode */
body.dark .dropdown-menu {
    background-color: #1f1f1f !important;
    border-color: #333 !important;
}

body.dark .dropdown-item {
    color: #ddd !important;
}

body.dark .dropdown-item:hover {
    background-color: #333 !important;
    color: #fff !important;
}

/* Search modal input in dark */
body.dark .search-input {
    background-color: #1f1f1f !important;
    border: 1px solid #444 !important;
    color: #eee !important;
}

body.dark #searchResults {
    background-color: #161616 !important;
    border-color: #333 !important;
}

/* Sun icon becomes yellow in dark mode */
body.dark #themeToggle i.bi-sun {
    color: #f6c425 !important;  /* warm yellow */
}

/* Consistent width like panels/tools/players */
.tool-container {
    max-width: 750px;
    margin: 0 auto;
        background: #fff;
    border: 1px solid var(--border-color);
}

/* Better styling for textareas on tool pages */
.tool-container textarea {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* Buttons inside tool pages */
.tool-container .btn {
    border-radius: 10px;
}

/* Headings */
.tool-container h2,
.tool-container h4 {
    font-weight: 600;
}

/* Result boxes spacing */
.result-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Default: desktop layout (keep same) */
.faq-layout {
    display: flex;
    gap: 20px;
}

/* Mobile layout: stack vertically */
@media (max-width: 767px) {
    .faq-layout {
        flex-direction: column;
    }

    /* Show answer first */
    .faq-answer {
        order: 1;
    }

    /* Show questions list after answer */
    .faq-questions {
        order: 2;
    }
}


/* When dark mode is active → invert logo */
body.dark .logo-darkmode {
    filter: invert(1);
}

/* Desktop: normal inline buttons */
.hero-buttons .hero-btn {
    display: inline-block;
}

/* Mobile adjustments */
@media (max-width: 768px) {

    /* Make buttons full width */
    .hero-buttons .hero-btn {
        display: block;
        width: 100%;
        margin: 0 !important;
    }

    /* Add spacing ONLY between the stacked buttons */
    .hero-buttons .mt-mobile {
        margin-top: 12px !important;
    }
}

/* Center logo on mobile */
.header-logo-center {
    pointer-events: none; /* Logo is not clickable in the center */
}

.header-logo-center img {
    max-height: 40px;
}

/* Desktop: restore normal behavior */
@media (min-width: 768px) {
    .header-logo-center {
        pointer-events: auto;
        position: static !important;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Default (light mode) */
#navToggle i {
    color: #333;
}

/* Dark mode */
body.dark #navToggle i {
    color: #fff !important;
}

/* Make sun icon yellow in dark mode */
body.dark #themeToggle i.bi-sun {
    color: #fbc02d !important; /* nice warm yellow */
}
