/* ============================================================
   Top War – Ultimate Strategy Guide 2026
   Main stylesheet for www.griyaidaman.com
   ============================================================ */

:root {
    --primary: #0b1a2e;
    --primary-2: #12294a;
    --accent: #f5a623;
    --accent-2: #ff6b35;
    --text: #2b3440;
    --muted: #6b7686;
    --bg: #f4f6f9;
    --card: #ffffff;
    --border: #e3e8ef;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(11, 26, 46, .08);
    --shadow-lg: 0 10px 30px rgba(11, 26, 46, .14);
    --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
}

a { color: #1a6fd4; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- Header ---------- */
header {
    background: var(--primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1rem;
}

.my-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .5px;
    flex-wrap: wrap;
}
.my-logo:hover { text-decoration: none; }
.my-logo i { color: var(--accent); }
.my-logo span { color: var(--accent); }
.my-logo small {
    font-size: .62rem;
    font-weight: 400;
    color: #9fb3cc;
    width: 100%;
    margin-left: 1.9rem;
    letter-spacing: .3px;
}

#mainNav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}
#mainNav a {
    color: #dbe6f4;
    padding: .55rem .8rem;
    border-radius: 8px;
    font-size: .95rem;
    white-space: nowrap;
}
#mainNav a i { margin-right: .3rem; color: var(--accent); }
#mainNav a:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
}

.hamburger {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: .35rem .5rem;
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(245,166,35,.25), transparent 60%),
        linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 60%, #1d3f6e 100%);
    color: #fff;
    padding: 4.5rem 0 4rem;
    text-align: center;
}
.hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
}
.hero h1 i { color: var(--accent); margin-right: .4rem; }
.hero p {
    max-width: 720px;
    margin: 0 auto 1.8rem;
    color: #cddbee;
    font-size: 1.1rem;
}
.hero p strong { color: #fff; }

.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff !important;
    font-weight: 700;
    padding: .9rem 1.9rem;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(245,166,35,.4);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(245,166,35,.5);
    text-decoration: none;
}

/* ---------- Sections ---------- */
main.container { padding: 1.5rem 1.25rem 0; }

section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
section[id] { scroll-margin-top: 90px; }

.section-title {
    font-size: 1.55rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.section-title i { color: var(--accent-2); margin-right: .45rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.mt-1 { margin-top: 1rem; }
.text-muted { color: var(--muted); font-size: .92rem; }

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.25rem 0;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: .6rem;
}
.card h3 i { color: var(--accent-2); margin-right: .4rem; }
.card p { font-size: .95rem; color: var(--text); margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Images ---------- */
.img-placeholder {
    margin: 1.25rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.img-placeholder img { width: 100%; object-fit: cover; }
.img-caption {
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    margin-top: -.75rem;
    margin-bottom: 1rem;
}
.img-caption i { color: var(--accent-2); }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    background: #e7f6ec;
    color: #1e8e4e;
    font-size: .78rem;
    font-weight: 700;
    padding: .2rem .65rem;
    border-radius: 999px;
    margin-right: .35rem;
}
.badge-blue { background: #e8f0fe; color: #1a56c4; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    min-width: 520px;
}
th, td {
    padding: .7rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
tr:nth-child(even) td { background: #f8fafc; }
tr:hover td { background: #eef4fb; }

/* ---------- Forms ---------- */
.search-box {
    display: flex;
    gap: .6rem;
    margin: .5rem 0 1rem;
}
.search-box input {
    flex: 1;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,166,35,.2);
}
.search-box button {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: .75rem 1.4rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.search-box button:hover { background: var(--primary-2); }

.score-form, .comment-form {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
}
.score-form label, .comment-form label { display: block; margin-bottom: .6rem; font-size: .95rem; }
.score-form select,
.score-form input,
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: .7rem .9rem;
    margin-bottom: .7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
}
.comment-form textarea { min-height: 110px; resize: vertical; }
.score-form button, .comment-form button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: 0;
    padding: .75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.score-form button:hover, .comment-form button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ---------- Share bar ---------- */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.share-bar > span { font-weight: 600; color: var(--primary); margin-right: .4rem; }
.share-bar a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: .45rem .95rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    transition: all .15s ease;
}
.share-bar a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ---------- Friend links ---------- */
friend-link {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: .95rem;
}
friend-link a { margin-right: 1rem; white-space: nowrap; }

/* ---------- Footer ---------- */
footer {
    background: var(--primary);
    color: #b9c8dc;
    padding: 2.5rem 0;
    margin-top: 1rem;
    text-align: center;
    font-size: .95rem;
}
footer p { margin-bottom: .7rem; }
footer a { color: #8fc1ff; }
footer strong { color: #fff; }
footer .copyright { font-size: .85rem; color: #8aa0bb; margin-top: 1rem; }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 900;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { box-shadow: 0 12px 30px rgba(245,166,35,.5); }

/* ---------- FAQ grid ---------- */
#faq > div { display: grid; gap: 1.2rem; }
#faq .card h3 { font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hamburger { display: block; }
    #mainNav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--primary-2);
        padding: .75rem 1.25rem 1rem;
        gap: .15rem;
        box-shadow: 0 12px 24px rgba(0,0,0,.3);
        display: none;
    }
    #mainNav.open { display: flex; }
    #mainNav a { padding: .75rem .6rem; font-size: 1rem; }
    .my-logo small { margin-left: 0; }
    .card-grid { grid-template-columns: 1fr; }
    section { padding: 1.4rem 1.1rem; }
    .hero { padding: 3rem 0 3.2rem; }
    .search-box { flex-direction: column; }
    .search-box button { width: 100%; }
}
