:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: radial-gradient(circle at top right, #1e293b, #0f172a);
}

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

header {
    padding: 20px 0 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.streak-badge {
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fda4af;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Overview Card */
.overview-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.8s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#percent-label {
    font-size: 2.2rem;
    font-weight: 700;
}

.progress-text small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.budget-stats {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 1.2rem;
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    background: var(--glass-border);
}

/* Actions */
.action-section {
    margin-bottom: 24px;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: #003840;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

/* Grid layout */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-weight: 600;
}

.chart-container {
    height: 200px;
    display: flex;
    justify-content: center;
}

/* Expense List */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.expense-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: background 0.2s;
}

.expense-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.expense-info {
    display: flex;
    flex-direction: column;
}

.expense-info .category {
    font-weight: 600;
    font-size: 1rem;
}

.expense-info .date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.expense-amount {
    font-weight: 700;
    color: var(--primary);
}

.empty-state, .empty-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* Badges */
.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-item {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6ee7b7;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1e293b;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px);
    animation: modalIn 0.3s forwards;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@keyframes modalIn {
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

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

.btn-full {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #003840;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

/* Mobile responsive adjustments */
@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
    }
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
}
