:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #6366f1;
    --bg-dark: #0f172a;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s infinite;
}

@keyframes move {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 100px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.setup-card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.setup-card h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.error-msg {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.9rem;
    height: 1.2rem;
}

.hidden {
    display: none;
}

/* Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* Grid Styles */
.savings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 1rem 0;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.day-cell:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.day-cell.completed {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.day-cell.completed .day-amount,
.day-cell.completed .day-label {
    color: white;
}

.day-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.day-amount {
    font-size: 0.9rem;
    font-weight: 600;
}

.day-check {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.day-cell.completed .day-check {
    opacity: 1;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2.5rem;
    }
    .container {
        padding: 1rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}
