/* Base styles and variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --card-bg: #fff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Sections */
.wallet-section, .faucet-section, .contract-info {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #2980b9;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: #27ae60;
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Meta-transaction section */
.request-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-tx-section {
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: #e8f4fc;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.meta-tx-info {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Status indicators */
.status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.not-connected {
    background-color: var(--error-color);
    color: white;
}

.connected {
    background-color: var(--success-color);
    color: white;
}

.address-display {
    font-family: monospace;
    padding: 0.5rem;
    background-color: #f1f1f1;
    border-radius: 4px;
    word-break: break-all;
    margin-top: 1rem;
}

/* Balance display */
.balance-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f1f1f1;
    border-radius: 4px;
}

.balance-item {
    margin-bottom: 0.5rem;
}

.balance-label {
    font-weight: bold;
}

.balance-value {
    font-family: monospace;
}

/* Contract info */
.info-item {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.info-label {
    font-weight: bold;
    display: inline-block;
    width: 150px;
}

.info-value {
    font-family: monospace;
    word-break: break-all;
    margin-right: 10px;
}

.verification-status {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

.verification-status a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 5px;
}

.verification-status a:hover {
    text-decoration: underline;
}

.verified {
    color: var(--success-color);
}

.unverified {
    color: var(--warning-color);
}

/* Transaction status */
.transaction-status {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cooldown info */
.cooldown-info {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #f8f4e5;
    border-left: 4px solid var(--warning-color);
    border-radius: 4px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: #666;
    font-size: 0.9rem;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .info-label {
        width: 120px;
    }
}
