/* Terminal/Retro Computer Styling */
body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    background: #0a0a0a;
    color: #00ff00;
    min-height: 100vh;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.terminal-container {
    background: #1a1a1a;
    border: 1px solid #4a4a4a;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin: 20px auto;
    max-width: 1200px;
}

.terminal-header {
    background: #2d2d2d;
    padding: 12px 16px;
    border-bottom: 1px solid #4a4a4a;
    font-size: 12px;
    display: flex;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.terminal-button {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.terminal-button.close { background: #ff5f57; }
.terminal-button.minimize { background: #febc2e; }
.terminal-button.maximize { background: #28ca42; }

.terminal-title {
    color: #ccc;
    font-size: 11px;
}

.terminal-content {
    padding: 20px;
}

.terminal-prompt {
    color: #00ff00;
    margin-bottom: 20px;
    font-size: 14px;
}

.prompt-line {
    margin-bottom: 5px;
}

.prompt-user {
    color: #00ff00;
}

.prompt-path {
    color: #87ceeb;
}

.prompt-symbol {
    color: #ffffff;
}

.ascii-header {
    color: #00ff00;
    text-align: center;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.1;
    white-space: pre;
}

.info-box {
    background: #2a2a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0 auto 25px auto;
    max-width: 600px;
    color: #ffff00;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

.info-box strong {
    color: #ffffff;
}

.table-note {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-top: 15px;
    padding: 8px;
}

.table-note strong {
    color: #ffff00;
}

/* Table Container */
.table-responsive {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

/* Table Styling */
.table {
    background: transparent;
    color: #00ff00;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
    width: auto;
    max-width: 1000px;
}

.table th {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 12px 16px;
    font-weight: bold;
    text-align: center;
    font-size: 15px;
}

.table td {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 10px 16px;
    vertical-align: middle;
    font-size: 16px;
    text-align: center;
}

/* Special column styling - New order: Name, Spending, Wealth, Source */
.table th:nth-child(1), .table td:nth-child(1) { /* Name */
    text-align: left;
    width: 200px;
}

.table th:nth-child(2), .table td:nth-child(2) { /* Spending - most important */
    text-align: center;
    width: 250px;
    background: #2a2a1a !important; /* Subtle yellow-tinted background */
}

.table th:nth-child(2) { /* Spending header */
    background: #3a3a2a !important;
    color: #ffff00 !important;
    font-weight: bold;
    text-transform: uppercase;
}

.table th:nth-child(3), .table td:nth-child(3) { /* Wealth */
    text-align: center;
    width: 150px;
}

.table th:nth-child(4), .table td:nth-child(4) { /* Source */
    text-align: left;
    width: 220px;
}

.table tbody tr:hover td {
    background: #2a2a2a;
    color: #ffffff;
}

/* Progress Bar Styling */
.wealth-bar {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00ff00;
    white-space: nowrap;
}

.wealth-bar-filled {
    color: #ffff00;
}

.wealth-bar-empty {
    color: #333;
}

/* Emoji and Special Elements */
.rank-cell {
    color: #87ceeb;
    font-weight: bold;
}

.name-cell {
    color: #ffffff;
    font-weight: bold;
}

.source-cell {
    color: #ffa500;
}

.wealth-cell {
    color: #ffff00;
    font-weight: bold;
}

.years-cell {
    color: #ffff00 !important;
    font-weight: bold;
    font-size: 18px !important;
    text-shadow: 0 0 3px #ffff00;
}

/* Footer */
footer {
    color: #666;
    font-size: 12px;
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

footer a {
    color: #00ff00;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Loading Animation */
.loading {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Mobile Responsiveness - Optimized for perfect mobile experience */
@media (max-width: 768px) {
    .terminal-container {
        margin: 5px;
        border-radius: 4px;
    }
    
    .terminal-content {
        padding: 12px;
    }
    
    .ascii-header {
        font-size: 6px;
        line-height: 1.0;
        margin-bottom: 15px;
    }
    
    .info-box {
        font-size: 13px;
        padding: 10px 12px;
        margin-bottom: 20px;
    }
    
    /* Mobile-first table layout - prioritize readability */
    .table {
        width: 100%;
        font-size: 15px; /* Larger base font for mobile */
    }
    
    /* Show only essential columns: Name, Spending, Wealth */
    .table th:nth-child(4), .table td:nth-child(4) { /* Source - hide on mobile */
        display: none;
    }
    
    /* Mobile column widths - optimized for readability */
    .table th:nth-child(1), .table td:nth-child(1) { /* Name */
        width: 40%;
        text-align: left;
        font-size: 15px;
        padding: 12px 8px;
    }
    
    .table th:nth-child(2), .table td:nth-child(2) { /* Spending - HERO column */
        width: 35%;
        text-align: center;
        font-size: 16px !important;
        font-weight: bold;
        padding: 12px 8px;
    }
    
    .table th:nth-child(3), .table td:nth-child(3) { /* Wealth */
        width: 25%;
        text-align: center;
        font-size: 14px; /* Same size as base, not smaller */
        padding: 12px 8px;
    }
    
    /* Mobile header styling */
    .table th {
        font-size: 13px;
        padding: 10px 8px;
        line-height: 1.2;
    }
    
    /* Ensure spending column stands out on mobile */
    .table th:nth-child(2) {
        font-size: 12px !important;
        text-transform: uppercase;
    }
    
    /* Larger touch targets and better spacing */
    .table tbody tr {
        border-bottom: 2px solid #333;
    }
    
    .table tbody tr:hover td {
        background: #2a2a2a;
    }
    
    /* Mobile footer adjustments */
    .table-note {
        font-size: 11px;
        margin-top: 20px;
        padding: 12px 8px;
    }
    
    footer {
        font-size: 11px;
        padding: 15px 8px;
    }
}