@import url('./utils/variables.css');
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap');
@import url('./components/glitch.css');
@import url('./components/shows.css');
@import url('./components/newsletter.css');
@import url('./components/social.css');

/* Font Faces */
@font-face {
    font-family: 'NorseBold';
    src: url("../assets/fonts/NorseBold.otf") format("opentype");
    font-style: normal;
    font-weight: normal;
}

@font-face {
    font-family: 'Norse';
    src: url("../assets/fonts/Norse.otf") format("opentype");
    font-style: normal;
    font-weight: normal;
}

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

body {
    background-color: var(--main-bg);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    filter: grayscale(60%);
}
h1 {
    padding-bottom: 1rem;
    font-size: 5em;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}
h2 {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
h1, h2, h3 {
    font-family: var(--font-heading);
}

/* Layout */
#app {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: transparent;
}

/* 3D Canvas - Must be behind content */
#three-canvas-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none;
}

#three-canvas-container canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.7; /* Slightly transparent for subtle effect */
}

header, footer {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent black */
    backdrop-filter: blur(5px); /* Blur effect for modern browsers */
    -webkit-backdrop-filter: blur(5px);
}

footer {
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    margin-top: auto;
    font-size: 0.8em;
}

main {
    position: relative;
    z-index: 10;
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-family: var(--font-secondary);
}

nav a.active {
    color: var(--glitch-color-1);
    text-shadow: 0 0 5px var(--glitch-color-1);
}

nav a:hover {
    color: var(--glitch-color-2);
}

/* Content backgrounds for visibility */
.newsletter-container,
#shows-list,
#agenda-container {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

iframe {
    background: #000;
}

/* Agenda Container */
#agenda-container {
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
    position: relative;
    border: 1px solid var(--border-color);
    background: #000;
    z-index: 10;
}

#agenda-container iframe {
    display: block;
    width: 100%;
    height: 600px;
    border: none;
    animation: flicker-filter 3s infinite linear alternate-reverse;
    -webkit-filter: invert(90%) hue-rotate(180deg) !important;
    filter: invert(90%) hue-rotate(180deg) !important;
    background: rgb(25, 25, 25) !important;
}

#agenda-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.1),
        rgba(0, 255, 0, 0.2) 1px,
        transparent 1px,
        transparent 4px
    );
    background-size: 100% 4px;
    opacity: 0.5;
    animation: scanlines-scroll 0.4s infinite linear;
}


@keyframes flicker-filter {
    0% { filter: saturate(1.5) contrast(1.2) hue-rotate(0deg) }
    50% { filter: saturate(1.8) contrast(1.1) hue-rotate(-2deg) }
    100% { filter: saturate(1.5) contrast(1.3) hue-rotate(1deg) }
}

@keyframes scanlines-scroll {
    to { background-position-y: 4px; }
}

/* Media Queries */
@media screen and (min-width: 600px) {
    nav {
        font-size: 1.6rem;
    }
}

/* Ensure glitch text is visible over particles */
.glitch {
    position: relative;
    z-index: 20;
}
/* ==========================================================================
   Tracks View Styles
   ========================================================================== */

/* Main container for the view */
.tracks-view section + section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 0, 255, 0.2);
}

.tracks-view h3 {
    color: var(--glow-color);
    text-shadow: 0 0 3px var(--glow-color);
    margin-bottom: 1rem;
    margin-top: 1rem;
    letter-spacing: 1px;
}

/* Base styles for all links in the tracks view */
.tracks-view a {
    color: #00ffff; /* A contrasting cyan */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
}

/* Hover effect for links */
.tracks-view a:hover,
.tracks-view a:focus {
    color: #fff;
    text-decoration: underline;
    text-shadow: 0 0 4px #00ffff;
}

/* Style the paragraph with streaming service links */
.streaming-links {
    color: rgba(255, 255, 255, 0.6); /* Mutes the "|" separators */
    font-size: 1.1rem;
    margin: 1.5rem 0;
}

.streaming-links a {
    color: var(--glow-color); /* Make these primary links magenta */
}
.streaming-links a:hover,
.streaming-links a:focus {
    text-shadow: 0 0 5px var(--glow-color);
}


/* Styling for all track lists */
.track-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
}

.track-list li {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s;
}

.track-list li:hover {
    background-color: rgba(255, 0, 255, 0.05);
}

.track-list li:last-child {
    border-bottom: none;
}

/* -- Automatic Track Numbering for Album Release -- */
/* 
 * NOTE: For this to work, you should remove the manually-typed numbers 
 * from your `TracksView.js` file.
 * Change this: h('li', "1. Riot on Aisle 5")
 * To this:     h('li', "Riot on Aisle 5")
*/
.album-release .track-list {
    counter-reset: track-number; /* Start a new counter */
}

.album-release .track-list li::before {
    counter-increment: track-number; /* Increment the counter for each li */
    content: counter(track-number) "."; /* Display '1.', '2.', etc. */
    display: inline-block;
    min-width: 2em; /* Ensures alignment */
    text-align: right;
    margin-right: 1em;
    color: var(--glow-color);
}
/* ==========================================================================
   Merch View Styles
   ========================================================================== */
.merch-view > p {
    text-align: center;
    margin-bottom: 2rem;
}

/* Instructions Box */
.order-instructions {
    border: 1px solid var(--glow-color);
    background-color: rgba(255, 0, 255, 0.05);
    padding: 1rem 1.5rem;
    margin: 2rem 0 3rem 0;
    border-radius: 4px;
}

