:root {
    --primary: #6a11cb;
    --primary-light: #2575fc;
    --primary-dark: #3a0ca3;
    --background: #0a0a1a;
    --surface: #14142b;
    --on-surface: #ffffff;
    --on-surface-secondary: #d8d8ff;
    --success: #4caf50;
    --pending: #ff9800;
}

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

body {
    background: linear-gradient(135deg, var(--background) 0%, #1a1a3d 100%);
    color: var(--on-surface);
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(40px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(0px);
    }
    75% {
        opacity: 1;
        transform: scale(0.98);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Back button styles */
.back-button {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.back-button:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Bucket List Button */
.bucket-list-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(-45deg, #6a11cb, #2575fc, #6a11cb, #2575fc);
    background-size: 400% 400%;
    animation: 
        gradientAnimation 10s ease infinite,
        pulseScale 3s ease-in-out infinite;
}

.bucket-list-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.3);
}

.bucket-list-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #6a11cb, #2575fc, #6a11cb, #2575fc);
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientAnimation 8s ease infinite;
}

.bucket-list-button:hover::before {
    opacity: 1;
}

.bucket-list-button:active {
    transform: translateY(0);
    animation: none;
    background: linear-gradient(-45deg, #6a11cb, #2575fc);
}

.bucket-list-button::after {
    content: '→';
    margin-left: 8px;
    font-size: 1.1em;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.bucket-list-button:hover::after {
    transform: translateX(3px);
    opacity: 1;
}

/* Ensure the container doesn't overlap with the back button */
.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(20, 20, 40, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 33px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* Header Animations */
@keyframes headerPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(106, 17, 203, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 15px rgba(106, 17, 203, 0.8);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(106, 17, 203, 0.5);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(40px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(0px);
    }
    75% {
        opacity: 1;
        transform: scale(0.98);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    text-align: center;
    color: var(--on-surface);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-light), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headerPulse 3s ease-in-out infinite;
    display: inline-block;
    padding: 0 15px;
    color: transparent; /* Fix for text color */
}

.together-since {
    color: var(--on-surface-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(10px);
}

.counter {
    background: rgba(156, 39, 176, 0.1);
    animation: fadeInUp 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(10px);
    padding: 1rem;
    border-radius: 99px;
    margin: 1rem auto;
    max-width: 300px;
    border: 1px solid var(--primary-dark);
    backdrop-filter: blur(10px);
}

.counter span:first-child {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.counter span:last-child {
    font-size: 0.9rem;
    color: var(--on-surface-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--on-surface);
    font-size: 1.8rem;
}

.goals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Stagger the animation for each goal */
.goals .goal:nth-of-type(1) { 
    animation: fadeIn 0.6s ease-out 0.1s forwards;
animation-delay: 1s;
}
.goals .goal:nth-of-type(2) { 
    animation: fadeIn 0.6s ease-out 0.2s forwards;
animation-delay: 1.2s;
}
.goals .goal:nth-of-type(3) { 
    animation: fadeIn 0.6s ease-out 0.3s forwards;
animation-delay: 1.4s;
}
.goals .goal:nth-of-type(4) { 
    animation: fadeIn 0.6s ease-out 0.4s forwards;
animation-delay: 1.6s;
}
.goals .goal:nth-of-type(5) { 
    animation: fadeIn 0.6s ease-out 0.5s forwards;
animation-delay: 1.8s;
}
.goals .goal:nth-of-type(6) { 
    animation: fadeIn 0.6s ease-out 0.6s forwards;
animation-delay: 2s;
}
.goals .goal:nth-of-type(7) { 
    animation: fadeIn 0.6s ease-out 0.7s forwards;
animation-delay: 2.2s;
}
.goals .goal:nth-of-type(8) { 
    animation: fadeIn 0.6s ease-out 0.8s forwards;
animation-delay: 2.4s;
}
.goals .goal:nth-of-type(9) { 
    animation: fadeIn 0.6s ease-out 0.9s forwards;
animation-delay: 2.6s;
}
.goals .goal:nth-of-type(10) { 
    animation: fadeIn 0.6s ease-out 1.0s forwards;
animation-delay: 2.8s;
}
.goals .goal:nth-of-type(11) { 
    animation: fadeIn 0.6s ease-out 1.1s forwards;
animation-delay: 3s;
}
.goals .goal:nth-of-type(12) { 
    animation: fadeIn 0.6s ease-out 1.2s forwards;
animation-delay: 3.2s;
}
.goals .goal:nth-of-type(13) { 
    animation: fadeIn 0.6s ease-out 1.3s forwards;
animation-delay: 3.4s;
}
.goals .goal:nth-of-type(14) { 
    animation: fadeIn 0.6s ease-out 1.4s forwards;
animation-delay: 3.6s;
}
.goals .goal:nth-of-type(15) { 
    animation: fadeIn 0.6s ease-out 1.5s forwards;
animation-delay: 3.8s;
}
.goals .goal:nth-of-type(16) { 
    animation: fadeIn 0.6s ease-out 1.6s forwards;
animation-delay: 4s;
}
.goals .goal:nth-of-type(17) { 
    animation: fadeIn 0.6s ease-out 1.7s forwards;
animation-delay: 4.2s;
}
.goals .goal:nth-of-type(18) { 
    animation: fadeIn 0.6s ease-out 1.8s forwards;
animation-delay: 4.4s;
}
.goals .goal:nth-of-type(19) { 
    animation: fadeIn 0.6s ease-out 1.9s forwards;
animation-delay: 4.6s;
}
.goals .goal:nth-of-type(20) { 
    animation: fadeIn 0.6s ease-out 2.0s forwards;
animation-delay: 4.8s;
}
.goals .goal:nth-of-type(21) { 
    animation: fadeIn 0.6s ease-out 2.1s forwards;
animation-delay: 5s;
}
.goals .goal:nth-of-type(22) { 
    animation: fadeIn 0.6s ease-out 2.2s forwards;
animation-delay: 5.2s;
}
.goals .goal:nth-of-type(23) { 
    animation: fadeIn 0.6s ease-out 2.3s forwards;
animation-delay: 5.4s;
}
.goals .goal:nth-of-type(24) { 
    animation: fadeIn 0.6s ease-out 2.4s forwards;
animation-delay: 5.6s;
}
.goals .goal:nth-of-type(25) { 
    animation: fadeIn 0.6s ease-out 2.5s forwards;
animation-delay: 5.8s;
}
.goals .goal:nth-of-type(26) { 
    animation: fadeIn 0.6s ease-out 2.6s forwards;
animation-delay: 6s;
}
.goals .goal:nth-of-type(27) { 
    animation: fadeIn 0.6s ease-out 2.7s forwards;
animation-delay: 6.2s;
}
.goals .goal:nth-of-type(28) { 
    animation: fadeIn 0.6s ease-out 2.8s forwards;
animation-delay: 6.4s;
}
.goals .goal:nth-of-type(29) { 
    animation: fadeIn 0.6s ease-out 2.9s forwards;
animation-delay: 6.6s;
}

.goal {
    background: rgba(255, 255, 255, 0);
    border-radius: 99px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    opacity: 0;
    /* Animation is now handled by individual nth-child selectors */
}

.goal.achieved {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success);
}

.goal.pending {
    opacity: 0;
    /* Remove animation from here as it's handled by nth-child selectors */
}

.goal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--on-surface);
}

.goal p {
    color: var(--on-surface-secondary);
    font-size: 0.9rem;
}

.goal .date {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--on-surface-secondary);
}

.goal .status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal.achieved .status::after {
    content: '✓';
    color: var(--success);
    font-size: 16px;
    font-weight: bold;
}

.goal.pending .status {
    display: none;
}

@media (max-width: 600px) {
    .container {
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .milestones {
        grid-template-columns: 1fr;
    }
}
