:root {
    --primary: #8B5CF6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #EC4899;
    --secondary-glow: rgba(223, 92, 246, 0.5);
    --dark-bg: #0F172A;
    --card-bg: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #aebaca;
    --border: #334155;
    --app-font: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    padding: 1.25rem 2.5rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px var(--primary-glow);
    border: none;
    cursor: pointer;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--primary-glow);
    filter: brightness(1.1);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--app-font);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    /* The Mobile Overscan Fix: cover potential URL bar shifts (+10% extra) */
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%; 
    background-image: linear-gradient(rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.96)), url('../assets/images/home_map_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    background-attachment: scroll;
    filter: blur(2.5px); /* Softens map lines for text pop */
    transform: scale(1.02); /* Cleanly hides blurred edge transitions */
}

.daily-scroll-answer span {
    filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffd700;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.daily-scroll-answer:hover span,
.daily-scroll-answer span.revealed {
    filter: blur(0);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
}


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--border), var(--primary));
    border-radius: 5px;
    border: 2px solid var(--dark-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Magical Utilities */
.magical-glow {
    box-shadow: 0 0 15px var(--secondary-glow);
    animation: glow-pulse 4s infinite ease-in-out;
    will-change: box-shadow;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
    50% { box-shadow: 0 0 25px var(--primary-glow); }
}

.magical-artifact {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 5px 15px rgba(251, 191, 36, 0.4));
}

.magical-artifact::before,
.magical-artifact::after {
    content: '✨';
    position: absolute;
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.8;
}

.magical-artifact::before {
    top: -10px;
    right: -15px;
}

.magical-artifact::after {
    bottom: -5px;
    left: -15px;
    font-size: 0.9rem;
    opacity: 0.4;
}

.divider-mask {
    height: 100px;
    width: 100%;
    background: var(--dark-bg);
    clip-path: polygon(0 0, 100% 30%, 100% 100%, 0% 100%);
    margin-top: -100px;
    position: relative;
    z-index: 5;
}

/* Card Badges */
.card-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.badge {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #FCD34D !important;
    border: 1px solid #B8860B !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


@keyframes summon {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Header & Hero */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0);
    padding: 1.5rem 2rem 0.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background, backdrop-filter;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.4rem 2rem;
    border-bottom: 1px solid var(--border);
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.main-logo {
    max-width: 100%;
    height: auto;
    width: 240px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: width, transform;
    transform-origin: center center;
}

header.scrolled .main-logo {
    width: 140px;
    margin-bottom: 0px; 
}

p.tagline {
    font-size: 1.1rem;
    color: var(--text-main);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    will-change: transform, opacity;
}

header.scrolled p.tagline {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* Grid Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20rem 2rem 4rem 2rem;
}

.sub-page-container {
    padding-top: 16rem !important;
    max-width: 1100px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

/* App Card */
.card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
    color: inherit;
    animation: summon 0.6s ease forwards;
    will-change: transform;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5),
        0 18px 36px -18px rgba(0, 0, 0, 0.5),
        0 0 20px var(--primary-glow);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}



.card-image-container {
    width: 100%;
    background: #020617;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.card-image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 11/5;
    padding-top: 6px;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

/* New Header Layout */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card:hover .card-icon {
    transform: rotate(10deg) scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem !important;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-main);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Detail Page */
.detail-hero {
    height: 260px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2.5rem;
    padding-bottom: 2rem;
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-top-nav {
    position: relative;
    z-index: 20;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.65) 0%, var(--dark-bg) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

.hero-badges {
    display: flex;
    gap: 0.75rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-badges .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-right: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--card-bg);
    object-fit: cover;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1rem;
}

.back-link::before {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.1em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M2 12l5-4.5v3h11v3h-11v3.5L2 12zm17-3l-2.5 3 2.5 3h2.5l-2.5-3 2.5-3h-2.5z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M2 12l5-4.5v3h11v3h-11v3.5L2 12zm17-3l-2.5 3 2.5 3h2.5l-2.5-3 2.5-3h-2.5z'/%3E%3C/svg%3E") no-repeat center / contain;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.back-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-4px);
}

.back-link:hover::before {
    transform: translateX(-2px);
}

.next-game-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 24px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1rem;
}

