/* Custom Enhanced Styles */

/* ─── Scroll Progress Bar ─────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #06b6d4, #a855f7, #06b6d4);
    background-size: 200% 100%;
    animation: progress-shimmer 3s linear infinite;
    z-index: 9999;
    transition: width 0.05s linear;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: 0% center;
    }
}

.magnetic-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.ripple {
    position: fixed;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.8s ease-out;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.kinetic-text {
    display: inline-block;
    transition: transform 0.1s linear;
}

.cyan-glow {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* ─── Readability Enhancements ───────────────────── */
.bento-card,
.premium-card {
    background: var(--card-bg) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
}

/* Vision & Career Redesign Styles */
.premium-card {
    min-height: 480px;
    height: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    padding: 3rem 2.5rem !important;
}

.card-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--accent-cyan);
    transition: all 0.3s ease;
}

.premium-card:hover .card-icon-badge {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.card-highlights {
    margin-top: 2rem;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.card-highlight-item svg {
    flex-shrink: 0;
    color: var(--accent-cyan);
}

.card-bg-number {
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Precise text-shadow for readability without global bloat */
.hero-live-panel,
.premium-card,
.bento-card,
nav {
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ─── Scroll & Select Behaviors ───────────────────── */
/* Disable default scrollbar */
::-webkit-scrollbar {
    display: none !important;
}

html,
body {
    /* Hide scrollbars in Firefox & IE/Edge */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Removed global user-select: none for better UX */
}

/* Enhancements for Horizontal Section */
.horizontal-scroll-section {
    height: 150vh !important;
    /* Less scrolling required */
}

/* ─── Spotify & Weather Live Panels ───────────────────────────── */
.hero-live-panel {
    min-height: 84px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .hero-live-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

.spotify-live-card,
.weather-live-card {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto;
    min-width: 200px;
}

.spotify-live-card.active,
.weather-live-card.active {
    opacity: 1;
    transform: translateY(0);
}

.spotify-inner,
.weather-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    height: 84px;
    /* Consistent height */
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.weather-info {
    display: flex;
    flex-direction: column;
}

.weather-location {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.weather-details {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.weather-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #06b6d4;
    /* Cyan color matching theme */
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.spotify-inner:hover,
.weather-inner:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.spotify-art-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.spotify-art {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.spotify-art.grayscale {
    filter: grayscale(1) opacity(0.5);
}

/* Loading Skeleton */
.spotify-skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
}

.spotify-skeleton-line {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Pulse Animation for Now Playing */
.spotify-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 14px;
    border: 2px solid rgba(29, 185, 84, 0.5);
    opacity: 0;
    animation: spotify-pulse-ani 2.5s infinite;
}

@keyframes spotify-pulse-ani {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.spotify-info {
    overflow: hidden;
}

.spotify-status {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #1DB954;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotify-status.pulsing {
    color: #1DB954;
}

.recently-played .spotify-status,
.is-unavailable .spotify-status {
    color: rgba(255, 255, 255, 0.4);
}

.spotify-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
}

.spotify-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.animate-spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Horizontal scrolling fix */
#horizontal-container {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* --- MISSIONS DYNAMIC ISLAND --- */
.missions-panel-wrapper {
    position: absolute;
    right: 3rem;
    top: 50%;
    /* Vertical centering */
    transform: translateY(-50%);
    z-index: 45;
    /* Below header */
    max-width: 280px;
    pointer-events: auto;
}

@media (max-width: 1200px) and (min-width: 769px) {
    .missions-panel-wrapper {
        top: auto !important;
        bottom: 1rem !important;
        right: 1.5rem !important;
        transform: none !important;
    }

    .visible-home {
        animation: islandAppearBottom 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    }
}

@keyframes islandAppearBottom {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 768px) {
    .missions-panel-wrapper {
        display: none !important;
        /* Hide on mobile only */
    }
}

.visible-home {
    opacity: 1;
    /* Base state */
    animation: islandAppear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes islandAppear {
    from {
        opacity: 0;
        transform: translateY(-40%) scale(0.95);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
        filter: blur(0);
    }
}

.missions-island {
    position: relative;
    z-index: 9999;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.missions-island.collapsed {
    max-height: 52px;
    border-radius: 26px;
    background: rgba(10, 10, 15, 0.9);
}

.light-mode .missions-island {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.island-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 4px 8px;
    margin-bottom: 0.5rem;
    transition: margin 0.4s ease;
}

.collapsed .island-header {
    margin-bottom: 0;
}

.island-status-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.light-mode .island-status-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.05);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
}

.status-count {
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.island-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0;
    flex-grow: 1;
}

.island-toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.island-header:hover .island-toggle-icon {
    opacity: 1;
    transform: scale(1.1);
}

.island-toggle-icon svg {
    width: 14px;
    height: 14px;
}

.island-content {
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.collapsed .island-content {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.island-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.island-item {
    display: flex;
    gap: 0.75rem;
    padding: 8px 10px;
    border-radius: 16px;
    align-items: center;
    transition: all 0.3s ease;
}

.island-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .island-marker {
    border-color: rgba(0, 0, 0, 0.15);
}

.island-item.completed .island-marker {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
    transform: scale(1.1);
}

.island-marker svg {
    width: 10px;
    height: 10px;
}

.island-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    opacity: 0.85;
    transition: all 0.3s ease;
}

.island-item.completed .island-text {
    opacity: 0.35;
    text-decoration: line-through;
    filter: blur(0.3px);
}

.island-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.light-mode .island-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Mission Completion Feedback Animation */
@keyframes pillPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(6, 182, 212, 0);
    }

    50% {
        transform: scale(1.3);
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
        background: rgba(6, 182, 212, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(6, 182, 212, 0);
    }
}

.island-status-pill {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}