:root {
    --navy: #182F48;
    --yellow: #FCE676;
    --pink: #EBA6B1;
    --purple: #B1AFDA;
    --blue: #81C7D3;
    --creme: #FFFDEC;
    --red: #D22D0B;
    --green: #4A7446;
  }

  @font-face {
    font-family: 'Figtree';
    src: url('fonts/Figtree-Regular.ttf');
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Figtree-Italic';
    src: url('fonts/Figtree-Italic.ttf');
    font-style: italic, oblique;
  }
  
  @font-face {
    font-family: 'Figtree-Bold';
    src: url('fonts/Figtree-Bold.ttf');
    font-weight: bold;
  }

  @font-face {
    font-family: 'Figtree-BoldItalic';
    src: url('fonts/Figtree-BoldItalic.ttf');
    font-weight: bold;
    font-style: italic, oblique;
  }

  @font-face {
    font-family: 'GothicA1';
    src: url('fonts/GothicA1-ExtraBold.ttf');
    font-weight: bold;
  }

  @font-face {
    font-family: 'GothicA1';
    src: url('fonts/GothicA1-Regular.ttf');
  }




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

body {
    font-family: 'Figtree';
    background-color: var(--navy);
    color: var(--creme);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1 {
    font-family: 'GothicA1';
    font-weight: bold;
    font-size: 3rem;
    margin: 1rem;
}

h2 {
    font-family: 'Figtree';
    font-weight: 500;
    font-size: 1.6rem;
}

p {
    font-family: 'Figtree';
    font-style: normal;
    color: var(--navy);
    font-size: 1.2rem;
}

#trackArtist {
    color: var(--creme);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000cc;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
}


.overlay-content {
    max-width: 500px;
    background: var(--navy);
    color: var(--creme);
    font-size: 24px;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;

}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }


.overlay-content > p {
    margin: 24px;
    color: var(--creme);
}

.permission-steps {
    text-align: left;
    margin: 20px 48px;
    padding-left: 20px;
    max-width: 360px;

  }

.permission-steps > p {
    color: var(--creme);
}
  
  .permission-steps li {
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 1.2rem;
  }

.feature-list {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin: 20px 0;
  }
  
  .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }
  
  .feature-item i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--creme);
  }
  
  .feature-item span {
    font-size: 14px;
    text-align: center;
  }

  .overlay-btns {
    display: flex;
    flex-direction: column;
  }

.overlay-btn {
    width: 100%;
    background-color: var(--yellow);
    color: var(--navy);
    font-family: 'Figtree';
    font-size: 24px;
    /* border-radius: 12px; */
    margin: 16px;
    border: none;
}

#skipMotionBtn {
    background: none;
    color: var(--creme);
    border: none;
    margin-top: 0.8rem;
}

#skipMotionBtn > p {
    color: var(--creme);
}

.permission-feedback {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    max-width: 80%;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1001;
    pointer-events: none;
  }
  
  @keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
  }


/* Loading states for better UX */
.xr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
    z-index: 10;
}

.xr-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-size: 1.2rem;
    text-align: center;
    z-index: 10;
}


/* iOS Safari specific fixes */
.ios-safari .video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    padding: 12px 24px;
    font-size: 1rem;
    background: var(--navy);
    color: var(--creme);
    border-radius: 20px;
}



/* Player Container */
.player-container {
    /* margin: 2rem auto; */
    /* padding: 1rem; */
    background: var(--navy);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.player-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    
}

.content-area {
    flex: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 0; /* Important for flex children */
    background: var(--navy);
}



/* Content Area */
.content-section {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

#audioContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--navy);
    height: 100%;
     padding-bottom: 120px; /* Add padding to prevent content from being hidden behind controls */
}

#xrContent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    pointer-events: auto;
}

.video-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: #000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#sceneContainer {
    width: 100%;
    height: 100%;
    position: relative;
}

/* A-Frame Scene */
#sceneContainer a-scene {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: block !important;
}

#sceneContainer a-scene canvas {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Player Controls */
.player-controls {
    position: fixed;
    bottom: 0;
    width: 90vw;
    background-color: rgba(0, 0, 0, 0.6);
    /* border-color: var(--blue);
    border-style: solid;
    border-width: 2px; */
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
    border-radius: 20px;
    margin: 0 auto;
    margin-bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.center-controls {
    display: flex;
    flex-direction: row;
    order: 1;
}

#menuBtn {
    order: 0;
    position: absolute;
    left: 20px;
    top: 16px;
}


.control-btn {
    /* background: none;
    border: none;
    font-size: 1.5rem; */
    cursor: pointer;
    padding: 0.5rem;
    color: var(--creme);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);

}



