/* ============================================
   Renew My Mind — Apple-Inspired Design
   ============================================ */

:root {
    --bg: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2d2d2f;
    --text: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;
    --accent: #2997ff;
    --accent-hover: #5cb3ff;
    --border: #424245;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--accent); color: #fff; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.nav-logo:hover { opacity: 0.8; }

.logo-icon {
    color: var(--text);
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover { color: var(--text); }

.nav-cta {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: 980px;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 18px 32px;
    font-size: 17px;
    font-weight: 500;
    border-radius: 980px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-dark {
    background: var(--text);
    color: var(--bg);
}

.btn-dark:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

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

.btn-light:hover {
    background: var(--text);
    color: var(--bg);
}

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

.btn-outline:hover {
    background: var(--text);
    color: var(--bg);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 22px 80px;
    background: var(--bg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
}

.hero-label {
    font-size: 21px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(48px, 10vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
}

.hero-desc {
    font-size: 21px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .hero-desc { font-size: 17px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
}

/* ===== STATS ===== */
.stats {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 22px;
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 56px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 600px) {
    .stats-inner { gap: 40px; }
    .stat-num { font-size: 40px; }
}

/* ===== SECTIONS ===== */
.section {
    padding: 96px 22px;
    background: var(--bg);
}

.section-header {
    max-width: 680px;
    margin: 0 auto 64px;
    text-align: center;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 19px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== SERIES ===== */
.series-section {
    background: var(--bg-secondary);
}

.series-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.series-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.series-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.series-card-icon {
    display: inline-block;
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.series-card-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.series-card-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.series-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.series-card-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.series-card-arrow {
    color: var(--text-tertiary);
    transition: var(--transition);
}

.series-card:hover .series-card-arrow {
    transform: translateX(8px);
    color: var(--accent);
}

/* ===== LIBRARY ===== */
.library-section {
    background: var(--bg);
}

.filters {
    max-width: 1100px;
    margin: 0 auto 32px;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.library-section .section-header {
    margin-bottom: 48px;
}

.search-box {
    max-width: 680px;
    margin: 0 auto 40px;
    padding: 0 24px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 17px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.search-input::placeholder { 
    color: var(--text-tertiary); 
}

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

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 980px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.filter-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.filter-chip-count {
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 980px;
    font-weight: 600;
}

.filter-chip:not(.active) .filter-chip-count {
    background: rgba(255, 255, 255, 0.1);
}

.sort-group {
    /* removed margin-left: auto */
}

.sort-select {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 980px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-results {
    font-size: 14px;
    color: var(--text-tertiary);
    text-align: center;
    width: 100%;
    padding-top: 16px;
}

.video-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.video-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--border);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg);
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.video-card:hover .video-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-preview {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
}

.video-card.hovering .video-thumb img {
    opacity: 0;
}

.video-card.hovering .video-preview {
    display: block;
}

.video-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-play svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.video-meta {
    padding: 24px;
}

.video-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.video-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.video-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 980px;
    font-size: 12px;
    font-weight: 500;
}

.video-tag.genre {
    background: rgba(41, 151, 255, 0.15);
    color: var(--accent);
}

.video-views {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.loader-wrap {
    display: none;
    justify-content: center;
    padding: 60px 0;
}

.loader-wrap.active { display: flex; }

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== ABOUT ===== */
.about-section {
    background: #f5f5f7;
    color: #1d1d1f;
}

.about-section .section-label { color: var(--accent); }
.about-section .section-title { color: #1d1d1f; }
.about-section .section-desc { color: #86868b; }

.about-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text p {
    font-size: 17px;
    line-height: 1.6;
    color: #424245;
    margin-bottom: 16px;
}

.verse {
    margin: 32px 0;
    padding: 32px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--accent);
}

.verse p {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: #1d1d1f;
    font-style: italic;
    margin-bottom: 12px;
}

.verse cite {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-style: normal;
}

.about-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    padding: 32px 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.card:nth-child(1) { grid-column: 1 / -1; }

.card-dark { background: #1d1d1f; color: #fff; }
.card-dark .card-num { color: var(--accent); }
.card-dark .card-label { color: rgba(255, 255, 255, 0.6); }
.card-dark .card-icon { color: var(--accent); }

.card-light { background: #fff; }

.card-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 12px;
}

.card-num {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.card-label {
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .about-cards { max-width: 400px; }
}

/* ===== JOIN ===== */
.join-section {
    background: var(--bg);
    text-align: center;
}

.form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.form input {
    flex: 1;
    min-width: 180px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 16px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form input::placeholder { color: var(--text-tertiary); }

.form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.2);
}

.form-msg {
    margin-top: 16px;
    font-size: 14px;
    min-height: 20px;
}

.form-msg.success { color: #30d158; }
.form-msg.error { color: #ff453a; }

.privacy {
    font-size: 13px;
    color: var(--text-tertiary);
}

@media (max-width: 500px) {
    .form { flex-direction: column; }
    .form input, .form button { width: 100%; }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 22px 24px;
}

.footer-inner {
    max-width: 980px;
    margin: 0 auto;
}

.footer-brand {
    max-width: 280px;
    margin-bottom: 24px;
}

.footer-brand .nav-logo { margin-bottom: 12px; }

.footer-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-tertiary);
}

@media (min-width: 600px) {
    .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
}

.modal.active { display: flex; }

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: var(--accent); }

.modal-video {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-info {
    padding: 28px 32px;
}

.modal-info h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    padding: 6px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .section { padding: 64px 22px; }
    .hero { padding: 120px 22px 60px; }
    .hero-title { font-size: 40px; }
}