* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
    height: 100%;
}

html {
    scroll-snap-type: y mandatory;
    scroll-padding: 0;
}

body {
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

:root {
    --primary-color: #3E4845;
    --secondary-color: #5a6b65;
    --background-dark: #0f0f0f;
    --background-darker: #080808;
    --surface: #1a1d1b;
    --surface-light: #252827;
    --text-primary: #ffffff;
    --text-secondary: #a0a8a5;
    --accent: #6b8078;
    --success: #5a7a6f;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
    border: 2px solid var(--background-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-darker);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo svg {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffffff; /* Keep hover text bright for readability */
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    .nav-links a:not(.btn-primary) {
        display: none;
    }
    .btn-primary {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 72, 69, 0.4);
    color: #ffffff; /* Keep hover text bright for readability */
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--surface-light);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(62, 72, 69, 0.1);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-primary.glow {
    box-shadow: 0 0 40px rgba(62, 72, 69, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(62, 72, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 60px rgba(62, 72, 69, 0.6);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 968px) {
    .hero {
        padding: 100px 0 80px;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(62, 72, 69, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

@media (max-width: 968px) {
    .hero::before {
        right: -50%;
        width: 500px;
        height: 500px;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: left;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Music Card */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Presentation Images */
.presentation-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floating 6s ease-in-out infinite;
}

.presentation-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px) rotate(-2deg);
    filter: blur(5px);
}

.presentation-image:nth-child(2) {
    transform: scale(0.95) translateY(10px) rotate(2deg);
}

.presentation-image.active {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
    filter: blur(0);
    z-index: 10;
    position: relative;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@media (max-width: 968px) {
    .presentation-container {
        max-width: 100%;
        margin-bottom: 2rem;
    }
}

/* Section Styles */
section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}

section .container {
    width: 100%;
}

@media (max-width: 968px) {
    html, body {
        scroll-snap-type: none;
        height: auto;
        overflow-x: hidden;
    }

    section {
        height: auto;
        min-height: auto;
        padding: 100px 0 60px;
        scroll-snap-align: none;
        flex-direction: column;
        justify-content: flex-start;
    }

    .hero {
        min-height: 100vh; /* Keep hero full screen if possible */
        padding-top: 140px;
    }
}

/* Fade-in animations with blur */
.animate-element {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}

.animate-element.animate-in {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

/* Staggered animations for cards */
.feature-card.animate-element {
    transition-delay: calc(var(--index, 0) * 0.1s);
}

.command-category.animate-element {
    transition-delay: calc(var(--index, 0) * 0.15s);
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    background: var(--background-darker);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.features-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.feature-card {
    background: var(--surface);
    padding: 25px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(62, 72, 69, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Commands Section */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.commands-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.command-category {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.command-category h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--background-dark);
    border-radius: 8px;
    transition: all 0.2s;
}

.command-item:hover {
    background: var(--surface-light);
    transform: translateX(5px);
}

.command-item code {
    background: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.command-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.command-item:hover {
    background: var(--surface-light);
    transform: translateX(5px);
}

.command-item code {
    background: var(--gradient);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.command-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
}

/* Now Playing Demo Section */
.now-playing-demo {
    padding: 100px 0;
    background: var(--background-dark);
}

.embed-preview {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.embed-screenshot {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.embed-screenshot:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* About Section */
.about {
    background: var(--background-darker);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2rem;
}

.tech-item {
    padding: 10px 20px;
    background: var(--surface);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.code-preview {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: var(--surface-light);
    padding: 12px 20px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-body {
    padding: 30px;
}

.code-body pre {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    line-height: 1.8;
}

.code-keyword {
    color: var(--primary-color);
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 100px 0;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Footer */
.footer-section {
    background: linear-gradient(to bottom, var(--background-dark), var(--background-darker));
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.footer {
    padding: 60px 0 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 50px;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
}

.footer-brand .logo img {
    height: 50px;
    width: auto;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: space-around;
    gap: 60px;
}

.footer-column {
    flex: 1;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-visual {
        order: 2;
        margin-top: 20px;
        margin-bottom: 0;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a:not(.btn-primary) {
        display: none;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        text-align: center;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 140px 0 60px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .embed-screenshot {
        max-width: 100%;
    }
    
    .music-card {
        padding: 15px;
    }
    
    .music-info {
        gap: 15px;
    }
    
    .album-art {
        width: 60px;
        height: 60px;
    }
    
    .track-name {
        font-size: 1rem;
    }
    
    .artist-name {
        font-size: 0.85rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .nav-links .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Mobile Optimization Fixes */
@media (max-width: 968px) {
    .features-grid, .commands-grid {
        max-height: none;
        overflow-y: visible;
    }
    
    /* Ensure presentation images don't overflow */
    .presentation-container {
        width: 100%;
        max-width: 350px; /* Limit width on mobile */
        margin: 0 auto 2rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 2rem;
    }
    
    .stat {
        text-align: center;
    }
}