.player-controls > .control-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

.playlist-track.active {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
}

/* Speed Button */
#speedBtn {
    order: 3;
    font-size: 0.9rem;
    padding: 0.5rem;
    min-width: 40px;
}

.progress-container {
    order: 1;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--creme);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    width: 0%;
}

.volume-control {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--creme);
}

#volumeSlider {
    -webkit-appearance: none; /* Override default look */
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2); /* Track background */
    border-radius: 2px;
    outline: none;
}

/* Styling the slider thumb */
#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue); /* Thumb color using your blue variable */
    cursor: pointer;
    transition: background 0.2s;
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue); /* Thumb color for Firefox */
    cursor: pointer;
}

/* Styling the track in Firefox */
#volumeSlider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Optional: Change thumb color on hover */
#volumeSlider::-webkit-slider-thumb:hover {
    background: var(--yellow); /* Using your yellow variable on hover */
}

#volumeSlider::-moz-range-thumb:hover {
    background: var(--yellow);
}

/* Mode Switch */
.mode-switch {
    display: flex;
    justify-content: center;
    width: auto;
    margin-bottom: 0.5rem; /* Add some space above controls */
    position: fixed;
    bottom: 160px; /* Position above controls */
    left: 50%;
    transform: translateX(-50%);
    /* Remove top/right positioning */
    padding: 12px 24px; /* Slightly smaller padding */
    margin: 0 auto; /* Center the button */
    z-index: 1000;

}


.mode-switch .control-btn {
    background: var(--creme);
    color: var(--navy);
    border-radius: 8px;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1;
    width: 160px;
    height: 48px;
    text-align: center;
    cursor: pointer;
    z-index: 1001;
}

#viewXRBtn {
    display: none; /* Visible by default */
}

#exitXRBtn {
    display: none; /* Hidden by default */
}

/* Track Info */
.track-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* top: 1rem;
    left: 1rem; */
    color: var(--creme);
    z-index: 10;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.track-info h2 {
    font-size: 1.4rem;
    margin: 0;
}

.track-info p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}


/* Album Art */
.album-art {
    width: 400px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Playlist */
.playlist-container {
    position: fixed;
    bottom: 212px;
    left: 40px;
    width: 100%;
    max-width: 320px;
    height: 100%;
    max-height: 800px;
    /* transition: right 0.3s ease; */
    z-index: 100;
    display: none;
    background: var(--creme);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    color: var(--navy);
    border-radius: 20px;
    overflow-y: auto;
}

.playlist-container.open {
    display: flex;
    flex-direction: column;
}


.playlist-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.xr-badge {
    background: var(--navy);
    color: var(--creme);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.playlist-tracks {
    padding: 1rem;
    overflow-y: auto;
    height: calc(100% - 60px);
}

.playlist-track {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.playlist-track:hover {
    background: #f5f5f5;
}


/* Responsive Design */
@media (max-width: 768px) {
    /* .player-container {
        margin: 1rem;
        padding: 0.5rem;
    } */

    .content-section {
        height: 320px;
    }

    .overlay {
        max-height: 100vh;
    }


.overlay-content {
    /* max-width: 500px; */
    font-size: 1rem;
}

.overlay-content > p {
    margin: 12px;
    font-size: 1rem;
    line-height: 1.2;
}

.overlay-content > h2 {
    font-size: 1.2rem;
}

.permission-steps {
    margin: 12px 24px;
    padding-left: 12px;
  }

  .permission-steps > p {
    margin-bottom: 8px;
  }
  
  
  .permission-steps li {
    margin-bottom: 4px;
    line-height: 1.2;
    font-size: 0.9rem;
  }

.feature-list {
    margin: 12px 0;
  }
  
  .feature-item {
    padding: 4px;
  }
  
  .feature-item i {
    font-size: 1rem;
    margin-bottom: 4px;
  }
  
  .feature-item span {
    font-size: 0.8rem;
  }

.overlay-btn {
    padding: 12px 12px;
    font-size: 1rem;
    margin: 8px;
}

.playlist-container {
    bottom: 192px;
    left: 32px;
    max-height: 420px;
    max-width: 280px;
}

.playlist-header > h2 {
    font-size: 1.2rem;
}

.playlist-track > div > p {
    font-size: 1rem;
    line-height: 1.8rem;
}


.player-controls {
    margin-bottom: 28px;
}


.mode-switch .control-btn {
    background: rgba(255,253,236, 0.9);
    width: 140px;
    height: 40px;
}

.mode-switch .control-btn > p {
    font-size: 1rem;
}

#skipMotionBtn > p {
    font-size: 0.9rem;
}

    .album-art {
        width: 300px;
        height: 300px;
    }
}