:root {
    --bg-deep: #05080f;
    --bg-slate: #0b1120;
    --bg-card: rgba(255, 255, 255, 0.02);
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(255, 255, 255, 0.1);
    
    --accent-blue: #22c55e;
    --accent-cyan: #10b981;
    --accent-indigo: #16a34a;
    --accent-success: #10b981;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: hidden;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* ANIMATED PRELOADER WITH LOGO                                                */
/* ──────────────────────────────────────────────────────────────────────────── */

@keyframes preloaderLogoPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.6)); }
}

@keyframes preloaderLogoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes preloaderRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes preloaderParticleFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

@keyframes preloaderTextFade {
    0%, 50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes preloaderBarFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-slate) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.8s ease-out;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.preloader-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: preloaderLogoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
}

.preloader-logo-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: preloaderRingSpin 3s linear infinite;
}

.preloader-logo-ring::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: preloaderRingSpin 2s linear infinite reverse;
}

.preloader-logo-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.preloader-bar-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border-highlight);
}

.preloader-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-cyan));
    background-size: 200% 100%;
    border-radius: 100px;
    animation: preloaderBarFill 2.5s ease-out forwards;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.preloader-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    animation: preloaderTextFade 1.5s ease-in-out infinite;
    text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* LOGO STYLING - SIDEBAR & HEADER                                              */
/* ──────────────────────────────────────────────────────────────────────────── */

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-main);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    margin: 0 -1rem;
    letter-spacing: -0.02em;
}

.logo::before {
    content: "";
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-block;
    background: url("../logo.png") center 28% / 150px auto no-repeat;
    border-radius: 10px;
    filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.36));
}

.logo:hover {
    transform: scale(1.05);
    background: rgba(16, 185, 129, 0.1);
}

.logo-with-image {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
    transition: all 0.3s ease;
}

.logo:hover .logo-image {
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6));
    transform: scale(1.1);
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.logo-text span {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* Atmospheric Layer */
.goals-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at top right, #0f172a 0%, var(--bg-deep) 70%);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.goals-overview-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: -0.5rem 0 1.5rem;
}

.goal-overview-card {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.goal-overview-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #10b981;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.22);
    font-size: 1.25rem;
}

.goal-overview-label {
    display: block;
    margin-bottom: 0.22rem;
    color: rgba(255,255,255,0.45);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.goal-overview-card strong {
    display: block;
    min-width: 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goals-title h1 {
    font-size: 3rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.goals-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.btn-primary {
    background: #fff;
    color: var(--bg-deep);
    border: none;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.15);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

/* Layout Grid */
.goals-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
}

/* Current Goals Sidebar */
.active-goals-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.goal-card:hover, .goal-card.active {
    border-color: var(--accent-cyan);
    background: rgba(16, 185, 129, 0.05);
}

.goal-card.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-cyan);
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.goal-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-indigo);
}

.goal-card h3 {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 400;
}

.goal-progress {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    margin-bottom: 0.5rem;
}

.goal-progress-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 100px;
}

.goal-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* SMART Goal Planner Area */
.planner-area {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    padding: 3rem;
    backdrop-filter: blur(20px);
}

.planner-header {
    margin-bottom: 3rem;
}

#view-create-goal {
    scroll-margin-top: 92px;
}

.goals-body.is-creating-goal {
    grid-template-columns: minmax(0, 1fr);
}

.goals-body.is-creating-goal .goals-sidebar {
    display: none;
}

.goals-body.is-creating-goal .goals-main-panel {
    grid-column: 1 / -1;
}

.wizard-panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    padding: clamp(1.4rem, 3vw, 3rem);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.planner-header h2 {
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

/* Clean Floating Cards Milestones Layout */
.milestones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.milestone-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s, background 0.35s, opacity 0.35s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.milestone-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(34, 197, 94, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.milestone-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.08);
}

.milestone-card:hover::before {
    opacity: 1;
}