.next-game-link::after {
    content: '';
    display: inline-block;
    width: 1.1em;
    height: 0.8em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h20m-7-7 7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h20m-7-7 7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
    margin-left: 10px;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.next-game-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.next-game-link:hover::after {
    transform: translateX(4px);
}

/* Forward link for teaser cards */
.forward-link {
    display: inline-flex;
    align-items: center;
    color: #fbbf24;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.forward-link::after {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.1em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M2 12l5-4.5v3h11v3h-11v3.5L2 12zm17-3l-2.5 3 2.5 3h2.5l-2.5-3 2.5-3h-2.5z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M2 12l5-4.5v3h11v3h-11v3.5L2 12zm17-3l-2.5 3 2.5 3h2.5l-2.5-3 2.5-3h-2.5z'/%3E%3C/svg%3E") no-repeat center / contain;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    transform: scaleX(-1);
}

.forward-link:hover {
    filter: brightness(1.2);
    transform: translateX(4px);
}

.forward-link:hover::after {
    transform: scaleX(-1) translateX(-2px);
}

.detail-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 1.5rem 0 1rem;
}

ul {
    list-style: none;
    padding-left: 0;
}

li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

li::before {
    content: '•';
    color: #FCD34D;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.setting-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Download Section */
.download-section {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-flow: row nowrap;
    margin-bottom: 6rem;
    width: 100%;
}

.download-card {
    flex: 0 1 240px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0; /* Allows shrinking below content size */
}

.download-card.apple { border-color: rgba(139, 92, 246, 0.3); }
.download-card.google { border-color: rgba(236, 72, 153, 0.3); }

.download-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.download-card.apple:hover { border-color: var(--primary); box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2); }
.download-card.google:hover { border-color: var(--secondary); box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2); }

.download-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.download-text {
    text-align: left;
    min-width: 0;
}

.download-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.download-title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .download-section {
        gap: 0.75rem;
    }
    .download-card {
        padding: 0.75rem 1rem;
    }
    .download-icon {
        font-size: 1.5rem;
    }
    .download-title {
        font-size: 0.85rem;
    }
    .download-label {
        font-size: 0.6rem;
    }
}

/* Hook Section Styling */
.hook-section {
    margin-bottom: 5rem;
    margin-top: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    border: none !important;
}

.hook-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.hook-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hook-card:hover {
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hook-card.offline { border-color: rgba(139, 92, 246, 0.3); }
.hook-card.no-ads { border-color: rgba(236, 72, 153, 0.3); }
.hook-card.privacy { border-color: rgba(16, 185, 129, 0.3); }

.hook-card.offline:hover { border-color: var(--primary); }
.hook-card.no-ads:hover { border-color: var(--secondary); }
.hook-card.privacy:hover { border-color: #10B981; }

.hook-card .magical-artifact {
    font-size: 2.2rem;
    margin-bottom: 1.25rem;
}

.hook-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    border: none;
    color: var(--text-main);
}

.hook-card.offline h3 { color: var(--primary); }
.hook-card.privacy h3 { color: #10B981; }

.hook-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tablet / Mobile Adjustments */
@media (max-width: 1024px) {
    .hook-grid {
        gap: 1rem;
    }
    .hook-card {
        padding: 1.75rem 1.25rem;
    }
    .hook-card h3 {
        font-size: 1.2rem;
        padding-bottom: 0.5rem;
    }
    .hook-card p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
    h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }
    h3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem;
    }

    .hook-grid {
        gap: 0.75rem;
    }

    .hook-card {
        padding: 2rem 1rem;
    }

    .hook-card p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 640px) {
    .container {
        padding-top: 16rem;
    }
    .hook-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        max-width: 380px;
    }
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 1rem !important;
    }
    .hook-section {
        margin-bottom: 2rem;
    }
    .hook-card {
        padding: 0.75rem 0.5rem;
    }
    .hook-card .magical-artifact {
        margin-bottom: 0.1rem;
        font-size: 1.5rem;
    }
    .hook-card h3 {
        margin-bottom: 0.1rem;
        font-size: 1.05rem;
    }
    .hook-card p {
        font-size: 0.85rem;
        line-height: 1.35;
    }
    
    header {
        padding: 1rem 1rem 0.25rem 1rem;
    }
    header.scrolled {
        padding: 0.3rem 1rem;
    }
    .main-logo {
        width: 180px;
    }
    header.scrolled .main-logo {
        width: 110px;
    }

}

