* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.wallet-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.balance-card, .address-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.balance-card h3, .address-card h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.2rem;
}

.balance {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
    word-break: break-all;
}

.address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.lookup-section {
    grid-column: 1 / -1;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.lookup-section h2 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.5rem;
    text-align: center;
}

.lookup-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.lookup-card:last-child {
    margin-bottom: 0;
}

.lookup-card h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.2rem;
}

.send-section, .transactions-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.send-section h2, .transactions-section h2 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.transaction-item.sent {
    border-left: 4px solid #dc3545;
}

.transaction-item.received {
    border-left: 4px solid #28a745;
}

.transaction-txid {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #666;
    word-break: break-all;
}

.transaction-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

.transaction-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
}

.transaction-details h3 {
    margin-bottom: 20px;
    color: #555;
}

#transactionInfo {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-all;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

@media (max-width: 768px) {
    .wallet-info, .main-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}
