* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.private-key-section {
    margin-bottom: 30px;
}

.query-section {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.card-highlight {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border: 2px solid #667eea;
}

.key-icon {
    font-size: 2.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.coin-icon {
    width: 50px;
    height: 50px;
}

.card-header h2 {
    font-size: 1.8rem;
    color: #2d3748;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.address-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.address-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.address-input::placeholder {
    color: #a0aec0;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 120px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
    min-width: 60px;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.divider span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
}

.result {
    min-height: 60px;
    padding: 20px;
    border-radius: 12px;
    background: #f7fafc;
    display: none;
}

.result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.result.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.result.loading {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.balance-info {
    font-size: 1.1rem;
    color: #2d3748;
}

.balance-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
    display: block;
}

.usd-amount {
    font-size: 1.2rem;
    color: #718096;
    margin-top: 5px;
}

.multi-balance {
    display: grid;
    gap: 20px;
}

.balance-item {
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.balance-item h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-display {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 5px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.batch-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.batch-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.batch-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-stats {
    margin: 10px 0;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
    display: none;
}

.batch-stats.show {
    display: block;
}

.batch-summary {
    background: #e6f2ff;
    border-left: 4px solid #3182ce;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.batch-summary h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.summary-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.summary-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.batch-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.batch-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.batch-item-title {
    font-weight: 600;
    color: #2d3748;
}

.batch-item-balance {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

.batch-item.empty {
    border-left-color: #cbd5e0;
    opacity: 0.6;
}

.export-btn {
    margin-top: 15px;
    width: 100%;
}

.error-message {
    color: #dc3545;
    font-weight: 500;
}

.loading-message {
    color: #856404;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #856404;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
}

footer p {
    margin: 10px 0;
    opacity: 0.9;
}

.notice {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-header h2 {
        font-size: 1.4rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .coin-icon {
        width: 40px;
        height: 40px;
    }
}

