/* ─── Theme Variables ────────────────────────────────────────────────────────── */
:root {
    --background1: #0020ff;
    --background2: #1768ff;
    --accent1: #ff540b;
    --accent2: #ffffff;
    --color1: #ff540b;
    --color2: #ffde00;
    --color3: #ffffff;
}

/* ─── Base ─────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--background1) 22%, #1c1c1c),
        color-mix(in srgb, var(--background2) 14%, #000));
    color: var(--color3);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
header {
    background: linear-gradient(90deg, var(--background1), var(--background2));
    color: var(--color3);
    padding: 1rem 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--accent1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
}

.header-brand h1 {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    color: var(--color1);
}

.header-brand p {
    font-family: 'Orbitron', sans-serif;
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--color3);
    opacity: 0.85;
}

/* ─── Wallet Area ─────────────────────────────────────────────────────────── */
.wallet-area {
    flex-shrink: 0;
}

.btn-wallet {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.btn-wallet:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wallet-account {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.wallet-account:hover {
    background: rgba(255, 80, 80, 0.3);
}

.wallet-balance {
    font-size: 0.65rem;
    font-weight: bold;
    color: #ffffff;
    margin-left: 0.4rem;
}

.wallet-disconnect {
    margin-left: 0.5rem;
    opacity: 0.6;
}

/* ─── Testnet Banner ──────────────────────────────────────────────────────── */
.testnet-banner {
    background: rgba(122, 48, 0, 0.85);
    border: 1px solid #ff8c00;
    border-radius: 6px;
    color: #ffd080;
    text-align: center;
    padding: 0.35rem 0.9rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex: 1;
    margin: 0 1.5rem;
    white-space: nowrap;
}

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
nav {
    background: var(--background2);
    padding: 0.5rem;
    border-bottom: 2px solid var(--accent1);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 0.5rem;
}

nav ul li a {
    color: var(--color3);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    transition: all 0.2s;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.nav-active {
    background: var(--accent1);
    color: var(--accent2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* ─── Tab Content ─────────────────────────────────────────────────────────── */
.tab-content {
    display: none;
    padding: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
    background: linear-gradient(135deg, var(--background1), var(--background2));
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.tab-content.active {
    display: block;
}

.tab-content h2,
.tab-content h3 {
    color: var(--color1);
    font-family: 'Orbitron', sans-serif;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
    background: var(--background2);
    color: var(--color3);
    text-align: center;
    padding: 1rem;
    border-top: 2px solid var(--accent1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.muted {
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}

.error {
    color: #ff8080;
    font-weight: bold;
}

.hint {
    display: block;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
}

/* ─── Stats Row (Home) ────────────────────────────────────────────────────── */
.stats-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 100px;
    cursor: pointer;
    transition: background 0.2s;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.25);
}

.stat-num {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* ─── Proposal Cards ──────────────────────────────────────────────────────── */
.proposals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.proposal-card {
    background: linear-gradient(135deg, var(--background1), var(--background2));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow 0.2s;
    cursor: pointer;
    min-width: 0;
}

.proposal-card:hover {
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
    border-color: var(--accent1);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin: 0;
    color: var(--color1);
}

.card-deposit {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color2);
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-deposit-label {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--color3);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--color3);
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-funding {
    display: flex;
    justify-content: space-between;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color2);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.72rem;
    color: var(--color3);
    opacity: 0.65;
}

.deadline {
    font-style: italic;
}

/* ─── Progress Bar ────────────────────────────────────────────────────────── */
.progress-bar {
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.time-bar .progress-fill {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    opacity: 0.6;
}

.progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* ─── Badges ──────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 0.65rem;
    font-family: 'Orbitron', sans-serif;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-active {
    background: rgba(0, 200, 100, 0.3);
    border: 1px solid rgba(0, 200, 100, 0.6);
    color: #80ffb0;
}

.badge-staked {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.6);
    color: rgb(0, 255, 255);
}

.badge-successful {
    background: rgba(255, 200, 0, 0.3);
    border: 1px solid rgba(255, 200, 0, 0.6);
    color: #ffe080;
}

.badge-failed {
    background: rgba(255, 60, 60, 0.3);
    border: 1px solid rgba(255, 60, 60, 0.6);
    color: #ff9090;
}

.badge-draft {
    background: rgba(180, 180, 0, 0.3);
    border: 1px solid rgba(200, 200, 0, 0.6);
    color: #ffff80;
}

/* ─── Card Actions (Stake/Tip) ────────────────────────────────────────────── */
.card-action {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.input-inline {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.85rem;
    min-width: 0;
}

.input-inline::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn-sm {
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-sm:hover { opacity: 0.85; }

.btn-stake   { background: var(--accent1); color: var(--accent2); }
.btn-tip     { background: var(--color1);  color: var(--background1); }
.btn-claim   { background: var(--color2);  color: var(--background2); }
.btn-deposit { background: var(--accent1); color: var(--accent2); }
.btn-unstake { background: var(--color1);  color: var(--background2); }

.btn-primary {
    background: var(--accent1);
    color: var(--accent2);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; }

.btn-refresh {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--color3);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: var(--color3);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: var(--color3);
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent1);
    background: rgba(255, 255, 255, 0.18);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ─── My Account Items ────────────────────────────────────────────────────── */
.my-item {
    background: linear-gradient(135deg, var(--background1), var(--background2));
    border: 1px solid var(--accent1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.my-item:hover {
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    border-color: var(--color1);
}

.my-item-name {
    color: var(--color1);
}

.my-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.my-item-stats {
    font-size: 0.85rem;
    color: var(--color3);
    margin-bottom: 0.5rem;
}

.my-item-nft {
    font-size: 0.82rem;
    color: var(--color2);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.my-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ─── Wallet Modal ────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, var(--background1), var(--background2));
    border: 1px solid var(--accent1);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 260px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.modal-content h3 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 0.5rem;
    color: var(--color1);
    text-align: center;
}

.btn-modal {
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color3);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-modal:hover { background: rgba(255, 255, 255, 0.25); }

.btn-cancel {
    border-color: rgba(255, 100, 100, 0.4);
    color: rgba(255, 180, 180, 0.9);
}

.btn-cancel:hover { background: rgba(255, 80, 80, 0.2); }

/* ─── Notifications ───────────────────────────────────────────────────────── */
.notification {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2000;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.5s;
}

.notification-success {
    background: #1a6633;
    border: 1px solid #40cc80;
    color: #c0ffd8;
}

.notification-error {
    background: #661a1a;
    border: 1px solid #cc4040;
    color: #ffc0c0;
}

.notification-fade {
    opacity: 0;
}

/* ─── Proposals Toolbar ───────────────────────────────────────────────────── */
.proposals-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.proposals-toolbar h2 {
    margin: 0;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
}

.filter-check input {
    cursor: pointer;
}

/* ─── Create Proposal Button ──────────────────────────────────────────────── */
.btn-create {
    white-space: nowrap;
}

/* ─── Section Action Row (My Account) ────────────────────────────────────── */
.section-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-action-row h3 {
    margin: 0;
}

/* ─── Create Proposal Modal ───────────────────────────────────────────────── */
.modal-wide {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--color3);
    opacity: 0.6;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    transition: opacity 0.2s, background 0.2s;
}

.modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* ─── Proposal Profile ────────────────────────────────────────────────────── */
#proposal-profile {
    background: linear-gradient(135deg, var(--background1), var(--background2));
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.profile-header {
    margin-bottom: 1rem;
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.profile-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin: 0;
    color: var(--color1);
}

.profile-meta {
    font-size: 0.85rem;
    color: var(--color3);
}

.profile-tagline {
    margin: 0.4rem 0 0.75rem;
    font-size: 1rem;
    color: var(--color3);
    opacity: 0.85;
    font-style: italic;
}

.profile-progress {
    margin-bottom: 0.5rem;
}

.profile-funding {
    margin-bottom: 1rem;
}

.profile-desc {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.profile-desc p {
    margin: 0 0 0.5rem;
    color: var(--color3);
}

.profile-action {
    margin-bottom: 1rem;
    max-width: 460px;
}

.profile-action .input-inline {
    flex: none;
    width: 160px;
}

.edit-section {
    margin-top: 1rem;
}

/* ─── Back Button ─────────────────────────────────────────────────────────── */
.btn-back {
    background: var(--accent1);
    color: var(--accent2);
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.btn-back:hover { opacity: 0.85; }

/* ─── Description Markdown ────────────────────────────────────────────────── */
.desc-h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color1);
    font-size: 1.1rem;
    margin: 1rem 0 0.4rem;
}

.desc-h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color2);
    font-size: 0.95rem;
    margin: 0.75rem 0 0.3rem;
}

.desc-h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color3);
    font-size: 0.82rem;
    margin: 0.6rem 0 0.25rem;
}

.desc-ul, .desc-ol {
    margin: 0.25rem 0 0.25rem 1.25rem;
    padding: 0;
    color: var(--color3);
}

.desc-ul + .desc-ul,
.desc-ol + .desc-ol {
    margin-top: 0;
}

.desc-ul li, .desc-ol li {
    margin-bottom: 0.15rem;
}

.desc-hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 1rem 0;
}

.desc-img {
    max-width: 100%;
    border-radius: 6px;
    margin: 0.5rem 0;
    display: block;
}

/* ─── About Page ──────────────────────────────────────────────────────────── */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.about-profile {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.pixilmini-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #00bfff;
    text-decoration: none;
    transition: color 0.2s;
}

.pixilmini-link:hover {
    color: #ffffff;
}

.pixilmini-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 4px;
}

