/* ─── RESET ──────────────────────────────────────────────── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─── BASE ───────────────────────────────────────────────── */

body {
    font-family: 'Chivo Mono', monospace;
    background-color: #f5f5f0;
    color: #000;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */

.container {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 20px;
    flex: 1;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */

.sidebar {
    grid-column: 1;
    padding: 50px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 80px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav {
    margin-bottom: 60px;
}

.nav-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    color: #000;
}

.nav-item::before {
    content: '🡒';
    margin-right: 12px;
    font-size: 14px;
}

.nav-item:hover {
    opacity: 0.6;
}

.stats {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.stats div {
    margin-bottom: 2px;
}

.status-line {
    font-size: 11px;
    color: #666;
    margin-top: 20px;
    line-height: 1.5;
    min-height: 20px;
}

.connect-btn {
    margin-top: 15px;
    margin-bottom: 15px;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.connect-btn:hover {
    background-color: #333;
}

.cache-btn {
    margin-top: 10px;
    background-color: #666;
}

.cache-btn:hover {
    background-color: #444;
}

.wallet-addr {
    font-size: 10px;
    color: #666;
    margin-top: 8px;
    word-break: break-all;
}

/* ─── CONTENT ────────────────────────────────────────────── */

.content {
    grid-column: 2 / -1;
    padding: 50px 40px 80px 0;
}

.intro {
    margin-bottom: 35px;
}

.intro h1 {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1;
}

.intro p {
    font-size: 14px;
    line-height: 1.65;
}

.divider {
    border: none;
    border-top: 1px solid #000;
    margin: 45px 0;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 18px;
    height: 18px;
    background-color: #000;
    flex-shrink: 0;
}

/* ─── 4 GRID ────────────────────────────────────────────── */

.grid4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.grid4-item {
    text-align: left;
}

.grid4-block {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
}

.grid4-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid4-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 400;
}

.grid4-body {
    font-family: 'Chivo Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
}

/* ─── 3 GRID ────────────────────────────────────────────── */

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.grid3-item {
    text-align: left;
}

.grid3-block {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
}

.grid3-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 400;
}

.grid3-body {
    font-family: 'Chivo Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
}

/* ─── 1 GRID ────────────────────────────────────────────── */

.grid1 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    background-color: #eae4d9;
    padding: 20px;
}

.grid1-item {
    text-align: center;
}

.grid1-body {
    font-family: 'Chivo Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
}

.grid1 .title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 1.5;
}


/* ─── GALLERY ────────────────────────────────────────────── */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-item {
    text-align: left;
}

.art-preview {
    width: 100%;
    aspect-ratio: 1;
    background-color: #1a1a1a;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
}

.art-preview canvas {
    width: 100% !important;
    height: 100% !important;
}

.art-title {
    font-family: 'Chivo Mono', monospace;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 400;
}

.art-title-mini {
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    margin-bottom: 8px;
    font-weight: 400;
}

.art-details {
    font-size: 9.5px;
    line-height: 1.5;
}

.art-details div {
    margin-bottom: 1px;
}

.gallery-loading {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #999;
    padding: 40px 0;
}

.art-preview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}


/* ─── COMMUNITY GALLERY ──────────────────────────────────── */

#gallery-section {
    margin-top: 60px;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
}

.community-grid .gallery-item .art-preview {
    aspect-ratio: 1;
    overflow: hidden;
    background: transparent;
    border: none;
}

.community-grid .gallery-item .art-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}




/* ─── TRANSFERS ────────────────────────────────────────────── */

.transfers {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

/* ─── HISTORY INPUT ──────────────────────────────────────── */

.history-input {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 45px;
}

.history-input label {
    font-size: 11px;
    white-space: nowrap;
}

.history-input input {
    border: 1px solid #000;
    padding: 10px 14px;
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
    width: 220px;
    background: #fff;
    outline: none;
}

.history-input button {
    background-color: #eae4d9;
    border: 0px solid #000;
    padding: 10px 24px;
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    cursor: pointer;
}

.history-input button:hover {
    background-color: #c8c8bc;
}

/* ─── HISTORY DISPLAY ────────────────────────────────────── */

.history-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.history-column {
    grid-column: span 1;
}

.history-column h3 {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.history-art {
    width: 100%;
    aspect-ratio: 1;
    background-color: #1a1a1a;
    overflow: hidden;
}

.history-art canvas {
    width: 100% !important;
    height: 100% !important;
}

.history-info {
    grid-column: span 2;
}

.history-info h2 {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    margin-bottom: 12px;
    font-weight: 700;
}

.history-info .art-details {
    font-size: 10px;
    line-height: 1.6;
}

.history-empty {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #999;
    padding: 20px 0;
}

/* ─── TIMELINE ───────────────────────────────────────────── */

.history-timeline {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.timeline-thumb {
    width: 100%;
    aspect-ratio: 1;
    background-color: #ebebdf;
    border: 1px solid #d0d0c4;
    overflow: hidden;
}

.timeline-thumb canvas {
    width: 100% !important;
    height: 100% !important;
}

.timeline-thumb.current {
    border: 2px solid #000;
}

.timeline-label {
    font-size: 8px;
    text-align: center;
    color: #666;
    width: 100%;
    word-break: break-all;
}

/* ── Gallery ──────────────────────────────── */

#gallery-section {
    grid-column: 2 / -1;
    margin-top: 60px;
}

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

.gallery-item .art-preview {
    aspect-ratio: 1;
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.gallery-item .art-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Pager ─────────────────────────────────── */

.gallery-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
}

.pager-btn {
    background: #fff;
    border: 1px solid #000;
    padding: 6px 12px;
    cursor: pointer;
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
    transition: background 0.15s;
}

.pager-btn:hover {
    background: #000;
    color: #fff;
}

.pager-current {
    background: #000;
    color: #fff;
    padding: 6px 12px;
    border: 1px solid #000;
}

.pager-dots {
    padding: 6px 4px;
    color: #999;
}

/* ─── FOOTER ─────────────────────────────────────────────── */

.footer {
    background-color: #000;
    color: #fff;
    padding: 35px 45px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.footer-text {
    font-size: 13px;
}

.footer-links {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 11px;
}

.footer-links a:hover {
    opacity: 0.6;
}

/* ─── RESPONSIVE 800px ───────────────────────────────────── */

@media (max-width: 800px) {
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sidebar {
        height: auto;
        position: static;
        padding: 30px;
    }

    .content {
        padding: 30px;
    }

    .logo {
        margin-bottom: 30px;
    }

    .nav {
        margin-bottom: 30px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-display {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-info {
        grid-column: 1 / -1;
    }

    .history-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .grid3 {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
        margin-bottom: 50px;
    }
}

/* ─── RESPONSIVE 500px ───────────────────────────────────── */

@media (max-width: 500px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-display {
        grid-template-columns: 1fr 1fr;
    }

    .history-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── FAQ ────────────────────────────────────────────────── */

#faq-section {
    margin-top: 60px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 12px;
}

.faq-n {
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
    color: #999;
    padding-top: 2px;
}

.faq-q {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    user-select: none;
    line-height: 1.5;
}

.faq-q:hover {
    opacity: 0.6;
}

.faq-arrow {
    font-size: 14px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 20px;
    color: #999;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-a {
    grid-column: 2;
    font-family: 'Chivo Mono', monospace;
    font-size: 12px;
    line-height: 1.65;
    color: #444;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-a {
    max-height: 300px;
    padding-top: 8px;
    padding-bottom: 8px;
}