/* ============================================
   CatHideOuts — Style Sheet
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-primary: #0e0e12;
    --bg-secondary: #16161d;
    --bg-card: #1c1c27;
    --bg-card-hover: #22222f;
    --surface: #2a2a3a;
    --border: #2e2e42;
    --text-primary: #e8e8f0;
    --text-secondary: #9d9db5;
    --text-muted: #6b6b85;
    --accent: #c084fc;          /* purple-400 */
    --accent-light: #d8b4fe;    /* purple-300 */
    --accent-dark: #9333ea;     /* purple-600 */
    --accent-glow: rgba(192, 132, 252, 0.25);
    --success: #4ade80;
    --danger: #f87171;

    /* Typography */
    --font-en: 'Outfit', sans-serif;
    --font-ja: 'Noto Sans JP', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 6rem 0;
    --radius: 12px;
    --radius-sm: 8px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-ja);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-family: var(--font-en);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

/* ---------- Accent Color ---------- */
.accent {
    color: var(--accent);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(14, 14, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo .accent {
    -webkit-text-fill-color: var(--accent);
}

.global-nav {
    display: flex;
    gap: 2rem;
}

.global-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.global-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.global-nav a:hover {
    color: var(--text-primary);
}

.global-nav a:hover::after {
    width: 100%;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-sub {
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.2rem;
}

.hero-title {
    font-family: var(--font-ja);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 2.5rem;
}

/* Hero decorations */
.hero-deco {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
    user-select: none;
}

.hero-deco--1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.hero-deco--2 {
    top: 35%;
    right: 8%;
    animation-delay: 2s;
    font-size: 1.5rem;
}

.hero-deco--3 {
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
    font-size: 2.5rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
    color: #fff;
}

.btn-sm {
    padding: 0.55rem 1.2rem;
    font-size: 0.8rem;
    border-radius: 50px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(192, 132, 252, 0.05);
}

.btn-download {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
    color: #fff;
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 3rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-ja);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(192, 132, 252, 0.06);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.filter-icon {
    font-size: 1rem;
}

/* ============================================
   SORT CONTROL
   ============================================ */
.sort-control {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    margin-top: -1.5rem;
}

.btn-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-ja);
}

.btn-sort:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(192, 132, 252, 0.06);
}

.sort-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* ============================================
   TRACK GRID
   ============================================ */
.library {
    padding: var(--section-padding);
}

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

/* Track Card */
.track-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}

.track-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.track-card:hover {
    border-color: rgba(192, 132, 252, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.track-card:hover::before {
    opacity: 1;
}

.track-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.track-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.badge-new {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1200;
    vertical-align: middle;
    margin-left: 0.4rem;
    animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(251, 191, 36, 0); }
}

.track-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    background: rgba(192, 132, 252, 0.1);
    color: var(--accent-light);
    white-space: nowrap;
    border: 1px solid rgba(192, 132, 252, 0.15);
}

.track-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.track-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Audio Player */
.track-player {
    margin-bottom: 1rem;
}

.track-player audio {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    outline: none;
}

/* Webkit audio styling */
.track-player audio::-webkit-media-controls-panel {
    background: var(--surface);
}

/* Track Controls (Loop button) */
.track-controls {
    margin: 0.75rem 0;
    display: flex;
    gap: 0.5rem;
}

.btn-loop {
    background: rgba(192, 132, 252, 0.1);
    color: var(--accent);
    border: 1px solid rgba(192, 132, 252, 0.3);
    transition: all 0.3s ease;
}

.btn-loop:hover {
    background: rgba(192, 132, 252, 0.2);
    border-color: rgba(192, 132, 252, 0.5);
    transform: translateY(-1px);
}

.btn-loop.active {
    background: var(--accent);
    color: #1a1625;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* Track Actions */
.track-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.download-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.track-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1em;
}

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

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ============================================
   LIBRARY STATS
   ============================================ */
.library-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem 1rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
    transition: opacity var(--transition);
}

.library-stats:hover {
    opacity: 1;
}

.stats-label {
    font-weight: 400;
}

.stats-count {
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

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

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    border-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ============================================
   LICENSE
   ============================================ */
.license {
    padding: var(--section-padding);
}

.license-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.license-ok,
.license-ng {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.license-ok {
    border-top: 3px solid var(--success);
}

.license-ng {
    border-top: 3px solid var(--danger);
}

.license-ok h3,
.license-ng h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.license-ok ul,
.license-ng ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.license-ok li,
.license-ng li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 1.2rem;
    position: relative;
}

.license-ok li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.license-ng li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: bold;
}

.license-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 1rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .global-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(14, 14, 18, 0.97);
        backdrop-filter: blur(16px);
        padding: 1.5rem 2rem;
        gap: 1.2rem;
        border-bottom: 1px solid var(--border);
    }

    .global-nav.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-desc br {
        display: none;
    }

    .track-grid {
        grid-template-columns: 1fr;
    }

    .license-content {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .category-filter {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero {
        padding: 5rem 1.2rem 3rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .track-card {
        padding: 1.2rem;
    }
}

/* ============================================
   SECRET CARD (About Section)
   ============================================ */
.about-card--secret {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    background: var(--bg-card);
    cursor: pointer;
    text-decoration: none;
    min-height: 160px;
}

.about-card--secret:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.about-card--secret:hover .secret-icon {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    animation: secret-pulse 1.2s ease-in-out infinite;
}

.secret-icon {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition);
    user-select: none;
}

@keyframes secret-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.nav-game {
    color: var(--accent) !important;
    font-weight: 600 !important;
}
