* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

body {
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

body {
    background-color: #121212;
    background-image: radial-gradient(#2a2a2a 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

/* --- 2. Main Card Container --- */
.card {
    background-color: #1c1c1e; /* Dark Apple-like grey */
    width: 420px;
    border-radius: 24px;
    padding: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        /* Subtle border */ 0 20px 40px rgba(0, 0, 0, 0.4); /* Deep shadow */
    position: relative;
    overflow: hidden;
}

/* --- 3. Header Section --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.header-content {
    display: flex;
    gap: 16px;
}

.text-group {
    flex: 1;
    min-width: 0; /* allow flex item to shrink and wrap text properly */
}

/* Icon Container with subtle 3D styling */
.icon-box {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.icon-box svg {
    width: 24px;
    height: 24px;
    stroke: #e0e0e0;
}

.text-group h2 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.text-group p {
    font-size: 13px;
    color: #888888;
    overflow-wrap: break-word;
    hyphens: auto;
}

.menu-wrapper {
    position: relative;
}

.menu-dots {
    color: #666;
    font-size: 20px;
    cursor: pointer;
    line-height: 0.5;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-dots:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* --- Popup Menu --- */
.popup-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

.popup-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.popup-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.popup-item svg {
    width: 14px;
    height: 14px;
    stroke: #34d399;
    flex-shrink: 0;
}

/* --- 4. Progress Sections --- */
.progress-section {
    margin-bottom: 20px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
    font-size: 14px;
}

.label {
    color: #888888;
    font-weight: 500;
}

.stats-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.percentage-change {
    font-size: 13px;
    font-weight: 600;
}

.percentage-change.green {
    color: #4ade80;
}

.total-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* --- 5. Pill Progress Bar Logic --- */
.pill-bar {
    display: flex;
    gap: 3px; /* Space between pills */
    height: 24px;
    width: 100%;
}

.pill {
    flex: 1;
    background-color: #2c2c2e; /* Inactive color */
    border-radius: 4px; 
    height: 100%;
    transition: background 0.3s ease;
}

/* Green Theme Pills */
.pill.filled-green {
    background-color: #6ee7b7; /* Fallback */
    /* Gradient matching the image */
    background-image: linear-gradient(180deg, #6ee7b7 0%, #34d399 100%);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

/* Blue Theme Pills */
.pill.filled-blue {
    background-color: #93c5fd; /* Fallback */
    background-image: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

/* --- 6. Footer Alert --- */
.footer-alert {
    margin-top: 24px;
    background-color: rgba(6, 78, 59, 0.4); /* Dark translucent green */
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #34d399; /* Bright green text */
}

.footer-alert p {
    font-size: 13px;
    font-weight: 500;
}

.footer-alert svg {
    width: 16px;
    height: 16px;
    stroke: #34d399;
}

/* CTA link styles for footer */
.footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    will-change: transform, box-shadow;
}

.footer-cta:hover,
.footer-cta:focus {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.12);
    background-color: rgba(6, 78, 59, 0.6);
    outline: none;
}

.footer-cta:active {
    transform: translateY(-1px);
}

.footer-cta:focus-visible {
    box-shadow: 0 0 0 4px rgba(52,211,153,0.12);
}
