/* Main styles for Goblin Mining Co. - Steampunk Theme */

:root {
    /* Steampunk Goblin Color Palette */
    --primary-color: #cd7f32;      /* Bronze */
    --primary-dark: #8b5a2b;       /* Dark Bronze */
    --secondary-color: #39ff14;    /* Neon Green (goblin glow) */
    --accent-color: #b87333;       /* Copper */
    --brass: #d4af37;              /* Brass/Gold */
    --success-color: #39ff14;      /* Goblin Green */
    --danger-color: #dc3545;
    --dark-bg: #1a1510;            /* Dark Brown/Black */
    --darker-bg: #0f0d0a;          /* Darker Brown */
    --card-bg: #2a2218;            /* Warm Dark Brown */
    --card-border: #3d2f1e;        /* Brown border */
    --text-primary: #f5e6d3;       /* Warm White */
    --text-secondary: #a89780;     /* Tan/Beige */
    --rust: #8b4513;               /* Rusty color */
    --parchment: #d4c4a8;          /* Parchment */
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.gear-icon {
    font-size: 2.5rem;
    color: var(--brass);
    animation: spin 10s linear infinite;
}

.gear-icon:nth-child(3) {
    animation-direction: reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brass) 0%, var(--primary-color) 50%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(205, 127, 50, 0.3);
    letter-spacing: 3px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-top: 10px;
    font-style: italic;
}

/* Network Toggle */
.network-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.network-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.network-btn:hover {
    background: rgba(205, 127, 50, 0.1);
}

.network-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Lore Section */
.lore-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
    position: relative;
}

.lore-section::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    pointer-events: none;
    opacity: 0.3;
}

.lore-header {
    text-align: center;
}

.lore-title {
    font-size: 1.6rem;
    color: var(--brass);
    margin-bottom: 10px;
}

.lore-intro {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto 15px auto;
    line-height: 1.6;
    font-style: italic;
}

.lore-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.lore-section.expanded .lore-content {
    max-height: 1500px;
    opacity: 1;
    margin-top: 20px;
}

.lore-scroll {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid var(--brass);
}

.lore-paragraph {
    margin-bottom: 20px;
}

.lore-paragraph h3 {
    color: var(--brass);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.lore-paragraph p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.lore-paragraph a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.lore-paragraph a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.lore-quote {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--brass);
    border-radius: 8px;
    padding: 20px;
    font-style: italic;
    color: var(--parchment);
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
}

.quote-attribution {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Network Stats Section */
.network-stats-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
}

.section-title {
    text-align: center;
    color: var(--brass);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

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

@media (max-width: 768px) {
    .network-stats-grid {
        grid-template-columns: 1fr;
    }
}

.network-stat {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--card-border);
}

.network-stat .stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.network-stat .stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.network-stat .stat-compare {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.network-stat.goblin-stat {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.1);
}

.network-stat .goblin-value {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.top-pools {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.top-pools h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 15px;
}

.pool-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: normal;
}

.pools-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.pool-item.loading {
    color: var(--text-secondary);
    font-style: italic;
    border-left-color: var(--text-secondary);
}

.pool-name {
    font-weight: 600;
    color: var(--text-primary);
}

.pool-rank {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 10px;
}

.pool-blocks {
    color: var(--primary-color);
    font-weight: 600;
}

/* Explainer Section */
.explainer-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
}

.explainer-header {
    text-align: center;
}

.explainer-title {
    font-size: 1.6rem;
    color: var(--brass);
    margin-bottom: 10px;
}

.explainer-intro {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto 15px auto;
    line-height: 1.6;
}

.expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(205, 127, 50, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(205, 127, 50, 0.2);
}

.expand-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.explainer-section.expanded .expand-icon,
.lore-section.expanded .expand-icon {
    transform: rotate(180deg);
}

.explainer-section.expanded .expand-text::after {
    content: 'Hide Details';
}

.explainer-section.expanded .expand-text {
    font-size: 0;
}

.explainer-section.expanded .expand-text::after {
    font-size: 0.9rem;
}

.lore-section.expanded #lore-expand-btn .expand-text {
    font-size: 0;
}

.lore-section.expanded #lore-expand-btn .expand-text::after {
    content: 'Hide Manifesto';
    font-size: 0.9rem;
}

.explainer-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.explainer-section.expanded .explainer-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 25px;
}

/* 80-byte Header Breakdown */
.header-breakdown {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
}

.breakdown-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.header-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.header-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    min-width: 100px;
}

.header-field[data-bytes="32"] {
    flex: 1 1 180px;
    max-width: 220px;
}

.header-field[data-bytes="4"] {
    flex: 0 1 100px;
}

.header-field:hover {
    border-color: var(--primary-color);
    background: rgba(205, 127, 50, 0.1);
}

.header-field.nonce {
    border-color: var(--secondary-color);
    background: rgba(57, 255, 20, 0.1);
}

