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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

.logout-btn {
    background: none;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.account-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.user-details h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.user-details p {
    opacity: 0.8;
}

.credits-card, .transactions-card, .actions-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.credits-card h2, .transactions-card h2 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 20px;
}

.credits-display {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 16px;
}

.credit-item {
    text-align: center;
}

.credit-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1;
}

.credit-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

.credit-breakdown {
    flex: 1;
    padding-left: 30px;
    border-left: 1px solid #e5e7eb;
}

.credit-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.credit-row span:last-child {
    font-weight: 600;
    color: #374151;
}

.credits-info {
    font-size: 0.85rem;
    color: #9ca3af;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.tx-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tx-description {
    color: #374151;
    font-weight: 500;
}

.tx-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.tx-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.transaction.deduct .tx-amount {
    color: #dc2626;
}

.transaction.add .tx-amount {
    color: #059669;
}

.loading, .empty {
    color: #9ca3af;
    text-align: center;
    padding: 30px;
}

.actions-card {
    text-align: center;
}

.action-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.action-btn.secondary {
    background: white;
    color: #4f46e5;
    border: 2px solid #4f46e5;
}

.action-btn.secondary:hover {
    background: #f5f3ff;
    transform: translateY(-2px);
}

.actions-card {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .account-header {
        padding: 24px;
    }
    
    nav {
        gap: 12px;
    }
    
    nav a {
        font-size: 0.9rem;
    }
    
    .credits-card, .transactions-card, .actions-card {
        padding: 20px;
    }
    
    .credit-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }
    
    .credits-display {
        flex-direction: column;
        text-align: center;
    }
    
    .credit-breakdown {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 20px;
        width: 100%;
    }
    
    header {
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .account-header {
        padding: 20px;
        border-radius: 12px;
    }
    
    .user-details h1 {
        font-size: 1.3rem;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .transaction {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .tx-amount {
        align-self: flex-end;
    }
    
    .credits-card h2, .transactions-card h2 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .account-header {
        padding: 16px;
    }
    
    .credit-value {
        font-size: 2rem;
    }
    
    .action-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
