/* Font Faces */
@font-face {
    font-family: 'Hiragino Kaku';
    src: url('./Hiragino Kaku Gothic ProN W6.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Cousine font loaded via Google Fonts in HTML */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: 'Cousine', monospace;
}

a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
    touch-action: manipulation;
}

button {
    touch-action: manipulation;
}

a:hover {
    opacity: 0.7;
}

/* Main Layout */
.main-container {
    display: flex;
    min-height: 100vh;
    padding-bottom: 70px; /* Space for fixed audio player */
}

/* Left Video Section */
.video-section {
    width: 33.333%;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

/* Hide native video controls on iOS */
.background-video::-webkit-media-controls {
    display: none !important;
}

.background-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.video-logo {
    width: 70%;
    max-width: 400px;
}

/* Right Navigation Section */
.nav-section {
    width: 66.666%;
    margin-left: 33.333%;
    min-height: calc(100vh - 70px);
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: transparent;
}

.page-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 100px;
    position: relative;
    z-index: 10;
}

.logo-link {
    display: inline-block;
}

.nav-logo {
    width: 320px;
}

.nav-heading {
    font-family: 'Cousine', monospace;
    font-size: 24px;
    font-weight: normal;
    letter-spacing: normal;
    margin-bottom: 15px;
    margin-top: 50px;
    color: #fff;
    position: relative;
    z-index: 10;
}

.nav-heading:first-of-type {
    margin-top: 0;
}

.nav-links {
    list-style: none;
    position: relative;
    z-index: 10;
}

.nav-links li {
    line-height: 1.1;
    margin-bottom: 5px;
}

.nav-links a {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 64px;
    font-weight: normal;
    display: inline-block;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #004EFF;
    opacity: 1;
}

.overview-text {
    margin-top: auto;
    padding-top: 60px;
    max-width: 680px;
    font-size: 20px;
    line-height: 1.8;
    opacity: 0.85;
    position: relative;
    z-index: 10;
}

.footer-links {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 10;
}

.footer-links a {
    font-family: 'Cousine', monospace;
    font-size: 12px;
    opacity: 0.5;
}

.footer-links a:hover {
    opacity: 1;
}

/* Hover Image Container */
.hover-image-container {
    position: fixed;
    top: 60px;
    right: 80px;
    bottom: 100px;
    width: 50%;
    max-width: 700px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.hover-image-container.visible {
    opacity: 1;
}

.hover-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
}

