/* --- Base Styles & Variables --- */
:root {
    --bg-color: #0d0f14;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-1: #4a9eff;
    --accent-2: #2e74bc;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 70px;
}

body {
    font-family: "Roboto Mono", monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Ensure no child can push the width */
body>* {
    max-width: 100%;
}

.bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
    /* Transition only for opacity, transform is handled by JS for cursor attraction */
    transition: opacity 10s ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-1), transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2), transparent 70%);
    top: 40%;
    right: -150px;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8a2be2, transparent 70%);
    bottom: 10%;
    left: 20%;
}


/* --- Utilities --- */
.section-spacing {
    padding: 40px 5% 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.txt-spotify {
    color: #1cc659;
}

.txt-beatport {
    color: #00ff89;
}

.txt-qobuz {
    color: #0070ef;
}

.txt-apple-music {
    color: #FA586A;
}

.txt-soundcloud {
    color: #ff5502;
}

.txt-youtube {
    color: #FF0000;
}

.txt-deezer {
    color: #a238ff;
}

.glass-panel,
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.glass-btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    transition: var(--transition);
    cursor: pointer;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-1);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(13, 15, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
}

.nav-scrolled {
    padding: 15px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-family: "Inter", sans-serif;
    text-decoration: none;
}

.logo-img {
    height: 1.2em;
    vertical-align: middle;
    margin-right: 8px;
    margin-top: -4px;
}

.logo span {
    color: var(--accent-2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    padding: 15px;
    /* Increased hit area */
    margin-right: -15px;
    /* Offset to keep aligned */
    -webkit-tap-highlight-color: transparent;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-1);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 0;
    scroll-margin-top: -70px;
}

.hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex: 1;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.download-container {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.download-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.github-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.github-link a:hover {
    color: #fff;
}

.hero-video {
    flex: 1;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-video:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper.placeholder {
    cursor: pointer;
    background: #000;
}

.video-wrapper.placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: var(--transition);
}

.video-wrapper.placeholder:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 163, 255, 0.4);
    z-index: 2;
    transition: var(--transition);
}

.video-wrapper.placeholder:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
    color: var(--accent-1);
}

/* --- Logo Ticker --- */
.logo-ticker {
    padding: 30px 0;
    border-top: 1px solid var(--card-border);
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: auto;
}

.ticker-wrapper {
    overflow: hidden;
    width: 100%;
}

.ticker-scroll {
    display: flex;
    width: max-content;
    animation: ticker-slide 40s linear infinite;
}

.ticker-scroll:hover {
    animation-play-state: paused;
}

.logo-slide {
    flex-shrink: 0;
    padding: 15px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-slide a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.logo-slide img {
    height: 35px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: var(--transition);
}

.logo-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.logo-slide img[alt="Qobuz"] {
    height: 40px;
}

.logo-slide img[alt="Beatsource"] {
    height: 28px;
}

.logo-slide img[alt="Tidal"] {
    height: 20px;
}

.logo-slide img[alt="SoundCloud"] {
    height: 45px;
}

.logo-slide img[alt="Apple Music"] {
    height: 40px;
}

.logo-slide img[alt="YouTube"] {
    height: 30px;
}

@keyframes ticker-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%);
    }
}

/* --- Features Section --- */
.feature-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.feature-text {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 25px;
    transition: var(--transition);
    height: 100%;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-item:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.1);
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent-1);
    background: rgba(7, 158, 250, 0.15);
    /* Matched to #079EFA */
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(7, 158, 250, 0.05);
}