/* ─── About List ──────────────────────────────────────────────────────────── */
.about-list {
    margin: 0.5rem 0 1rem 1.25rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* ─── In-place Edit ───────────────────────────────────────────────────────── */
.edit-title-input {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.6);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.edit-title-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
}

.edit-action-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: center;
}

.edit-action-row .btn-back {
    margin-bottom: 0;
}

.btn-edit {
    background: var(--accent1);
    color: var(--accent2);
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
    display: inline-block;
}

.profile-edit-btn {
    align-self: center;
}

.btn-edit:hover { opacity: 0.85; }

/* ─── Supporters Leaderboard ──────────────────────────────────────────────── */
.supporters-section h3 {
    margin-bottom: 0.75rem;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.rank-trophy {
    font-size: 1.3rem;
    border-radius: 0;
    background: transparent;
    width: 28px;
    height: 28px;
}

.rank-gold    { background: #FFD700; color: #332200; }
.rank-silver  { background: #C0C0C0; color: #1a1a1a; }
.rank-copper  { background: #B87333; color: #ffffff; }
.rank-default { background: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.7); }

.leaderboard-name {
    flex: 1;
    font-weight: bold;
    font-size: 0.9rem;
}

.leaderboard-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #ffe080;
}

/* ─── Card & Profile Images ───────────────────────────────────────────────── */
.card-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    background-color: transparent;
    background-repeat: no-repeat;
}

.profile-image {
    width: 100%;
    height: 472px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: transparent;
    background-repeat: no-repeat;
}

.img-draggable {
    cursor: grab;
    user-select: none;
}
.img-draggable:active {
    cursor: grabbing;
}
.img-repositioning {
    outline: 2px solid var(--accent1);
    outline-offset: 2px;
    box-shadow: 0 0 10px var(--accent1);
}
#theme-preview-card .card-image {
    pointer-events: all;
}
#theme-preview-card .card-image.img-draggable {
    cursor: grab;
}
#theme-preview-card .card-image.img-draggable:active {
    cursor: grabbing;
}