/* Audio Player Footer */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #111;
    border-top: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px 0 30px;
    z-index: 1000;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.playlist-option {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.player-btn:hover {
    opacity: 0.7;
}

.player-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.track-info {
    display: flex;
    flex-direction: column;
    margin-left: 20px;
}

.track-title {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.track-title:hover {
    color: #004EFF;
}

.track-artist {
    font-family: 'Cousine', monospace;
    font-size: 12px;
    opacity: 0.6;
}

.playlist-menu-container {
    position: relative;
}

.menu-btn svg {
    width: 20px;
    height: 20px;
}

.playlist-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #111;
    border: 1px solid #333;
    display: none;
    flex-direction: column;
    min-width: 150px;
    margin-bottom: 10px;
}

.playlist-menu.open {
    display: flex;
}

.playlist-option {
    background: none;
    border: none;
    color: #fff;
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.playlist-option:hover {
    background: #222;
}

.playlist-option.active {
    color: #004EFF;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 14px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cart-link svg {
    width: 20px;
    height: 20px;
}

.cart-count {
    background: #fff;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Product Page Styles */
.product-page {
    display: flex;
    min-height: 100vh;
    padding-bottom: 70px;
}

.product-video-section {
    width: 33.333%;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
    background: #000;
}

.product-content {
    width: 66.666%;
    margin-left: 33.333%;
    padding: 60px 80px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.back-link {
    font-size: 14px;
    opacity: 0.6;
}

.back-link:hover {
    opacity: 1;
}

.product-title {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.product-category {
    font-size: 14px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 14px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    display: flex;
    flex-direction: column;
}

.product-description {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 40px;
}

.product-price {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 24px;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 16px 40px;
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.add-to-cart-btn:hover {
    background: #ddd;
}

.add-to-cart-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

/* Cart Page Styles */
.cart-page {
    min-height: 100vh;
    padding: 60px 80px;
    padding-bottom: 70px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.cart-title {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 32px;
    letter-spacing: 2px;
}

.cart-items {
    margin-bottom: 40px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 30px;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid #222;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: #1a1a1a;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h3 {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 18px;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 14px;
    opacity: 0.6;
}

.cart-item-price {
    font-size: 18px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.6;
    cursor: pointer;
    font-size: 14px;
}

.cart-item-remove:hover {
    opacity: 1;
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
    opacity: 0.6;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid #222;
}

.cart-total {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 24px;
}

.checkout-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 16px 60px;
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.checkout-btn:hover {
    background: #ddd;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .video-section {
        width: 100%;
        height: 25vh;
        position: relative;
    }

    .video-section.scrolled {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .video-logo {
        width: 40%;
        max-width: 150px;
    }

    .nav-section {
        width: 100%;
        margin-left: 0;
        padding: 40px 30px;
        min-height: auto;
    }

    .page-header {
        justify-content: flex-start;
        margin-bottom: 40px;
    }

    .nav-logo {
        width: 150px;
    }

    .nav-links a {
        font-size: 20px;
    }

    .overview-text {
        margin-top: 40px;
        font-size: 14px;
    }

    /* Mobile Audio Player */
    .audio-player {
        padding: 0 15px;
        height: 60px;
    }

    .player-controls {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .track-info {
        margin-left: 10px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        position: relative;
    }

    .track-info::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 30px;
        height: 100%;
        background: linear-gradient(to right, transparent, #111);
        pointer-events: none;
    }

    .track-title {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        padding-right: 30px;
    }

    .track-artist {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        padding-right: 30px;
    }

    .cart-link {
        flex-shrink: 0;
        margin-left: 15px;
    }

    /* Mobile Product Page */
    .product-page {
        flex-direction: column;
    }

    .product-video-section {
        width: 100%;
        height: 25vh;
        position: relative;
    }

    .product-video-section .video-logo {
        width: 40%;
        max-width: 150px;
    }

    .product-content {
        width: 100%;
        margin-left: 0;
        padding: 40px 30px;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Mobile Cart */
    .cart-page {
        padding: 40px 30px;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 20px;
    }

    .cart-item-price,
    .cart-item-remove {
        grid-column: 2;
    }

    /* Mobile Info Pages */
    .info-page {
        padding: 40px 30px;
    }

    .info-title {
        font-size: 24px;
    }
}

/* Info Pages (About, Terms, FAQ, Tracklists) */
.info-page {
    min-height: calc(100vh - 70px);
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    max-width: 900px;
}

.info-title {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 40px;
}

.info-content {
    font-family: 'Cousine', monospace;
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.85;
    flex: 1;
}

.info-content p {
    margin-bottom: 20px;
}

/* Tracklist Styles */
.tracklist-section {
    margin-bottom: 50px;
}

.tracklist-heading {
    font-family: 'Hiragino Kaku', sans-serif;
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 20px;
    color: #fff;
}

.tracklist {
    list-style: none;
    padding: 0;
}

.tracklist li {
    font-family: 'Cousine', monospace;
    font-size: 14px;
    line-height: 2;
}

.tracklist a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tracklist a:hover {
    color: #004EFF;
}

.track-artist-name {
    opacity: 0.5;
    margin-left: 10px;
}

.track-artist-name::before {
    content: "— ";
}

.tracklist-empty {
    font-family: 'Cousine', monospace;
    font-size: 14px;
    opacity: 0.5;
}

/* Hidden YouTube Player for Audio */
.youtube-audio-player {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
