/* ============================================================
   INNERSHIFT — Main Stylesheet
   Glass UI · Luxury · Modern · Deep
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=Playfair+Display:wght@400;500;600;700&display=swap');

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

:root {
    --color-bg: #0a0a1a;
    --color-bg-2: #12122a;
    --color-bg-3: #0d0d20;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.1);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --glass-border-strong: rgba(255, 255, 255, 0.25);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-3: #f093fb;
    --accent-4: #43e97b;
    --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --radius-full: 9999px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s ease;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 2s ease;
    will-change: opacity;
}

.login-bg.active { opacity: 1; }
.login-bg.inactive { opacity: 0; }

.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 30, 0.72) 0%,
        rgba(30, 20, 60, 0.55) 50%,
        rgba(10, 10, 30, 0.78) 100%
    );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Floating particles */
.login-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.login-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* Login Card */
.login-card {
    position: relative;
    z-index: 10;
    width: 440px;
    max-width: 92vw;
    padding: 52px 44px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(50px) saturate(1.6);
    -webkit-backdrop-filter: blur(50px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow:
        var(--shadow-deep),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: cardAppear 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.65) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
}

/* Form elements */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.login-error {
    background: rgba(245, 87, 108, 0.12);
    border: 1px solid rgba(245, 87, 108, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #f5576c;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.btn-login {
    width: 100%;
    padding: 17px;
    margin-top: 6px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-login:hover::after { opacity: 1; }
.btn-login:active { transform: translateY(0); }

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-2) 40%, var(--color-bg-3) 100%);
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* Ambient glow orbs */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    z-index: 0;
}

.ambient-orb-1 {
    top: -20%;
    right: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.07) 0%, transparent 70%);
}

.ambient-orb-2 {
    bottom: -25%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.05) 0%, transparent 70%);
}

.ambient-orb-3 {
    top: 40%;
    left: 50%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(67, 233, 123, 0.04) 0%, transparent 70%);
}

/* Header */
.dash-header {
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.dash-brand h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.65) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-user-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-logout {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

/* Greeting */
.dash-greeting {
    padding: 8px 40px 36px;
    position: relative;
    z-index: 10;
}

.dash-greeting h2 {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-secondary);
}

.dash-greeting h2 strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Categories Grid */
.categories-section {
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    aspect-ratio: 16 / 10;
    opacity: 0;
    transform: translateY(25px);
    animation: fadeSlideUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.category-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-card-bg {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.72) 100%
    );
}

.category-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-card:hover .category-card-shine { opacity: 1; }

.category-card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
}

.category-card-content h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.category-card-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* ============================================================
   CATEGORY DETAIL PAGE
   ============================================================ */

.detail-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-2) 40%, var(--color-bg-3) 100%);
    position: relative;
    overflow: hidden;
}

.detail-hero {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 26, 0.25) 0%,
        rgba(10, 10, 26, 0.6) 60%,
        rgba(10, 10, 26, 0.98) 100%
    );
}

.detail-hero-content {
    position: absolute;
    bottom: 36px;
    left: 40px;
    right: 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 20px;
    text-decoration: none;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-back svg {
    width: 16px;
    height: 16px;
}

.detail-hero-content h1 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.detail-hero-content .detail-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 6px;
    font-weight: 300;
}

/* Session list */
.sessions-list {
    padding: 36px 40px 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 10;
}

.session-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.session-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-medium);
}

.session-thumb {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.session-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.session-card:hover .session-thumb-overlay { opacity: 1; }

.session-thumb-overlay svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.session-info {
    flex: 1;
    min-width: 0;
}

.session-info h4 {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 4px;
}

.session-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.session-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.session-card:hover .session-play-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--glass-border-strong);
}

.session-play-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
    margin-left: 2px;
}

/* ============================================================
   AUDIO PLAYER PAGE
   ============================================================ */

.player-page {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.player-bg {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.35) saturate(1.3);
    transform: scale(1.15);
}

.player-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(10, 10, 26, 0.45) 0%,
        rgba(10, 10, 26, 0.88) 100%
    );
}

.player-nav {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 20;
}

.player-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    padding: 0 28px;
}

/* Artwork */
.player-artwork {
    width: 280px;
    height: 280px;
    border-radius: var(--radius-xl);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-deep);
    margin-bottom: 44px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.5s ease;
}

.player-artwork.is-playing {
    box-shadow:
        var(--shadow-deep),
        0 0 60px rgba(102, 126, 234, 0.15),
        0 0 120px rgba(240, 147, 251, 0.08);
}

