@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&display=swap');

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    color: #00ff41;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

/* CRT 掃描線效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        transparent 50%,
        rgba(0, 255, 65, 0.03) 50%,
        rgba(0, 255, 65, 0.03) 51%,
        transparent 51%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 0.1s linear infinite;
}

/* CRT 螢光效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 999;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    98% { opacity: 0.95; }
}

.container {
    max-width: 1000px;
    width: 90%;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff41;
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.5),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
    padding: 30px;
    margin: 20px auto;
    animation: flicker 3s infinite;
    position: relative;
    z-index: 1;
}

h1 {
    color: #00ff41;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.balance-card {
    background: rgba(0, 20, 0, 0.8);
    color: #00ff41;
    padding: 20px;
    border: 1px solid #00ff41;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 
        0 0 15px rgba(0, 255, 65, 0.3),
        inset 0 0 15px rgba(0, 255, 65, 0.1);
}

.balance-amount {
    font-size: 2.5em;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 0 0 15px rgba(0, 255, 65, 1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 15px rgba(0, 255, 65, 1); }
    to { text-shadow: 0 0 25px rgba(0, 255, 65, 1), 0 0 35px rgba(0, 255, 65, 0.8); }
}

.balance-label {
    font-size: 1.1em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transactions-section {
    margin-top: 30px;
}

.transaction-item {
    background: rgba(0, 20, 0, 0.6);
    border-left: 3px solid #00ff41;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 255, 65, 0.3);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}

.transaction-in {
    border-left-color: #00ff41;
    background: rgba(0, 30, 0, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.transaction-out {
    border-left-color: #ff4141;
    background: rgba(30, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(255, 65, 65, 0.2);
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transaction-in .transaction-type {
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
}

.transaction-out .transaction-type {
    color: #ff4141;
    text-shadow: 0 0 5px rgba(255, 65, 65, 0.8);
}

.transaction-amount {
    font-size: 1.2em;
    font-weight: 700;
    color: #00ff41;
}

.transaction-hash {
    font-size: 0.8em;
    color: rgba(0, 255, 65, 0.7);
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
}

.loading {
    text-align: center;
    color: #00ff41;
    font-style: italic;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.error {
    color: #ff4141;
    text-align: center;
    padding: 20px;
    background: rgba(30, 0, 0, 0.8);
    border: 1px solid #ff4141;
    box-shadow: 0 0 10px rgba(255, 65, 65, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    background: rgba(0, 0, 0, 0.8);
    color: #00ff41;
    border: 1px solid #00ff41;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #00ff41;
    font-size: 0.9em;
    opacity: 0.8;
    text-align: center;
    margin: 10px 0;
}

h2 {
    color: #00ff41;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    padding-bottom: 10px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
    
    .balance-amount {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (min-height: 800px) {
    body {
        align-items: center;
    }
}