

@font-face {
    font-family: 'iranyekan';
    src: url('../IRANYekanX-Regular.woff2');
    
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: iranyekan,Tahoma, sans-serif;
}

:root{
    --bg: #07111f;
    --bg-soft: #0d1b2a;
    --card: rgba(255,255,255,0.07);
    --card-2: rgba(255,255,255,0.05);
    --text: #f4f7fb;
    --muted: #a9b7c8;
    --primary: #7c3aed;
    --primary-2: #06b6d4;
    --gold: #f59e0b;
    --danger: #fb7185;
    --border: rgba(255,255,255,0.10);
    --shadow: 0 18px 50px rgba(0,0,0,0.25);
}

body {
    
    background:
        radial-gradient(circle at top right, rgba(124,58,237,.25), transparent 25%),
        radial-gradient(circle at top left, rgba(6,182,212,.18), transparent 30%),
        linear-gradient(180deg, #06101d 0%, #0b1523 100%);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}

.container {
    width: min(1180px, 92%);
    margin: auto;
}

.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(124,58,237,.16), rgba(6,182,212,.10)),
        linear-gradient(to bottom, transparent, rgba(0,0,0,.18));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #d7def0;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    margin-bottom: 18px;
    line-height: 1.2;
    text-shadow: 0 8px 30px rgba(0,0,0,.25);
}

.hero p {
    max-width: 760px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 14px;
    transition: .3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #5b21b6);
    color: white;
    box-shadow: 0 15px 30px rgba(124,58,237,.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    background: rgba(255,255,255,0.07);
    color: white;
    border: 1px solid var(--border);
}

.stats-section {
    margin-top: -30px;
    position: relative;
    z-index: 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.stat-card.rare {
    background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(124,58,237,.18));
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--muted);
    font-size: .95rem;
}

.search-filter-section {
    padding: 50px 0 10px;
}

.filter-box {
    background: rgba(255,255,255,0.07);
    padding: 18px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.filter-box input,
.filter-box select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
}

.filter-box option {
    color: #000;
}

.section-head {
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.section-head p {
    color: var(--muted);
}

.rare-section,
.topics-section {
    padding: 50px 0;
}

.rare-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.topic-block {
    margin-bottom: 40px;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-right: 4px solid var(--primary);
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
}

.gem-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.gem-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--card-accent, #7c3aed) 0%, transparent 70%);
    opacity: .18;
    pointer-events: none;
}

.gem-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 45px rgba(0,0,0,.35);
    border-color: rgba(255,255,255,.18);
}

.rare-gem-card {
    background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(124,58,237,.14));
    border: 1px solid rgba(245,158,11,.35);
}

.gem-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.gem-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.3rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
}

.gem-number {
    color: #d7def0;
    font-size: .95rem;
}

.gem-card h3,
.gem-card h4 {
    height:60px !important;
    margin-bottom: 8px;
    line-height: 1.5;
}

.gem-topic {
    color: var(--muted);
    margin-bottom: 14px;
}

.rare-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245,158,11,.15);
    color: #ffd58a;
    border: 1px solid rgba(245,158,11,.28);
    font-size: .85rem;
    margin-top: -14px;
}

.open-modal-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: .3s ease;
}

.open-modal-btn:hover {
    filter: brightness(1.1);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 18px;
    color: var(--muted);
}

.footer {
    padding: 26px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.08);
    color: #c8d3e2;
    background: rgba(0,0,0,.12);
    margin-top: 30px;
}

/* modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: .35s ease;
    z-index: 999;
    backdrop-filter: blur(7px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: min(900px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #0d1726, #0b1320);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    box-shadow: 0 35px 80px rgba(0,0,0,.45);
    padding: 28px;
    transform: scale(.86) translateY(30px);
    opacity: 0;
    transition: .4s cubic-bezier(.2,.8,.2,1);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    font-size: 1.6rem;
    background: rgba(255,255,255,.08);
    color: white;
    cursor: pointer;
}

.modal-header {
    margin-bottom: 24px;
    padding-left: 60px;
}

.modal-header h3 {
    margin-top: 12px;
    font-size: 1.6rem;
}

.modal-chip {
    display: inline-block;
    margin-left: 8px;
    margin-bottom: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #dce7f7;
    border: 1px solid rgba(255,255,255,.08);
    font-size: .9rem;
}

.rare-chip {
    background: rgba(245,158,11,.15);
    color: #ffd58a;
    border-color: rgba(245,158,11,.22);
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h4 {
    margin-bottom: 10px;
    color: #f4f7fb;
}

.code-block {
    direction: ltr;
    text-align: left;
    background: #06101b;
    color: #d5e7ff;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    overflow-x: auto;
    line-height: 1.8;
    font-family: Consolas, monospace;
    white-space: pre-wrap;
}

#modalDescription,
#modalTrap {
    color: #d3dded;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    padding: 16px;
    border-radius: 16px;
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 992px) {
    .stats-grid,
    .rare-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid,
    .rare-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 70px 0 50px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-head h2 {
        font-size: 1.5rem;
    }

    .modal-box {
        padding: 20px;
        border-radius: 18px;
    }

    .modal-header {
        padding-left: 48px;
    }
}
