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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --success: #4CAF50;
    --danger: #f44336;
    --bg-light: #f5f7fa;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.logo p {
    color: var(--text-light);
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.btn-logout:hover {
    background: #d32f2f;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.success-message {
    background: #e8f5e9;
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Dashboard */
.dashboard-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.dashboard-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.dashboard-nav .btn {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.balance-amount {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    background: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    word-break: break-all;
    margin: 15px 0;
}

.btn-copy {
    background: #607D8B;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    margin-top: 10px;
}

/* Transactions */
.transactions-list {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.transaction-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-amount {
    font-weight: bold;
    color: var(--success);
    font-size: 1.1em;
}

.transaction-from {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--text-light);
    margin-top: 5px;
}

.transaction-date {
    font-size: 0.85em;
    color: var(--text-light);
}

.transaction-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9em;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav {
        flex-direction: column;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