.fit-btn {
    border: 1px solid var(--accent1);
    background: var(--accent1);
    color: #fff;
    opacity: 1;
}
.fit-btn.active {
    background: transparent;
    color: var(--color3);
    opacity: 0.7;
}

/* ─── Theme Editor ────────────────────────────────────────────────────────── */
.theme-editor {
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.bg-link-btn {
    position: absolute;
    right: -0.85rem;
    bottom: 0.15rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    opacity: 0.4;
    transition: opacity 0.15s;
    line-height: 1;
    z-index: 1;
}
.bg-link-btn:hover  { opacity: 0.75; }
.bg-link-btn.linked { opacity: 1; }

.theme-section-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--color3);
    margin-bottom: 0.5rem;
}

.theme-unlock-info {
    font-size: 0.75rem;
    color: var(--color3);
    opacity: 0.7;
    margin-right: 0.75rem;
}

.theme-editor-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.theme-fields {
    flex: 1;
    min-width: 240px;
    margin-top: 0;
}

.theme-image-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: var(--color3);
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.theme-image-input:focus {
    outline: none;
    border-color: var(--accent1);
    background: rgba(255, 255, 255, 0.18);
}

@keyframes unsaved-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
#img-unsaved,
#color-unsaved {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffaa00;
    animation: unsaved-pulse 1s ease-in-out infinite;
}

