:root {
    --primary: #b2fffa;
    --primary-dark: #7ccfcb;
    --dark: #111217;
    --darker: #0a0b0f;
    --light: #f5f5f7;
    --accent: #ff3366;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at center, #191d28 0%, #0d0f15 100%);
    min-height: 100vh;
    font-family: 'Work Sans', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--light);
}

body {
    display: block;
    min-height: 100vh;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom);
}

.svg-container {
    width: 588px;
    height: 450px;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.turntable-svg {
    transform: scale(1.2);
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.37s cubic-bezier(.77, 0, .18, 1.01), opacity 0.37s cubic-bezier(.77, 0, .18, 1.01);
}

.tonearm-animated {
    transform-origin: 228px 0px;
    transform: rotate(-65deg);
    transition: transform 1.3s cubic-bezier(.77, 0, .18, 1.01);
}

.tonearm-animated.tonearm-drop {
    transform: rotate(-28deg);
}

#recordGroup {
    cursor: grab;
}

#recordGroup.dragging {
    cursor: grabbing;
}

@media (max-width: 1024px) {
    .svg-container {
        width: 100vw;
        max-width: 100vw;
        transform: none;
    }
}

@media (max-width: 768px) {
    .svg-container {
        width: 100vw;
        max-width: 100vw;
        height: 60vh;
        max-height: 60vh;
    }

    .turntable-svg {
        transform: scale(1.5);
    }

    .hero-copy {
        font-size: 2.5rem;
        margin-top: 5vh;
        margin-bottom: 3vh;
    }

    .modern-input-container {
        margin-top: 3vh;
        width: 90%;
    }

    .vertical-stack {
        justify-content: flex-start;
        padding-top: 2vh;
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .svg-container {
        height: 52vh;
        max-height: 52vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .turntable-svg {
        transform: scale(0.95);
    }

    .hero-copy {
        font-size: 2.3rem;
        margin-top: 2vh;
    }

    .vertical-stack {
        justify-content: flex-start;
        padding-top: 2vh;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .svg-container {
        height: 50vh;
        max-height: 50vh;
    }

    .turntable-svg {
        transform: scale(1.3);
    }

    .hero-copy {
        font-size: 2.5rem;
        margin-top: 2vh;
    }

    .modern-input-container {
        margin-top: 2vh;
        width: 80%;
    }
}

@media only screen and (max-width: 600px) {
    .modern-input-container {
        max-width: 95vw;
        margin-top: 4vw;
    }

    .modern-input {
        font-size: 1.05rem;
        padding: 0.95rem 1.1rem;
    }

    .vertical-stack {
        justify-content: flex-start;
        padding-top: 1vh;
    }
}

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
    .vertical-stack {
        justify-content: flex-start;
        padding-top: 0.5vh;
    }

    .svg-container {
        height: 32vh;
        max-height: 32vh;
    }

    .turntable-svg {
        transform: scale(1.0);
    }

    .hero-copy {
        font-size: 1.3rem;
        margin-top: 1.2vh;
    }

    .modern-input {
        font-size: 16px;
        padding: 1rem 1.2rem;
    }
}

@media only screen and (min-device-width: 320px) and (max-device-width: 767px) and (orientation: landscape) {
    .vertical-stack {
        justify-content: flex-start;
        padding-top: 0.5vh;
    }

    .svg-container {
        height: 65vh;
        max-height: 65vh;
    }

    .hero-copy {
        font-size: 1.8rem;
        margin-bottom: 1vh;
    }

    .modern-input-container {
        margin-top: 2vh;
    }
}

/* Add specific iPhone portrait handling */
@media only screen and (max-width: 428px) and (orientation: portrait) {
    .vertical-stack {
        justify-content: flex-start;
        padding-top: 0.5vh;
    }

    .hero-copy {
        margin-top: 0;
        margin-bottom: 2vh;
    }

    .svg-container {
        height: 50vh;
        max-height: 50vh;
    }

    .tonearm-animated {
        transform: rotate(-80deg) !important;
    }

    .tonearm-animated.tonearm-drop {
        transform: rotate(-45deg) !important;
    }
}

input[type="text"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(17, 18, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(178, 255, 250, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-logo {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 4px rgba(17, 17, 27, 0.7);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    padding: 0.6rem 1.2rem;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(178, 255, 250, 0.3);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(178, 255, 250, 0.4);
    color: var(--dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 0 1rem;
        height: 60px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .mobile-menu-btn {
        display: block;
    }
}

body {
    padding-bottom: env(safe-area-inset-bottom);
}

.vertical-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    min-height: 100svh;
    height: 100svh;
    justify-content: center;
    position: relative;
    padding: 0;
    margin: 0;
}

.hero-copy {
    position: relative;
    margin-bottom: 2vw;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 2px 24px #111b, 0 1px 0 #222;
    letter-spacing: 0.14em;
    z-index: 30;
    text-align: center;
    line-height: 1.35;
}

.modern-input-container {
    width: 100%;
    max-width: 500px;
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 40;
}

.modern-input {
    width: 100%;
    padding: 1.2rem 1.8rem;
    border-radius: 2.5rem;
    border: 2px solid rgba(178, 255, 250, 0.15);
    outline: none;
    font-size: 1.3rem;
    font-family: 'Work Sans', Arial, sans-serif;
    background: rgba(22, 26, 34, 0.92);
    color: var(--primary);
    box-shadow: 0 6px 32px 0 rgba(10, 11, 15, 0.3), 0 2px 0 rgba(34, 34, 34, 0.5);
    transition: all 0.25s ease;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.modern-input:focus {
    background: rgba(34, 38, 48, 1);
    box-shadow: 0 8px 36px 0 rgba(0, 255, 249, 0.3), 0 2px 0 #222;
    color: var(--accent);
    border-color: rgba(178, 255, 250, 0.4);
    transform: translateY(-2px);
}

.modern-input::placeholder {
    color: rgba(178, 255, 250, 0.6);
    font-weight: 400;
    letter-spacing: 0.06em;
    opacity: 1;
}

.features-section {
    width: 100%;
    max-width: 800px;
    margin: 4rem auto 6rem;
    padding: 2.5rem 2rem 0 2rem;
    /* Added top padding for hover effect */
    text-align: center;
    box-sizing: border-box;
    /* Removed overflow-x: hidden; */
}

.features-hero {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.features-hero .highlight {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-description {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(245, 245, 247, 0.8);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    /* Minimum width for cards */
    gap: 2rem;
    margin-top: 3rem;
    box-sizing: border-box;
    justify-content: center;
    /* Center the grid */
    max-width: 1000px;
    /* Prevent over-stretching on large screens */
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: rgba(22, 26, 34, 0.6);
    border: 1px solid rgba(178, 255, 250, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(178, 255, 250, 0.2);
    box-shadow: 0 8px 32px rgba(10, 11, 15, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-title {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.feature-text {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 0.95rem;
    color: rgba(245, 245, 247, 0.7);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .features-section {
        margin: 3rem auto 4rem;
        padding: 2rem 0.5rem 0 0.5rem;
        /* Added top padding for hover effect */
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        /* Removed overflow-x: hidden; */
    }

    .features-hero {
        font-size: 2.2rem;
    }

    .features-description {
        font-size: 1.1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        /* Removed overflow-x: hidden; */
    }

    .feature-card {
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .features-section {
        margin: 3rem auto 4rem;
        padding: 1.5rem 1rem 0 1rem;
        /* Added top padding for hover effect */
        width: 100%;
        box-sizing: border-box;
        /* Removed overflow-x: hidden; */
    }

    .features-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding: 0;
        box-sizing: border-box;
        width: 100%;
        /* Removed overflow-x: hidden; */
    }

    .feature-card {
        padding: 1.2rem;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .features-hero {
        font-size: 2.2rem;
    }

    .features-description {
        font-size: 1.1rem;
    }
}

.overlay-input-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(.77, 0, .18, 1.01);
}

.overlay-input-backdrop.active {
    pointer-events: auto;
    opacity: 1;
}

.overlay-input-container {
    background: rgba(18, 22, 30, 0.96);
    border-radius: 2.5rem;
    box-shadow: 0 8px 40px 0 rgba(0, 0, 0, 0.28), 0 2px 0 #222;
    padding: 2.2rem 2.3rem 2.1rem 2.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 320px;
    width: min(96vw, 1100px);
    animation: overlayInputAppear 0.32s cubic-bezier(.77, 0, .18, 1.01);
}

@keyframes overlayInputAppear {
    from {
        transform: scale(0.95) translateY(40px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.overlay-input-title {
    font-family: 'Work Sans', Arial, sans-serif;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.overlay-input {
    width: 100%;
    max-width: 900px;
    padding: 1.15rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid rgba(178, 255, 250, 0.15);
    outline: none;
    font-size: 1.18rem;
    font-family: 'Work Sans', Arial, sans-serif;
    background: rgba(30, 36, 45, 0.97);
    color: var(--primary);
    box-shadow: 0 4px 24px 0 rgba(10, 11, 15, 0.13), 0 2px 0 rgba(34, 34, 34, 0.18);
    transition: all 0.23s cubic-bezier(.77, 0, .18, 1.01);
    letter-spacing: 0.03em;
    font-weight: 500;
}

.overlay-input:focus {
    background: rgba(34, 38, 48, 1);
    border-color: var(--primary-dark);
    color: var(--accent);
    box-shadow: 0 6px 32px 0 rgba(0, 255, 249, 0.13), 0 2px 0 #222;
}

.overlay-close-btn {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-size: 1.6rem;
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.overlay-close-btn:hover {
    opacity: 1;
    color: var(--accent);
}

.svg-container .turntable-svg.shrink-fade {
    transition: transform 0.37s cubic-bezier(.77, 0, .18, 1.01), opacity 0.37s cubic-bezier(.77, 0, .18, 1.01);
    transform: scale(0.98);
    opacity: 0.32;
}

/* Prevent text selection on SVG text */
.turntable-svg text {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
}

/* Center label hover effects */
#centerLabel,
#centerDot {
    filter: drop-shadow(0 0 0px rgba(178, 255, 250, 0));
    transition: none;
}

#centerLabel.glow-in,
#centerDot.glow-in {
    animation: glowIn 0.4s ease forwards;
}

#centerLabel.glow-out,
#centerDot.glow-out {
    animation: glowOut 0.4s ease forwards;
}

#centerLabel.glow-pulse,
#centerDot.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Ensure both elements get the same glow effect */
#centerLabel.glow-in,
#centerLabel.glow-pulse,
#centerDot.glow-in,
#centerDot.glow-pulse {
    filter: drop-shadow(0 0 12px rgba(178, 255, 250, 0.5));
}

@keyframes glowIn {
    0% {
        filter: drop-shadow(0 0 0px rgba(178, 255, 250, 0));
    }

    100% {
        filter: drop-shadow(0 0 12px rgba(178, 255, 250, 0.5));
    }
}

@keyframes glowOut {
    0% {
        filter: drop-shadow(0 0 12px rgba(178, 255, 250, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 0px rgba(178, 255, 250, 0));
    }
}

@keyframes glowPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 12px rgba(178, 255, 250, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(178, 255, 250, 0.7));
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .vertical-stack {
        justify-content: flex-start;
        padding-top: 10vh;
    }
}

/* Loading animation styles */
.loading-ring {
    animation: loadingSpin 1.5s linear infinite;
}

@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
        stroke-dashoffset: 0;
    }

    100% {
        transform: rotate(360deg);
        stroke-dashoffset: -80;
    }
}

/* Smooth transitions for morphing elements */
.morphing {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Disable pointer events during loading */
.loading-disabled {
    pointer-events: none !important;
    user-select: none;
}

/* Loading state overlay input styling */
.overlay-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading message styles */
.loading-message {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-message.active {
    display: flex;
    opacity: 1;
}

.loading-text {
    font-family: 'Work Sans', Arial, sans-serif;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.loading-dots {
    display: flex;
    gap: 0.4rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDots {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Improved Hamburger menu open/close styles and animation */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100vw;
        background: rgba(17, 18, 23, 0.98);
        box-shadow: 0 8px 32px rgba(10, 11, 15, 0.3);
        z-index: 2000;
        border-bottom-left-radius: 1.5rem;
        border-bottom-right-radius: 1.5rem;
        padding: 1.5rem 2rem 2rem 2rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-24px) scaleY(0.98);
        transition: opacity 0.32s cubic-bezier(.77, 0, .18, 1.01), transform 0.32s cubic-bezier(.77, 0, .18, 1.01);
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scaleY(1);
    }

    .mobile-menu-btn {
        position: relative;
        z-index: 2100;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        outline: none;
        cursor: pointer;
        transition: background 0.2s;
    }

    .mobile-menu-btn span,
    .mobile-menu-btn span::before,
    .mobile-menu-btn span::after {
        display: block;
        position: absolute;
        width: 28px;
        height: 3px;
        background: var(--primary);
        border-radius: 2px;
        transition: all 0.32s cubic-bezier(.77, 0, .18, 1.01);
        content: '';
    }

    .mobile-menu-btn span {
        position: relative;
        background: none;
    }

    .mobile-menu-btn span::before {
        top: -9px;
    }

    .mobile-menu-btn span::after {
        top: 9px;
    }

    .mobile-menu-btn.active span {
        background: transparent;
    }

    .mobile-menu-btn.active span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-menu-btn.active span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .nav-links li {
        margin: 1.2rem 0;
        width: 100%;
        text-align: right;
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.32s cubic-bezier(.77, 0, .18, 1.01), transform 0.32s cubic-bezier(.77, 0, .18, 1.01);
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.1s;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 0.5rem 0;
        color: var(--primary);
        transition: color 0.2s;
    }

    .nav-links a:hover {
        color: var(--accent);
    }
}

/* End improved hamburger menu styles */