:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --accent-color: #00f2fe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
}

/* Background Decoration */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: move 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary-color);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #7303c0;
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 100px) scale(1.2);
    }
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

header {
    margin-bottom: 20px;
}

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

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.icon-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    transform: rotate(-180deg);
}

header p {
    font-size: 0.9rem;
    opacity: 0.7;
    text-align: center;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.tracker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

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

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.8s ease-in-out;
    stroke: url(#gradient);
    /* We'll add this in JS or HTML later if needed, using simple color for now */
}

.progress-text {
    position: absolute;
    text-align: center;
}

.progress-text #current-amount {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.progress-text .unit {
    font-size: 1.2rem;
    opacity: 0.8;
}

.progress-text .goal {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.6;
}

.stats {
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

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

.stat-item p {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: uppercase;
    margin-top: 3px;
}

.border-left {
    border-left: 1px solid var(--glass-border);
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.controls .custom-btn {
    grid-column: span 2;
}

.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 15px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.95);
}

.primary {
    background: var(--primary-color);
    border: none;
    color: #000;
}

.primary:hover {
    background: var(--accent-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions .btn {
    flex: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .progress-container {
        width: 180px;
        height: 180px;
    }

    .progress-ring {
        width: 180px;
        height: 180px;
    }

    .progress-text #current-amount {
        font-size: 2.5rem;
    }
}