/* Theme editor image control buttons — reset margin-bottom so rows stay compact */
.theme-img-btn {
    margin-bottom: 0 !important;
    padding: 0.4rem 0.9rem;
}

/* SAVE button in theme image section */
.theme-save-btn {
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    transition: opacity 0.2s;
    padding: 0.8rem 2.5rem;
    margin-bottom: 0;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
}
.theme-save-btn:hover { opacity: 0.85; }

.theme-preview-wrap {
    flex: 0 0 324px;
    min-width: 300px;
    pointer-events: none;
    user-select: none;
}

.theme-preview-wrap .proposal-card {
    margin: 0;
    cursor: default;
}

.theme-locked input[type="color"] {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

.publish-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.publish-cost {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.theme-fields .form-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    margin-bottom: 0.75rem;
}

.theme-fields .form-row .form-group {
    flex: 0 0 44px;
    margin-bottom: 0;
}

.theme-fields .form-group label {
    font-size: 0.6rem;
    color: var(--color3);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 44px;
    margin-bottom: 0.2rem;
}

.theme-fields input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-sizing: border-box;
    display: block;
}

/* ─── Profile Nav Row ─────────────────────────────────────────────────────── */
.profile-nav-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.profile-nav-row .btn-back,
.profile-nav-row .btn-refresh {
    margin-bottom: 0;
}

.profile-nav-row .btn-refresh {
    margin-left: auto;
}

/* ─── Support Louie ───────────────────────────────────────────────────────── */
.support-louie-section {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.support-louie-section h3 {
    margin-top: 0;
}

/* ─── Image Placeholders ──────────────────────────────────────────────────── */
.card-image-placeholder {
    width: 100%;
    height: 140px;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
}

.profile-image-placeholder {
    width: 100%;
    height: 472px;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    box-sizing: border-box;
}

/* ─── Glow FX Animation ───────────────────────────────────────────────────── */
@keyframes glow-hue {
    0%   { filter: drop-shadow(0 0 6px var(--color1)); color: var(--color1); }
    33%  { filter: drop-shadow(0 0 10px var(--color2)); color: var(--color2); }
    66%  { filter: drop-shadow(0 0 8px var(--accent1)); color: var(--accent1); }
    100% { filter: drop-shadow(0 0 6px var(--color1)); color: var(--color1); }
}

.glow-fx {
    animation: glow-hue 9s ease-in-out infinite;
}

/* ─── GLORIOUS — Foil Card FX ─────────────────────────────────────────────── */
@keyframes foil-bg {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes foil-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes foil-border {
    0%, 100% { border-color: var(--accent1); box-shadow: 0 0 10px var(--accent1); }
    33%      { border-color: var(--color2);  box-shadow: 0 0 14px var(--color2);  }
    66%      { border-color: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
}

/* Card: animated gradient + cycling border glow */
.proposal-card.glorious {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--background1) 0%,
        var(--background2) 40%,
        var(--accent1)     50%,
        var(--background2) 60%,
        var(--background1) 100%
    );
    background-size: 300% 300%;
    animation: foil-bg 21s ease infinite, foil-border 12s ease-in-out infinite;
}

/* Shimmer sweep over the whole card */
.proposal-card.glorious::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 70%
    );
    background-size: 300% 100%;
    animation: foil-shimmer 9s linear infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Image containers: extra shimmer layer */
.glorious .card-image,
.glorious .profile-image {
    position: relative;
}

.glorious .card-image::after,
.glorious .profile-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 80%
    );
    background-size: 300% 100%;
    animation: foil-shimmer 6.6s linear infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Text glow — different rates per role */
.glorious .card-title,
.glorious .profile-title {
    animation: glow-hue 4.2s ease-in-out infinite;
}

.glorious .card-funding,
.glorious .profile-funding {
    animation: glow-hue 8.4s ease-in-out infinite;
}

.glorious .card-desc,
.glorious .profile-desc {
    animation: glow-hue 18s ease-in-out infinite;
}