.artwork-glow {
    position: absolute;
    inset: -6px;
    border-radius: calc(var(--radius-xl) + 6px);
    background: conic-gradient(
        from 0deg,
        rgba(102, 126, 234, 0.35),
        rgba(240, 147, 251, 0.35),
        rgba(67, 233, 123, 0.35),
        rgba(79, 172, 254, 0.35),
        rgba(102, 126, 234, 0.35)
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
    filter: blur(18px);
}

.player-artwork.is-playing .artwork-glow {
    opacity: 1;
    animation: glowRotate 10s linear infinite;
}

@keyframes glowRotate {
    to { transform: rotate(360deg); }
}

/* Titles */
.player-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.player-category-name {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 36px;
    letter-spacing: 0.5px;
}

/* Visualizer */
.visualizer {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 32px;
}

.viz-bar {
    width: 4px;
    min-height: 4px;
    border-radius: 4px;
    background: linear-gradient(
        180deg,
        rgba(102, 126, 234, 0.9) 0%,
        rgba(240, 147, 251, 0.6) 50%,
        rgba(67, 233, 123, 0.4) 100%
    );
    transition: height 0.07s ease-out;
}

.viz-bar.idle {
    height: 4px !important;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress bar */
.progress-wrapper {
    width: 100%;
    margin-bottom: 28px;
}

.progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

.progress-track:hover { height: 7px; }

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
    border-radius: var(--radius-full);
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.progress-track:hover .progress-fill::after {
    transform: translateY(-50%) scale(1);
}

.progress-times {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Player controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 36px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.ctrl-btn:hover {
    color: var(--text-primary);
    transform: scale(1.12);
}

.ctrl-btn svg {
    width: 24px;
    height: 24px;
}

/* Main play button */
.play-btn-main {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.play-btn-main::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(102, 126, 234, 0.4),
        rgba(240, 147, 251, 0.4),
        rgba(67, 233, 123, 0.4),
        rgba(102, 126, 234, 0.4)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(10px);
}

.play-btn-main:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 12px 44px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.play-btn-main:hover::before { opacity: 1; }

.play-btn-main.is-playing::before {
    opacity: 1;
    animation: glowRotate 5s linear infinite;
}

.play-btn-main:active { transform: scale(0.95); }

.play-btn-main svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.play-btn-main .play-icon { margin-left: 3px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .dash-header,
    .dash-greeting,
    .categories-section,
    .sessions-list {
        padding-left: 20px;
        padding-right: 20px;
    }

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

    .login-card {
        padding: 40px 28px;
    }

    .detail-hero { height: 240px; }
    .detail-hero-content { left: 20px; right: 20px; bottom: 24px; }
    .detail-hero-content h1 { font-size: 30px; }
    .sessions-list { padding-left: 20px; padding-right: 20px; }

    /* ---- PLAYER MOBILE FIX ---- */
    .player-page {
        height: 100dvh;             /* dynamic viewport — respects Safari bar */
        height: -webkit-fill-available; /* fallback for older iOS */
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
    }

    .player-content {
        padding: 0 20px;
        max-width: 100%;
        justify-content: center;
    }

    .player-nav {
        top: max(12px, env(safe-area-inset-top));
        left: 16px;
    }

    .player-artwork {
        width: 44vw;
        height: 44vw;
        max-width: 200px;
        max-height: 200px;
        margin-bottom: 20px;
        border-radius: var(--radius-lg);
    }

    .player-title {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .player-category-name {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .visualizer {
        height: 48px;
        margin-bottom: 16px;
        gap: 2px;
    }

    .viz-bar { width: 3px; }

    .progress-wrapper {
        margin-bottom: 16px;
    }

    .progress-times {
        margin-top: 6px;
        font-size: 11px;
    }

    .player-controls {
        gap: 28px;
    }

    .play-btn-main {
        width: 64px;
        height: 64px;
    }

    .play-btn-main svg {
        width: 26px;
        height: 26px;
    }

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

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .session-card { padding: 14px; gap: 16px; }
    .session-thumb { width: 60px; height: 60px; }

    .player-artwork {
        width: 40vw;
        height: 40vw;
        max-width: 170px;
        max-height: 170px;
        margin-bottom: 16px;
    }

    .player-title { font-size: 20px; }

    .visualizer {
        height: 40px;
        margin-bottom: 12px;
    }

    .player-controls { gap: 24px; }

    .play-btn-main {
        width: 58px;
        height: 58px;
    }
}

/* Extra small phones (iPhone SE, etc.) */
@media (max-height: 667px) {
    .player-artwork {
        width: 35vw;
        height: 35vw;
        max-width: 150px;
        max-height: 150px;
        margin-bottom: 12px;
    }

    .player-title { font-size: 18px; }
    .player-category-name { margin-bottom: 10px; font-size: 12px; }
    .visualizer { height: 32px; margin-bottom: 10px; }
    .progress-wrapper { margin-bottom: 12px; }
    .player-controls { gap: 20px; }
    .play-btn-main { width: 52px; height: 52px; }
    .play-btn-main svg { width: 22px; height: 22px; }
    .player-nav { top: 8px; left: 12px; }
    .btn-back { padding: 8px 14px; font-size: 12px; }
}

/* PWA standalone mode — no browser chrome */
@media (display-mode: standalone) {
    .player-page {
        height: 100vh;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .player-nav {
        top: max(16px, env(safe-area-inset-top));
    }

    .dash-header {
        padding-top: max(28px, env(safe-area-inset-top));
    }
}