.header-field.nonce:hover {
    background: rgba(57, 255, 20, 0.2);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.field-bytes {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.header-field.nonce .field-bytes {
    color: var(--secondary-color);
}

.field-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
}

.field-explain {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

.header-formula {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(205, 127, 50, 0.1);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.header-formula code {
    font-size: 1rem;
    color: var(--brass);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.formula-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.examples-title {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.example-blocks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .example-blocks-grid {
        grid-template-columns: 1fr;
    }
}

.example-block-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid var(--card-border);
    transition: all 0.3s ease;
}

.example-block-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.example-block-card.featured {
    border-color: var(--brass);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.example-block-card.goblin-mined {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
}

.block-tag.goblin {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2ecc40 100%);
    color: var(--dark-bg);
    text-shadow: none;
}

.miner-badge.goblin-badge {
    background: var(--secondary-color);
    color: var(--dark-bg);
    font-weight: 700;
}

.block-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.block-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.block-tag {
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.block-tag.empty {
    background: var(--accent-color);
    color: white;
}

.block-tag.halving {
    background: linear-gradient(135deg, var(--brass) 0%, var(--primary-color) 100%);
    color: var(--dark-bg);
}

.block-card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.example-block-card .example-block {
    margin: 0;
    padding: 12px;
    border-left: none;
    border-radius: 8px;
}

.example-block-card .block-field {
    grid-template-columns: 85px 1fr;
    padding: 6px 0;
}

.example-block-card .field-value.highlight code {
    color: var(--secondary-color);
    font-weight: 600;
}

.example-block-card .block-field.result {
    margin: 8px -12px -12px -12px;
    padding: 10px 12px;
}

.example-block-card .field-value.hash code {
    font-size: 0.6rem;
    word-break: break-all;
}

.block-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.miner-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.reward {
    font-weight: 600;
    color: var(--success-color);
    font-size: 0.9rem;
}

.reward.featured {
    color: var(--brass);
    font-size: 1rem;
}

.explainer-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(205, 127, 50, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Ticket Section */
.ticket-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Status Section */
.status-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-panel {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
}

.status-panel h2 {
    color: var(--brass);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-hash {
    font-size: 0.75rem;
    font-family: monospace;
    word-break: break-all;
}

/* Block Info */
.block-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.block-info h3 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 15px;
}

.info-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.info-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row span:first-child {
    color: var(--text-secondary);
}

.hash-short {
    font-family: monospace;
    font-size: 0.7rem;
    word-break: break-all;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(205, 127, 50, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

/* Technical Panel */
.tech-panel {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
}

.tech-panel h3 {
    color: var(--brass);
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    text-align: center;
}

.tech-content {
    max-height: 400px;
    overflow-y: auto;
}

.tech-section {
    margin-bottom: 20px;
}

.tech-section:last-child {
    margin-bottom: 0;
}

.tech-section h4 {
    color: var(--brass);
    font-size: 1rem;
    margin-bottom: 10px;
}

.tech-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tech-section ul {
    list-style: none;
    padding-left: 0;
}

.tech-section li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 5px 0 5px 20px;
    position: relative;
}

.tech-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
}

.tech-section strong {
    color: var(--text-primary);
}

.tech-section code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
}

/* Example Block Display */
.example-block {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 3px solid var(--primary-color);
}

.block-field {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: start;
}

.block-field:last-child {
    border-bottom: none;
}

.block-field.result {
    background: rgba(205, 127, 50, 0.1);
    margin: 10px -15px -15px -15px;
    padding: 12px 15px;
    border-radius: 0 0 5px 5px;
    border-bottom: none;
}

.field-name {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.field-value {
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    font-size: 0.85rem;
    word-break: break-all;
}

.field-value.hash code {
    font-size: 0.7rem;
    display: block;
    line-height: 1.4;
}

.field-desc {
    grid-column: 2;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-style: italic;
}

.block-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--brass);
}

/* Tooltip styling */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 10px;
    color: var(--text-secondary);
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
}

.info-icon:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker-bg);
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    width: 280px;
    text-align: left;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--primary-color);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Adjust tooltip position for items near edges */
.stat-item:nth-child(odd)[data-tooltip]::after {
    left: 0;
    transform: translateX(0);
}

.stat-item:nth-child(even)[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.info-row[data-tooltip]::after {
    left: 0;
    transform: translateX(0);
    width: 250px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

.footer-motto {
    font-style: italic;
    color: var(--brass);
    display: block;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 3px solid var(--brass);
}

.winner-modal h2 {
    font-size: 3rem;
    color: var(--secondary-color);
    animation: pulse 1s infinite;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.winner-hash {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--secondary-color);
}

.winner-nonce {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: var(--dark-bg);
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.active {
    transform: translateX(0);
}

/* Address Input */
.address-section {
    margin: 15px 0;
}

.address-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.address-section input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--card-border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
}

.address-section input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.address-section input.valid {
    border-color: var(--success-color);
}

.address-section input.invalid {
    border-color: var(--danger-color);
}

.address-feedback {
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 20px;
}

.address-feedback.valid {
    color: var(--success-color);
}

.address-feedback.invalid {
    color: var(--danger-color);
}

.foundation-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

.foundation-note a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.foundation-note a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

/* Nonce Input */
.nonce-section {
    margin: 15px 0;
}

.nonce-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.nonce-section input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--card-border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--secondary-color);
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
}

.nonce-section input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.nonce-section input::placeholder {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.nonce-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

/* Auto-Mine Section */
.auto-mine-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.auto-mine-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: var(--card-border);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.toggle-label input:checked + .toggle-slider {
    background: var(--secondary-color);
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: var(--dark-bg);
}

.toggle-text {
    color: var(--text-primary);
    font-weight: 600;
}

.toggle-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Mining animation */
.mining-active .claim-header {
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px var(--secondary-color); }
    to { box-shadow: 0 0 20px var(--secondary-color); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}