.milestone-card-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    background: transparent;
    border: 0;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.milestone-card-toggle:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: -4px;
}

.milestone-step-index {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border-highlight);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.milestone-toggle-main {
    min-width: 0;
    display: grid;
    gap: 0.35rem;
}

.milestone-toggle-main strong {
    display: block;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.milestone-toggle-icon {
    color: var(--text-muted);
    transition: transform 0.22s ease;
}

.milestone-card[data-open="true"] .milestone-toggle-icon {
    transform: rotate(180deg);
}

.milestone-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.4rem;
    position: relative;
    z-index: 2;
    transition: max-height 0.28s ease, padding 0.28s ease;
}

.milestone-card[data-open="true"] .milestone-details {
    max-height: 360px;
    padding: 0 1.4rem 1.35rem 4.85rem;
}

.milestone-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.milestone-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.milestone-card.completed .milestone-status-badge {
    color: var(--accent-cyan);
}

.milestone-card.active .milestone-status-badge {
    color: var(--accent-blue);
}

.milestone-card.pending .milestone-status-badge {
    color: var(--text-muted);
}

.milestone-card.completed {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.03);
}

.milestone-card.active {
    border-color: rgba(34, 197, 94, 0.25);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.075), rgba(16, 185, 129, 0.025));
    box-shadow: 0 0 0 1px rgba(34,197,94,0.08), 0 18px 42px rgba(0,0,0,0.28);
}

.milestone-card.active .milestone-step-index {
    color: #06130d;
    background: #bbf7d0;
    border-color: rgba(187,247,208,0.8);
}

.milestone-card.completed .milestone-step-index {
    color: #86efac;
    border-color: rgba(16,185,129,0.32);
    background: rgba(16,185,129,0.08);
}

.milestone-card.pending {
    opacity: 0.72;
}

.milestone-card h4 {
    font-size: 1.3rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.milestone-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.milestone-card p:last-child {
    margin-bottom: 0;
}

.btn-complete-milestone,
.goal-complete-action {
    background: linear-gradient(135deg, #f8fafc, #bbf7d0);
    color: #000;
    border: none;
    padding: 0.78rem 1.35rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 190px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.18);
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.btn-complete-milestone:hover,
.goal-complete-action:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.26);
    filter: brightness(1.04);
}

.btn-complete-milestone:disabled,
.goal-complete-action:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
}

.btn-complete-milestone .ph-spinner,
.btn-complete-milestone:disabled i,
.goal-complete-action .ph-spinner,
.goal-complete-action:disabled i {
    animation: spin 0.9s linear infinite;
}

.goal-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.goal-header-complete {
    min-width: 230px;
}

.milestone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.milestone-card.active .btn-complete-milestone {
    width: 100%;
    max-width: 360px;
}

.milestone-complete-note,
.milestone-locked-note {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    border-radius: 100px;
    padding: 0.52rem 0.85rem;
    border: 1px solid var(--border-glass);
}

.milestone-complete-note {
    color: #86efac;
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.18);
}

.milestone-locked-note {
    color: var(--text-muted);
    background: rgba(255,255,255,0.025);
}

.goals-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(15,23,42,0.94);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,0.32);
    font-size: 0.88rem;
}

.goals-toast-error {
    border-color: rgba(248,113,113,0.25);
    background: rgba(127,29,29,0.92);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SMART Wizard Styles */
.smart-wizard {
    display: none; /* Managed by GSAP */
}

.step-indicator {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex: 1;
    position: relative;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    transition: background 0.4s ease;
}

.step-indicator:last-child::after {
    display: none;
}

.step-indicator.active {
    opacity: 1;
    transform: scale(1.1);
}

.step-indicator.completed::after {
    background: var(--accent-cyan);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-muted);
}

.step-indicator.active .step-num {
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), inset 0 0 10px rgba(16, 185, 129, 0.1);
    transform: scale(1.15);
}

