/*
Theme Name: Old Skool Sessions Dark Theme
Theme URI: https://rarefunk.com
Author: Antigravity
Author URI: https://rarefunk.com
Description: A premium dark mode theme for the Old Skool Sessions archive, featuring an AJAX-powered glassmorphism modal for seamless audio playback.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oss-dark
*/

:root {
  /* Premium Dark Mode Colors */
  --color-bg-base: #0f0f11;
  --color-bg-surface: #1a1a1d;
  --color-text-main: #ffffff;
  --color-text-muted: #a0a0a5;
  --color-accent: #00d4ff; /* Cyan accent matching the waveform */
  --color-accent-hover: #00aacc;
  
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-headers: 'Oswald', sans-serif;
  
  --modal-bg: rgba(26, 26, 29, 0.75);
  --modal-backdrop-blur: blur(20px);
}

body {
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  font-family: var(--font-family-base);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .site-title {
  font-family: var(--font-family-headers);
  font-weight: 700;
  text-transform: uppercase;
}

/* Header & Navigation (Material Dark Mode) */
.site-header {
  padding: 0 4rem;
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-title {
  margin: 0;
}

.site-title a {
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 2rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.site-title a:hover {
  color: var(--color-accent);
}

.main-navigation ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  height: 100%;
}

.main-navigation a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-family-headers);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.main-navigation a:hover,
.main-navigation a:focus {
  color: #FF0A00;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 30px;
  height: 3px;
  background-color: var(--color-text-main);
  border-radius: 4px;
  position: absolute;
  transition: transform 0.15s ease;
}

.hamburger-inner::before, .hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before { top: -10px; }
.hamburger-inner::after { bottom: -10px; }

/* Hamburger Active State */
.menu-toggle[aria-expanded="true"] .hamburger-inner {
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
  top: 0;
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}



/* Modal Overlay Base Styles */
#oss-show-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#oss-show-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.oss-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--modal-backdrop-blur);
  -webkit-backdrop-filter: var(--modal-backdrop-blur);
}

.oss-modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  max-height: 95vh;
  background: var(--color-bg-surface);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.1);
  overflow-y: auto;
  padding: 0;
  z-index: 10;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#oss-show-modal.is-active .oss-modal-content {
  transform: translateY(0);
}

.oss-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.oss-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1) rotate(90deg);
}

/* Modal Internal Layout */
.oss-modal-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.oss-modal-header h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.2;
}

.oss-modal-body {
  /* The custom player will be injected here. We let the plugin's CSS handle the player itself, 
     but ensure the container fits it nicely. */
  width: 100%;
}

.oss-loader {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 4rem;
}

#oss-show-modal.is-loading .oss-loader {
  display: flex;
}

.oss-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

#oss-show-modal.is-loading .oss-modal-inner {
  display: none;
}

/* Custom CSS Grid & Search */
.site-main {
  padding: 2rem 4rem 4rem 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.oss-search-container {
  margin-bottom: 2rem;
  width: 100%;
}

.oss-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 1.5rem 2rem;
  font-size: 1.25rem;
  font-family: var(--font-family-base);
  background: var(--color-bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--color-text-main);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.oss-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.oss-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.oss-load-more-trigger {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  opacity: 0; /* Hidden until observed */
  transition: opacity 0.3s;
}

.oss-load-more-trigger.is-visible {
  opacity: 1;
}


.oss-grid-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transform: translateZ(0); /* Hardware acceleration */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--color-bg-surface);
  border: 1px solid rgba(255,255,255,0.05);
}

.oss-grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0,212,255,0.2);
  border-color: rgba(0,212,255,0.3);
}

.oss-card-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.oss-grid-card:hover .oss-card-image {
  transform: scale(1.05);
}

.oss-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(15,15,17,0.95) 0%, rgba(15,15,17,0) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  box-sizing: border-box;
}

.oss-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: color 0.3s ease;
}

.oss-grid-card:hover .oss-card-title {
  color: #FF0A00;
}

/* Responsive Layout (must be at bottom to override base styles) */
/* Tablet Breakpoint (up to iPad Pro sizes) */
@media (max-width: 1024px) {
  .site-header {
    padding: 0 1.5rem;
  }
  
  .site-main {
    padding: 1.5rem;
  }
  
  .oss-hero-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .oss-card-overlay {
    padding: 0.5rem;
  }

  .oss-card-title {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  
  .site-branding img {
    max-width: 200px;
    height: auto;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background: rgba(26, 26, 29, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(-20px);
  }

  .main-navigation.toggled {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-navigation ul {
    flex-direction: column;
    height: auto;
    gap: 2rem;
  }

  .main-navigation a {
    font-size: 2rem;
  }
}

/* Mobile Breakpoint */
@media (max-width: 600px) {
  .site-main {
    padding: 1rem 0.5rem;
  }
  
  .oss-hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .oss-card-title {
    font-size: 0.8rem;
    line-height: 1.15;
  }
  
  .oss-card-overlay {
    padding: 0.25rem 0.4rem;
  }
  
  .site-branding img {
    max-width: 180px;
  }
}
