/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: #f5f5f0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 40px 20px;
}

main {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Panel Container */
.panel {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 32px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 4px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.panel:hover {
    border-color: #252525;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(184, 160, 74, 0.05);
    transform: translateY(-2px);
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: #f5f5f0;
}

h2 {
    font-size: 1.125rem;
    font-weight: 400;
    color: #b8a04a;
    margin-bottom: 12px;
}

h3 {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #f5f5f0;
    margin-bottom: 12px;
}

p {
    font-size: 0.9375rem;
    color: #666;
}

a {
    color: #b8a04a;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #d4c06a;
    border-bottom-color: #b8a04a;
}

/* Utilities */
.mono {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.875em;
    letter-spacing: -0.02em;
}

/* CA Bar */
.ca-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.ca-bar .label {
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ca-bar .address {
    color: #b8a04a;
}

/* Flow Text */
.flow-text {
    text-align: center;
    font-size: 0.875rem;
    color: #555;
    letter-spacing: 0.1em;
    padding: 8px 0;
}

/* Gold Header */
.gold-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 32px;
    border-bottom: 1px solid #151515;
}

.gold-return-center,
.spacer {
    flex: 1;
}

.spacer {
    display: flex;
    justify-content: flex-end;
}

.gold-price,
.token-info,
.gold-return-center {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gold-return-center {
    display: flex;
    /* Enable flex for inner alignment */
    align-items: flex-start;
    /* Align top */
    justify-content: flex-start;
    /* Align left */
    align-self: stretch;
    /* Stretch to fill height if needed */
    flex: 1;
    /* Spacer left */
    transform: translateY(-4px);
    /* Match the subtle lift of the right side */
}

.status-live {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-live .dot {
    width: 6px;
    height: 6px;
    background-color: #4a9e4a;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 158, 74, 0.6);
    animation: pulse 2s infinite;
}

.status-live .text {
    font-size: 0.625rem;
    color: #4a9e4a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.gold-price {
    align-items: center;
    /* Center content */
}

.token-info {
    align-items: flex-end;
    /* Right align content */
    flex: 1;
    /* Spacer right */
}

.gold-return-center .label {
    font-size: 0.6875rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gold-return-center .value {
    font-size: 1.375rem;
    color: #4a9e4a;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.gold-price .label {
    font-size: 0.6875rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gold-price .price {
    font-size: 2.25rem;
    font-weight: 300;
    color: #b8a04a;
    letter-spacing: -0.02em;
}

.gold-price .return {
    font-size: 0.875rem;
    font-weight: 400;
}

/* Token Info (Small Corner) */
.token-info {
    align-items: flex-end;
    /* Position absolutely to be truly in the corner if needed, 
       but flex-end + small size works well in the header flow */
    transform: translateY(-4px);
    /* Slight nudge up */
}

.token-info .label {
    font-size: 0.625rem;
    /* Smaller label */
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.token-info .price {
    font-size: 1.125rem;
    /* Much smaller price */
    font-weight: 400;
    color: #b8a04a;
    letter-spacing: -0.01em;
}

.token-info .return {
    font-size: 0.75rem;
    /* Smaller return */
    font-weight: 400;
}

.positive {
    color: #4a9e4a !important;
}

.negative {
    color: #9e4a4a !important;
}

/* Key Metrics */
.key-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: #080808;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #151515;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.metric:hover {
    background: rgba(184, 160, 74, 0.03);
}

.metric .label {
    font-size: 0.6875rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric .value {
    font-size: 1.375rem;
    color: #f5f5f0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.metric .subvalue {
    font-size: 0.75rem;
    color: #4a9e4a;
}

/* Flywheel Steps */
.flywheel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step {
    background: #080808;
    border: 1px solid #151515;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.step:hover {
    border-color: rgba(184, 160, 74, 0.2);
    background: #090909;
}

.step p {
    color: #888;
    font-size: 0.875rem;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.data-box {
    background: #080808;
    border: 1px solid #151515;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.data-box:hover {
    border-color: #1f1f1f;
}

.data-box h3 {
    color: #b8a04a;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #151515;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #0d0d0d;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row .label {
    font-size: 0.8125rem;
    color: #555;
}

.data-row .value {
    font-size: 0.8125rem;
    color: #f5f5f0;
    text-align: right;
}

.data-row.past-redeploys {
    flex-direction: column;
    gap: 8px;
}

.data-row.past-redeploys ul {
    list-style: none;
    margin-top: 4px;
}

.data-row.past-redeploys li {
    font-size: 0.8125rem;
    color: #666;
    padding: 3px 0;
}

/* Redeploy Countdown Module */
.redeploy-module {
    display: flex;
    flex-direction: column;
}

.countdown-section {
    margin-bottom: 20px;
}

.countdown-timer {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 1.25rem;
    color: #f5f5f0;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.countdown-value {
    font-weight: 400;
    min-width: 1.5em;
    text-align: right;
}

.countdown-unit {
    font-size: 0.75rem;
    color: #555;
    margin-right: 8px;
}

.countdown-unit:last-child {
    margin-right: 0;
}

.progress-bar {
    height: 2px;
    background: #151515;
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: rgba(184, 160, 74, 0.4);
    border-radius: 1px;
    transition: width 1s linear;
    width: 0%;
}

.estimate-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #0d0d0d;
    margin-bottom: 8px;
}

.estimate-section .label {
    font-size: 0.6875rem;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.estimate-value {
    font-size: 1rem;
    color: #888;
    font-weight: 300;
}

.rule-label {
    font-size: 0.6875rem;
    color: #3a3a3a;
    font-style: italic;
}

/* Transaction History */
.tx-history {
    background: #080808;
    border: 1px solid #151515;
    border-radius: 8px;
    padding: 20px;
}

.tx-history h2 {
    color: #f5f5f0;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px 8px;
    font-size: 0.8125rem;
    border-bottom: 1px solid #111;
}

th {
    color: #555;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
}

td {
    color: #ccc;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(184, 160, 74, 0.02);
}

/* FAQ */
.faq {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.qa {
    padding: 16px;
    background: #080808;
    border: 1px solid #151515;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.qa:hover {
    border-color: #1f1f1f;
}

.qa h3 {
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.qa p {
    color: #555;
    font-size: 0.8125rem;
}

/* Footer */
footer {
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

footer:hover {
    opacity: 1;
}

.socials {
    display: flex;
    gap: 12px;
}

.divider {
    color: #333;
}

.disclaimer {
    font-size: 0.75rem;
    color: #444;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .panel {
        padding: 24px;
        gap: 32px;
    }

    .flywheel,
    .data-grid,
    .faq {
        grid-template-columns: 1fr;
    }

    .key-metrics {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .metric {
        text-align: left;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    table {
        font-size: 0.75rem;
    }

    th,
    td {
        padding: 10px 6px;
    }

    .gold-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .gold-header .gold-return-center {
        align-self: center;
    }
}