@media (max-width: 1100px) {
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        max-width: 100%;
        width: 100% !important;
    }

    .card-header {
        display: none !important;
    }

    .card-content {
        padding: 1.25rem 1.25rem 1.5rem 1.25rem !important;
    }
}

@media (min-width: 1050px) and (max-width: 1100px) {
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        max-width: 100%;
        width: 100% !important;
    }

    .card-header {
        display: none !important;
    }

    .card-content {
        padding: 1.25rem 1.25rem 1.5rem 1.25rem !important;
    }
}

/* Wizard's Path Progression */
.progression-track {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    padding: 0 1rem;
    margin-top: 2rem;
}

.progression-line {
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(139, 92, 246, 0.2);
    z-index: 0;
}

.progression-step {
    flex: 1;
    min-width: 120px;
    z-index: 1;
    text-align: center;
}

.step-circle {
    width: 60px;
    height: 60px;
    background: #1a1614;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    background-clip: padding-box;
}

.step-circle.active {
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-circle.final {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.progression-step h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.progression-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 140px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .progression-track {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
        padding-left: 2.5rem;
        max-width: 400px;
        margin: 0 auto;
    }

    .progression-line {
        top: 0;
        bottom: 0;
        left: 55px; /* (60px/2) + 2.5rem padding - line width adjustment */
        width: 2px;
        height: 100%;
        right: auto;
    }

    .progression-step {
        display: flex;
        align-items: center;
        gap: 2rem;
        text-align: left;
        width: 100%;
    }

    .progression-step .step-circle {
        margin: 0;
        flex-shrink: 0;
    }

    .progression-step p {
        margin: 0;
        max-width: none;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 6rem;
}

.footer-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    footer {
        padding: 4rem 1.5rem;
        margin-top: 4rem;
    }
    .footer-links {
        gap: 1.5rem 2rem;
    }
}

footer a.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    opacity: 0.8;
}

footer a.footer-link:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-link:not(:last-child)::after {
    content: '|';
    margin-left: 1.5rem;
    opacity: 0.3;
    color: var(--text-muted);
    pointer-events: none;
}

/* Device Showcase Carousel */
.device-carousel {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.carousel-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.carousel-image-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #020617;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.carousel-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.carousel-image-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-image-wrapper img[src] {
    opacity: 1;
}

.carousel-content {
    text-align: center;
    padding: 0 2rem;
}

.carousel-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.carousel-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 0 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-glow);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

@media (max-width: 640px) {
    .detail-hero {
        height: auto;
        min-height: 240px;
        padding-bottom: 2rem;
        gap: 2.5rem;
    }

    .hero-top-nav {
        padding: 1.5rem 1.5rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0 1.5rem;
        gap: 1.25rem;
    }

    .hero-icon {
        width: 70px;
        height: 70px;
        margin-right: 0;
        border-radius: 50%;
        border-width: 2px;
    }

    .hero-content h1 {
        font-size: 2.25rem !important;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    .detail-content h2 {
        font-size: 1.6rem;
    }

    .hero-badges .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}
/* Thematic Preview Orbs for Mastery Page */
.theme-orb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid rgba(255, 255, 255, 0.2); /* Containment border */
}

.theme-orb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-orb.active {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    border-color: rgba(255, 255, 255, 0.7); /* Brighter active border */
}