.feature-item h3 {
    margin: 0;
    font-size: 1.4rem;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-image {
    position: relative;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: calc(1011px + 20px); /* 1011px GIF + 20px padding */
    order: -1;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* --- Installation Section --- */
.install-container {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.os-tabs {
    display: flex;
    border-bottom: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
}

.os-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.os-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.os-tab.active {
    color: var(--accent-1);
    background: rgba(0, 210, 255, 0.05);
}

.os-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.install-steps {
    margin-bottom: 30px;
    padding-left: 20px;
    color: var(--text-muted);
}

.install-steps li {
    margin-bottom: 10px;
}

.install-steps li a {
    color: var(--accent-1);
    text-decoration: none;
    transition: var(--transition);
}

.install-steps li a:hover {
    color: #DCE4EE;
}

.install-steps li code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    font-family: "Roboto Mono", monospace;
}

.slim-video {
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.macos-videos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.macos-videos h4 {
    margin-bottom: 10px;
    color: #fff;
}

/* --- Tutorials Section --- */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tutorial-card {
    overflow: hidden;
    transition: var(--transition);
}

.tutorial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 210, 255, 0.3);
}

.tutorial-card .video-wrapper {
    border-radius: 0;
    border-bottom: 1px solid var(--card-border);
}

.tutorial-info {
    padding: 20px;
}

.tutorial-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.tutorial-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--card-border);
    padding: 50px 5% 20px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 100px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-content p {
    color: var(--text-muted);
}

.footer-content .logo {
    flex: 1;
}

.footer-badge {
    display: flex;
    justify-content: center;
    flex: 1;
}

.footer-badge img {
    width: 160px;
    height: auto;
    transition: var(--transition);
}

.footer-badge a:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.footer-content .socials {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.socials a {
    color: var(--text-muted);
    font-size: 2.2rem;
    text-decoration: none;
    transition: var(--transition);
}

.socials a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-main {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding-top: 120px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero .tagline {
        margin: 0 auto 30px;
    }

    .download-container {
        justify-content: center;
    }

    .hero-video {
        width: 100%;
        transform: none;
    }

    .hero-video:hover {
        transform: scale(1.02);
    }

    .feature-grid {
        flex-direction: column;
    }

    .feature-text {
        grid-template-columns: 1fr;
    }

    /* GIF is now ordered -1 globally */

    .macos-videos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .download-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto 20px;
    }

    .download-btn {
        padding: 14px 10px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .download-btn i {
        margin-right: 10px;
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    /* Force hide on anything larger than mobile breakpoint if needed */
}

@media (min-width: 769px) {
    .hamburger {
        display: none !important;
    }

    .nav-links {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
        position: static !important;
        height: auto !important;
        width: auto !important;
        background: transparent !important;
        backdrop-filter: none !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background: rgba(13, 15, 20, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 1000;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 0;
        transform: translateX(100%);
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .os-tabs {
        flex-direction: column;
    }

    .os-tab {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .os-tab.active::after {
        width: 3px;
        height: 100%;
        top: 0;
        bottom: auto;
    }
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 1011px; /* Natural width of the GIF */
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    /* Start slightly zoomed out */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.video-modal-container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .video-modal-container {
    transform: translate(-50%, -50%) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-1);
    text-decoration: none;
    cursor: pointer;
}

/* Consolidated .feature-image styles above */

.overlay-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through to container */
    border-radius: 12px;
}

.overlay-hint i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--accent-1);
}

.feature-image:hover .overlay-hint {
    opacity: 1;
}

/* --- Changelog Section --- */
.changelog-container {
    max-width: 1000px;
    margin: 0 auto;
}

.changelog-item {
    display: flex;
    gap: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
}

.changelog-item:first-child {
    border-top: none;
}

.version-info {
    flex: 0 0 160px;
    padding-top: 5px;
}

.version-tag {
    font-size: 1.6rem;
    font-weight: 800;
    display: block;
    color: #fff;
    margin-bottom: 5px;
}

.release-date {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.release-content {
    flex: 1;
}

.change-list {
    list-style: none;
}

.change-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.change-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-weight: bold;
}

.change-list li strong {
    color: var(--text-color);
}

.change-list li code {
    background: rgba(148, 163, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.accent-link {
    color: var(--accent-1);
    text-decoration: none;
    transition: var(--transition);
}

.accent-link:hover {
    color: #fff;
    text-decoration: underline;
}

.show-more-container {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

#show-more-changelog i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

#show-more-changelog.active i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .changelog-item {
        flex-direction: column;
        gap: 20px;
        padding: 30px 0;
    }

    .version-info {
        flex: none;
        display: flex;
        align-items: baseline;
        gap: 15px;
    }

    .version-tag {
        font-size: 1.4rem;
        margin-bottom: 0;
    }
}