.order-instructions h3 {
    color: var(--glow-color);
}

.order-instructions ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.order-instructions li {
    margin-bottom: 0.75rem;
}

.order-instructions strong {
    color: #00ffff; /* Cyan */
    font-weight: 500;
}

.order-instructions .disclaimer {
    font-size: 0.9rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: 1.5rem;
}

/* Merchandise Grid Layout */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.merch-item {
    border: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.merch-item:hover {
    border-color: var(--glow-color);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.merch-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 1rem;
    background-color: #111;
}

.merch-item h3 {
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.merch-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
    flex-grow: 1; /* Pushes price to the bottom */
}

.merch-item .price {
    font-family: 'Fira Code', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: #00ffff; /* Cyan */
    margin: 0.5rem 0 1rem 0;
    flex-grow: 0;
}

/* Sold Out Styling */
.merch-item.sold-out {
    opacity: 0.6;
    filter: grayscale(60%);
}

.merch-item.sold-out:hover {
    border-color: var(--border-color);
    box-shadow: none;
}

.merch-item .price .status {
    color: var(--glow-color);
    font-weight: bold;
    text-transform: uppercase;
}

.shorts-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 177.78%; /* Default: 9:16 for mobile Shorts */
  overflow: hidden;
  max-width: 100%;
}

/* Override aspect ratio on wider screens (16:9 for desktop) */
@media (min-width: 768px) {
  .shorts-container {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
  }
}

.shorts-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Video Section Styles
   ========================================================================== */

.video-list {
    margin-top: 2rem;
}

.video-item {
    margin-bottom: 1.5rem;
}

.video-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #00ffff;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s;
    padding: 0.5rem 0;
}

.video-link:hover,
.video-link:focus {
    color: #fff;
    text-shadow: 0 0 4px #00ffff;
}

.video-toggle {
    display: inline-block;
    min-width: 1.5em;
    color: var(--glow-color);
    font-size: 0.9em;
}

.video-title {
    flex-grow: 1;
}

.video-tags {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85em;
    opacity: 0.7;
}

.video-tags .tag {
    color: var(--glow-color);
    font-family: 'Fira Code', monospace;
}

/* Tag Filters */
.tag-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.filter-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.tag-filter-btn {
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--glow-color);
    color: var(--glow-color);
    padding: 0.4rem 0.9rem;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-filter-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.4);
}

.tag-filter-btn.active {
    background: var(--glow-color);
    color: #000;
    box-shadow: 0 0 12px var(--glow-color);
}

.tag-filter-btn.clear {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.tag-filter-btn.clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Video container animation */
.shorts-container {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video Container Responsive Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 9:16 aspect ratio for mobile */
    overflow: hidden;
}

/* Desktop: adjust murderjunk container specifically */
@media (min-width: 768px) {
    .murderjunk-container {
        padding-bottom: 56.25%; /* 16:9 aspect ratio for desktop */
    }
}

/* All video iframes positioning */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Specific styling for murderjunk on larger screens */
@media (min-width: 1024px) {
    .murderjunk-container {
        box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
        border: 1px solid rgba(255, 0, 255, 0.3);
    }
}

/* Add to main.css */

/* ==========================================================================
   Contact/Booking View Styles
   ========================================================================== */

.booking-view {
    max-width: 800px;
    margin: 0 auto;
}

.booking-view section + section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 0, 255, 0.2);
}

/* Contact Info Section */
.contact-info {
    text-align: center;
}

.contact-info h3 {
    color: var(--glow-color);
    text-shadow: 0 0 3px var(--glow-color);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.contact-info > p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-details {
    background-color: rgba(255, 0, 255, 0.05);
    border: 1px solid var(--glow-color);
    border-radius: 4px;
    padding: 2rem;
    margin: 2rem 0;
}

.contact-item h4 {
    color: #00ffff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.email-link {
    color: var(--glow-color);
    font-size: 1.3rem;
    font-family: 'Fira Code', monospace;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 3px;
}

.email-link:hover,
.email-link:focus {
    color: #fff;
    text-shadow: 0 0 8px var(--glow-color);
    border-color: var(--glow-color);
    background-color: rgba(255, 0, 255, 0.1);
}

/* Booking Note Section */
.booking-note {
    text-align: center;
    font-style: italic;
    opacity: 0.8;
}

.booking-note p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #00ffff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .contact-details {
        padding: 1.5rem;
    }
    
    .email-link {
        font-size: 1.1rem;
        word-break: break-all;
    }
}

/* Container for the image grid */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding-top: 1rem;
}

/* Style for the thumbnail link and image */
.thumbnail-link img {
    width: 100%;
    height: 120px; /* Or whatever height you prefer */
    object-fit: cover; /* This makes images crop nicely instead of stretching */
    display: block;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.thumbnail-link:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    /* --- CHANGES START HERE --- */
    max-width: 90vw;      /* Use most of the width on small screens */
    max-height: 85vh;     /* Reduce max-height to give more vertical space */
    
    /* Add a pixel-based max-width for larger screens to prevent it getting too wide */
    @media (min-width: 1024px) {
        max-width: 900px; 
    }
    /* --- CHANGES END HERE --- */

    display: flex;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.3s ease-in-out;
}

.modal-content img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: -10px;
    right: 0px;
    font-size: 2.5rem;   /* CHANGED: Slightly smaller and more refined size */
    color: white;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 8px black;
    -webkit-font-smoothing: antialiased;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-modal:hover {
    color: #ff4545;
    transform: scale(1.1);
}

/* --- Optional Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