/* Profile page: foil background on the whole panel */
#proposal-profile.glorious {
    background: linear-gradient(
        135deg,
        var(--background1) 0%,
        var(--background2) 40%,
        var(--accent1)     50%,
        var(--background2) 60%,
        var(--background1) 100%
    );
    background-size: 300% 300%;
    animation: foil-bg 30s ease infinite;
}


/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
    .testnet-banner { margin: 0; flex: none; width: 100%; box-sizing: border-box; }
    .tab-content { margin: 1rem 0.5rem; padding: 1.25rem; }
    .proposals-grid { grid-template-columns: 1fr; }
    .stats-row { justify-content: center; }
    .about-content { flex-direction: column; align-items: center; text-align: center; }
}

/* ─── NFT Reward Pools + Supporter Tiers ─────────────────────────────────── */
.nft-thumb { width:38px; height:38px; border-radius:4px; object-fit:cover; vertical-align:middle; margin:0 .4rem; }
.nft-thumb-placeholder { display:inline-block; width:38px; height:38px; border-radius:4px; background:rgba(255,255,255,0.1); text-align:center; line-height:38px; font-size:1.1rem; margin:0 .4rem; vertical-align:middle; }
.nft-name-tag { font-size:.75rem; color:var(--color3, #d0d0d0); margin-left:.3rem; }

.nft-hover-wrap { position:relative; display:inline-block; vertical-align:middle; }
.nft-hover-wrap:hover .nft-popup { display:block; }
.nft-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    background: #0a0f2e;
    border: 1px solid rgba(0,191,255,0.4);
    border-radius: 8px;
    padding: .8rem;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    pointer-events: none;
}
.nft-popup-img { width:100%; border-radius:5px; margin-bottom:.4rem; display:block; }
.nft-popup-name { font-weight:bold; font-size:.85rem; margin-bottom:.3rem; color:#fff; }
.nft-popup-row { font-size:.75rem; color:rgba(255,255,255,0.7); margin:.15rem 0; }
.tier-section { margin:.75rem 0; }
.tier-header { display:flex; align-items:center; gap:.5rem; margin-bottom:.4rem; flex-wrap:wrap; }

/* ─── Copyable code snippets ─────────────────────────────────────────────── */
.copyable {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: .9em;
    cursor: text;
    user-select: all;
}
.copyable:hover { border-color: rgba(255,255,255,0.35); }

/* ─── Image Palette ──────────────────────────────────────────────────────── */
.img-palette-wrap { margin-top: 0.4rem; }
.img-palette {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    align-items: center;
    scrollbar-width: thin;
}
.img-palette-add {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1.5px solid rgba(255,255,255,0.2);
    cursor: pointer;
    background-color: rgba(255,255,255,0.07);
    background-size: cover;
    background-position: center;
    font-size: 1.4rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.img-palette-add:hover { background-color: rgba(255,255,255,0.15); }
.img-palette-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1.5px solid rgba(255,255,255,0.2);
    cursor: pointer;
    background-color: rgba(255,255,255,0.07);
    background-size: cover;
    background-position: center;
}
.img-palette-thumb:hover { border-color: #7ecfff; outline: 2px solid #7ecfff44; }
.img-palette-thumb-wrap {
    position: relative;
    flex-shrink: 0;
}
.img-palette-thumb-x {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(200,0,0,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    display: none;
    z-index: 10;
}
.img-palette-thumb-wrap:hover .img-palette-thumb-x { display: block; }
.new-proposal-banner {
    background: rgba(255,200,0,0.15);
    border: 1px solid rgba(255,200,0,0.4);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.2rem;
    color: #ffe;
    font-size: 0.9rem;
}

/* ── Cheese Effect ───────────────────────────────────────────────────────────── */
.proposal-card.cheesy,
.my-item.cheesy {
    position: relative;
    padding-top: 30px !important;
    animation: cheese-glow 3s ease-in-out infinite alternate;
}

#proposal-profile.cheesy {
    position: relative;
    padding-top: 30px;
    animation: cheese-glow 3s ease-in-out infinite alternate;
}

@keyframes cheese-glow {
    from { box-shadow: 0 12px 40px 8px rgba(255, 236, 64, 0.3); }
    to   { box-shadow: 0 16px 60px 16px rgba(255, 236, 64, 0.5); }
}

/* SVG goo drip overlay */
.cheese-drip-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: visible;
    filter: url(#cheese-goo);
}
