/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    color-scheme: light;
    background: #f4f6fb;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f4f6fb !important;
    color: #0f172a !important;
    min-height: 100vh;
    color-scheme: light;
}

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e9f2;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.logo-box {
    background: #e32636;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-weight: 700; font-size: 1rem; color: #0f172a; }
.logo-sub { font-size: 0.72rem; color: #64748b; font-weight: 400; }

.nav-links { display: flex; gap: 2rem; }
.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: #e32636; }

/* ── HERO ── */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}
.hero-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e32636;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    display: block;
}
.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 1.2rem;
    color: #0f172a;
}
.hero-accent { color: #e32636; }
.hero-desc {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e32636;
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    width: fit-content;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227,38,54,0.35);
    color: #ffffff;
}

/* ── HERO IMAGE SECTION ── */
.hero-image-wrap {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-blob {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(ellipse, rgba(29,78,216,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-imgs { position: relative; width: 300px; height: 360px; }
.hero-img {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.13);
}
.hero-img:nth-child(1) { width: 200px; height: 240px; top: 0; right: 0; z-index: 2; }
.hero-img:nth-child(2) { width: 160px; height: 190px; bottom: 0; left: 0; z-index: 1; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── SECTIONS ── */
.section {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
    color: #0f172a;
}
.accent { color: #e32636; }
.title-bar { width: 40px; height: 4px; background: #e32636; border-radius: 2px; }

/* ── PILLS ── */
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.pill {
    background: #ffffff;
    border: 1.5px solid #e5e9f2;
    color: #64748b;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.pill:hover { border-color: #e32636; color: #e32636; background: #fff0f1; }
.pill.active { background: #e32636; border-color: #e32636; color: #ffffff; }

/* ── TOP 10 GRID ── */
.top10-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.top-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e5e9f2;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.top-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.top-card-img-wrap { position: relative; }
.top-card-img-wrap img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}
.top-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e32636;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-card-body { padding: 0.6rem 0.8rem; }
.top-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a;
    margin-bottom: 0.2rem;
}
.top-card-likes {
    font-size: 0.78rem;
    color: #e32636;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ── GALLERY GRID ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    justify-content: center;
}

/* ── CARD ── */
.card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid #e5e9f2;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeUp 0.4s ease backwards;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.12); }

.card-img-wrap { overflow: hidden; }
.card-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-img { transform: scale(1.05); }

.card-body { padding: 0.85rem 1rem 0.5rem; }
.card-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.3rem;
}
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.8rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 0.4rem;
}

/* Badge overlay on thumbnail for likes */
.card-meta-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    color: #e32636;
    padding: 6px 8px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Make modal details clearer: larger like count and follow link */
.modal-like-row { display: flex; align-items: center; gap: 0.75rem; }
.modal-like-btn { background: #fff; border: 1px solid #e5e9f2; padding: 0.5rem 0.8rem; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.modal-like-btn .heart { color: #e32636; }
.modal-follow-link { color: #1d4ed8; text-decoration: none; font-weight:700; }
.like-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    font-family: inherit;
}
.like-btn:hover { background: #fff0f1; color: #e32636; }
.like-btn.liked { color: #e32636; }
.heart { font-size: 1.1rem; display: inline-block; }
.like-btn.liked .heart { animation: heartPop 0.3s ease; }

.copy-mini {
    font-size: 0.78rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
    font-family: inherit;
}
.copy-mini:hover { background: #eff6ff; color: #1d4ed8; }

/* ── MODAL ── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
}
.modal.visible { opacity: 1; pointer-events: all; }
.modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 860px;
    max-height: 88vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s ease;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.modal.visible .modal-content { transform: scale(1); }

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.08);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    transition: background 0.2s;
    line-height: 1;
}
.close-btn:hover { background: rgba(0,0,0,0.15); }

.modal-image-container {
    flex: 1;
    min-width: 0;
    background: #f0f0f0;
    overflow: hidden;
}
.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-details {
    width: 320px;
    min-width: 280px;
    padding: 2.5rem 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: auto;
    background: #ffffff;
}

.badge {
    display: inline-block;
    background: #fff0f1;
    color: #e32636;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    letter-spacing: 0.3px;
    width: fit-content;
    text-transform: uppercase;
}

.modal-details h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.prompt-box {
    background: #f8fafc;
    border: 1.5px solid #e5e9f2;
    border-radius: 12px;
    padding: 1rem;
    margin-top: auto;
}
.prompt-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 0.5rem;
}
.prompt-box p {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.65;
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.copy-btn {
    background: #e32636;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.copy-btn:hover { background: #c21124; }
.copy-btn:active { transform: scale(0.98); }
.copy-btn.copied { background: #10b981; }

/* ── FOOTER ── */
.footer {
    background: #ffffff;
    border-top: 1.5px solid #e5e9f2;
    margin-top: 3rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
}
.footer-brand p {
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}
.footer-bottom {
    border-top: 1px solid #f1f5f9;
    text-align: center;
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem 2rem; gap: 2rem; }
    .hero-image-wrap { height: 260px; }
    .modal-content { flex-direction: column; max-height: 95vh; }
    .modal-image-container { min-height: 200px; max-height: 220px; flex: none; }
    .modal-details { width: 100%; min-width: unset; padding: 1.5rem 1.2rem; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .hero-image-wrap { display: none; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.9rem; }
    .top10-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