.step-indicator.completed .step-num {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
    animation: pulse 0.6s ease-out;
}

.step-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-left: 0.6rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wizard-slide {
    display: none; /* Managed by GSAP */
}

.wizard-slide.active {
    display: block;
}

.slide-header span {
    display: block;
}

/* Mouse coordinate dynamic radial glow override for sidebar goal-card */
.goal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(34, 197, 94, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.goal-card:hover::before {
    opacity: 1;
}

/* SMART form inputs customization */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(16, 185, 129, 0.02);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
    animation: slideInUp 0.3s ease-out;
}

.form-group input.error, .form-group textarea.error, .form-group select.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.02);
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.gs-reveal {
    animation: slideInUp 0.8s ease-out forwards;
}

.goal-card {
    animation: slideInLeft 0.6s ease-out;
}

.milestone-card {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.milestone-card:nth-child(1) { animation-delay: 0.1s; }
.milestone-card:nth-child(2) { animation-delay: 0.2s; }
.milestone-card:nth-child(3) { animation-delay: 0.3s; }

.btn-complete-milestone,
.goal-complete-action {
    position: relative;
    overflow: hidden;
}

/* Base style for pseudo-element */
.btn-complete-milestone::after,
.goal-complete-action::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    transition: left 0.5s ease;
}

/* Hover effect */
.btn-complete-milestone:hover::after,
.goal-complete-action:hover::after {
    left: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 560px) {
.wizard-panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}
    
    .wizard-steps-indicator {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    .step-indicator {
        min-width: 42px;
        flex: 0 0 auto;
    }
    .wizard-nav {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }
    .wizard-nav button {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 0;
        justify-content: center;
    }
    .milestone-row {
        align-items: stretch !important;
    }
    .mobile-bottom-nav {
        left: 10px !important;
        width: calc(100% - 20px) !important;
    }
    .bottom-nav-item {
        padding: 0.35rem 0.45rem;
    }

}

.wizard-slide.active {
    animation: fadeInScale 0.4s ease-out;
}

.step-indicator.completed {
    animation: pulse 1.5s ease-in-out;
}

.step-indicator.active .step-num {
    animation: glow 2s ease-in-out infinite;
}

.milestone-card.completed {
    animation: milestoneCompletePulse 1s ease-out;
}

.goal-card.active {
    animation: float 3s ease-in-out infinite;
}

@media (max-width: 900px) {
    .goals-overview-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-overview-card {
        min-height: 78px;
        padding: 0.85rem;
    }

    .goal-overview-card strong {
        font-size: 1.12rem;
    }

    .goals-layout { grid-template-columns: 1fr; }
    .goals-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; margin-top: 2rem; }
    .planner-area { padding: 1.5rem; border-radius: 20px; }
    .goal-header-actions { align-items: stretch; width: 100%; }
    .milestone-card-toggle {
        grid-template-columns: auto 1fr auto;
        padding: 1rem;
        gap: 0.75rem;
    }
    .milestone-card[data-open="true"] .milestone-details {
        padding: 0 1rem 1rem 1rem;
    }
    .goal-header-complete,
    .milestone-card.active .btn-complete-milestone {
        width: 100%;
        max-width: none;
    }
    .wizard-steps-indicator { gap: 0.6rem; }
    .wizard-steps-indicator .step-indicator { flex-direction: column; align-items: center; }
    .step-indicator::after { display: none; }
    .step-name { display: none; }
}

@media (max-width: 480px) {
    .goals-overview-strip {
        grid-template-columns: 1fr;
    }
}

@keyframes milestoneCompletePulse {
    0% {
        box-shadow: 0 0 0 rgba(16,185,129,0);
        transform: translateY(0) scale(1);
    }
    40% {
        box-shadow: 0 0 34px rgba(16,185,129,0.26);
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 rgba(16,185,129,0);
        transform: translateY(0) scale(1);
    }
}
