:root {
    /* CRT Matrix Theme */
    --crt-green: #00ff41;
    --crt-green-bright: #39ff14;
    --crt-green-dim: #0a3d0c;
    --crt-bg: #0a0a0a;
    --crt-text: #00ff41;
    --crt-text-dim: #1a5c1a;

    /* Legacy mappings for compatibility */
    --whisky-amber: var(--crt-green);
    --whisky-gold: var(--crt-green-bright);
    --aged-bourbon: var(--crt-green-dim);
    --dark-mahogany: var(--crt-bg);
    --wheat-text: var(--crt-text);
}

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

body {
    background: var(--crt-bg);
    color: var(--crt-text);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

/* CRT scanline effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 9999;
}

/* Container card style */
.container {
    max-width: 500px;
    width: 100%;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid var(--crt-green);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.15), inset 0 0 60px rgba(0, 255, 65, 0.03);
}

.container.wide {
    max-width: 1200px;
}

/* Typography */
h1 {
    color: var(--crt-green-bright);
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 0.5rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.8), 0 0 20px rgba(57, 255, 20, 0.4);
    letter-spacing: 0.05em;
}

h2 {
    color: var(--crt-green-bright);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.tagline, .subtitle {
    color: var(--crt-green);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    text-align: center;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Form elements */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--wheat-text);
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--crt-green);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--crt-green);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--crt-green-bright);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

input[type="text"]::placeholder, textarea::placeholder {
    color: var(--crt-text-dim);
    text-shadow: none;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-primary {
    background: var(--crt-green);
    color: var(--crt-bg);
    width: 100%;
    text-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
    background: var(--crt-green-bright);
}

.btn-secondary {
    background: transparent;
    color: var(--crt-green);
    border: 1px solid var(--crt-green);
}

.btn-secondary:hover {
    border-color: var(--crt-green-bright);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    color: var(--crt-green-bright);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

/* Status messages */
.status {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: var(--crt-green-bright);
    min-height: 20px;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

.status.error {
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.6);
}

/* Instructions box */
.instructions {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--crt-text-dim);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.instructions strong {
    color: var(--crt-green);
}

.instructions ol, .instructions ul {
    margin-left: 20px;
    margin-top: 10px;
}

.instructions li {
    margin-bottom: 6px;
}

.instructions code {
    background: rgba(0, 255, 65, 0.1);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.8rem;
    color: var(--crt-green-bright);
    border: 1px solid rgba(0, 255, 65, 0.2);
}

/* Cards (for index page grid) */
.pool-card, .tool-card {
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid var(--crt-green);
    border-radius: 2px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--crt-text);
    display: flex;
    flex-direction: column;
}

.pool-card:hover:not(.coming-soon), .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    border-color: var(--crt-green-bright);
}

.pool-card {
    min-height: 200px;
}

.tool-card {
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.pool-name, .tool-name {
    color: var(--crt-green-bright);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

.pool-name {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
}

.tool-name {
    font-size: 1.2rem;
}

.pool-algo {
    font-size: 0.9rem;
    margin-bottom: auto;
    padding-bottom: 1rem;
    color: var(--crt-green);
}

.tool-desc {
    font-size: 0.85rem;
    color: var(--crt-text-dim);
}

.pool-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 65, 0.3);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    color: var(--crt-green-bright);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.stat-label {
    color: var(--crt-text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.coming-soon {
    opacity: 0.5;
    pointer-events: none;
}

/* Section titles */
.section-title {
    color: var(--crt-green);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

/* Grids */
.pools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 40px;
    }
    
    .container {
        padding: 1.25rem;
    }
    
    .pools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pool-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .stat-label {
        font-size: 0.65rem;
    }

    .pool-stats {
        gap: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
    }
}

/* ============================================
   P2Pool Observer Specific Styles
   ============================================ */

/* Body adjustments for observer pages */
body.dark {
    display: block;
    justify-content: flex-start;
    padding-bottom: 80px;
}

/* Links */
a, a:hover, a:visited, a:link, a:active {
    text-decoration: underline dotted rgba(0, 255, 65, 0.5);
    color: var(--crt-green);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--crt-green-bright);
}

/* Layout helpers */
.center {
    margin-left: auto;
    margin-right: auto;
    width: 96%;
}

.content {
    margin-top: 15px;
    margin-bottom: 30px;
}

.mono {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Navigation */
.nav-item {
    color: var(--crt-text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item:hover, .nav-item.active {
    color: var(--crt-green-bright);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

/* Stats Grid - Observer dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(0, 20, 0, 0.6);
    border-radius: 2px;
    padding: 1.5rem;
    text-align: center;
    border-left: 4px solid var(--crt-green);
    box-shadow: inset 0 0 30px rgba(0, 255, 65, 0.03);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

.stat-card h3 {
    color: var(--crt-green);
    margin-bottom: 0.5rem;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--crt-green-bright);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.stat-card .subtitle {
    font-size: 11px;
    color: var(--crt-green);
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Address Input Section */
.address-section {
    background: rgba(0, 20, 0, 0.4);
    border-radius: 2px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.address-input {
    width: 100%;
    max-width: 900px;
    padding: 12px 16px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--crt-green);
    border-radius: 2px;
    color: var(--crt-green);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.address-input:focus {
    outline: none;
    border-color: var(--crt-green-bright);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.address-input::placeholder {
    color: var(--crt-text-dim);
    text-shadow: none;
}

/* Blocks Section */
.blocks-section {
    background: rgba(0, 20, 0, 0.4);
    border-radius: 2px;
    padding: 2rem;
    box-shadow: inset 0 0 30px rgba(0, 255, 65, 0.03);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgba(0, 20, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 65, 0.15);
    font-size: 14px;
}

.data-table th {
    background: rgba(0, 255, 65, 0.1);
    font-size: 11px;
    font-weight: 500;
    color: var(--crt-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background: rgba(0, 255, 65, 0.05);
}

.data-table a {
    color: var(--crt-green);
}

.data-table a:hover {
    color: var(--crt-green-bright);
}

.miner-address {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
}

/* Loading & Error States */
.loading {
    text-align: center;
    color: var(--crt-text-dim);
    font-style: italic;
    padding: 2rem;
}

.error {
    background: rgba(255, 0, 0, 0.2);
    color: #ff3333;
    padding: 1rem;
    border-radius: 2px;
    margin: 1rem 0;
    text-align: center;
    border: 1px solid #ff3333;
}

/* Code blocks */
code, pre {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
    color: var(--crt-green-bright);
}

pre {
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

/* Highlighted values */
.value-highlight {
    color: var(--crt-green-bright);
    font-weight: 700;
}

/* Status indicators */
.status-good {
    color: var(--crt-green-bright);
}

.status-warning {
    color: #ffaa00;
}

.status-error {
    color: #ff3333;
}

/* Info card */
.info-card {
    background: rgba(0, 20, 0, 0.6);
    border-radius: 2px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--crt-green);
}

/* Responsive for observer pages */
@media all and (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem;
        font-size: 12px;
    }

    .miner-address {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }
}

@media all and (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        background: rgba(0, 255, 65, 0.05);
        border-radius: 2px;
        padding: 0.75rem;
        border: 1px solid rgba(0, 255, 65, 0.2);
    }

    .data-table tbody td {
        display: flex;
        text-align: left;
        padding: 0.25rem 0;
        border: none;
    }

    .data-table tbody td:before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--crt-green);
        margin-right: 0.5rem;
        min-width: 80px;
    }
}

