/* =========================================================
   Medica - Modern RTL Medical Video Template
========================================================= */

:root {
    --theme: #7c3aed;
    --theme-rgb: 124, 58, 237;
    --theme-dark: #5b21b6;
    --theme-secondary: #a855f7;

    --body-bg: #f8f7fc;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #fff;
    --surface-soft: #f4f1fa;

    --heading: #191329;
    --text: #332c41;
    --text-soft: #746d82;

    --border: rgba(66, 44, 91, 0.1);
    --border-theme: rgba(var(--theme-rgb), 0.2);

    --shadow-xs: 0 5px 16px rgba(42, 25, 75, 0.05);
    --shadow-sm: 0 12px 35px rgba(42, 25, 75, 0.08);
    --shadow-md: 0 24px 60px rgba(42, 25, 75, 0.14);
    --shadow-theme: 0 18px 40px rgba(var(--theme-rgb), 0.25);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;

    --header-height: 78px;
    --font-size: 16px;

    --transition-fast: 180ms ease;
    --transition: 320ms cubic-bezier(.2, .8, .2, 1);
}

/* Dark mode */
[data-bs-theme="dark"] {
    --body-bg: #0d0914;
    --surface: rgba(28, 21, 39, 0.88);
    --surface-solid: #191320;
    --surface-soft: #241b30;

    --heading: #fff;
    --text: #eee9f5;
    --text-soft: #aaa1b8;

    --border: rgba(255, 255, 255, 0.08);

    --shadow-xs: 0 5px 16px rgba(0, 0, 0, 0.16);
    --shadow-sm: 0 14px 38px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 25px 65px rgba(0, 0, 0, 0.36);
}

/* Reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 92% 5%,
            rgba(var(--theme-rgb), 0.12),
            transparent 27rem
        ),
        radial-gradient(
            circle at 5% 50%,
            rgba(var(--theme-rgb), 0.06),
            transparent 24rem
        ),
        var(--body-bg);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: var(--font-size);
    line-height: 1.9;
    transition:
        color var(--transition),
        background-color var(--transition);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    content: "";
    pointer-events: none;
    opacity: 0.25;
    background-image:
        linear-gradient(
            rgba(var(--theme-rgb), 0.04) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(var(--theme-rgb), 0.04) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit !important;
}

::selection {
    color: #fff;
    background: var(--theme);
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--surface-soft);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--surface-soft);
    border-radius: 20px;
    background: var(--theme);
}

/* Utilities */
.text-theme {
    color: var(--theme) !important;
}

.text-soft {
    color: var(--text-soft) !important;
}

.section-space {
    padding: 90px 0;
}

.section-space-sm {
    padding: 58px 0;
}

.min-width-0 {
    min-width: 0;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme), var(--theme-secondary));
    box-shadow: 0 0 14px rgba(var(--theme-rgb), 0.65);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 11px 0;
    transition: var(--transition);
}

.site-header::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    border-bottom: 1px solid transparent;
    background: rgba(248, 247, 252, 0.68);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: var(--transition);
}

[data-bs-theme="dark"] .site-header::before {
    background: rgba(13, 9, 20, 0.72);
}

.site-header.is-scrolled {
    padding: 6px 0;
}

.site-header.is-scrolled::before {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.navbar {
    min-height: 56px;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--heading) !important;
    font-size: 1.45rem;
    font-weight: 900;
}

.brand-icon {
    position: relative;
    display: inline-grid;
    width: 47px;
    height: 47px;
    place-items: center;
    overflow: hidden;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--theme), var(--theme-secondary));
    box-shadow: var(--shadow-theme);
    transform: rotate(-4deg);
}

.brand-icon::after {
    position: absolute;
    inset: -50%;
    content: "";
    background: linear-gradient(
        115deg,
        transparent 38%,
        rgba(255, 255, 255, 0.35),
        transparent 62%
    );
    transform: translateX(-100%);
    animation: logoShine 4s infinite;
}

.navbar-nav {
    gap: 3px;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 9px 13px !important;
    color: var(--text-soft);
    border-radius: 13px;
    font-weight: 700;
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--theme);
    background: rgba(var(--theme-rgb), 0.08);
}

.header-action {
    display: inline-grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.header-action:hover {
    color: #fff;
    border-color: transparent;
    background: var(--theme);
    box-shadow: var(--shadow-theme);
    transform: translateY(-2px);
}

.navbar-toggler {
    width: 43px;
    height: 43px;
    padding: 0;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: none !important;
}

/* Search */
.search-box {
    position: relative;
    width: min(270px, 100%);
}

.search-box .form-control {
    height: 45px;
    padding-right: 43px;
    border-radius: 15px;
}

.search-box i {
    position: absolute;
    top: 50%;
    right: 15px;
    z-index: 2;
    color: var(--text-soft);
    transform: translateY(-50%);
}

/* Buttons */
.btn {
    border-radius: 14px;
    font-weight: 800;
    transition: var(--transition);
}

.btn-theme {
    position: relative;
    overflow: hidden;
    color: #fff !important;
    border: 0;
    background: linear-gradient(135deg, var(--theme), var(--theme-secondary));
    box-shadow: 0 13px 28px rgba(var(--theme-rgb), 0.24);
}

.btn-theme:hover {
    color: #fff;
    box-shadow: var(--shadow-theme);
    transform: translateY(-3px);
}

.btn-soft-theme {
    color: var(--theme);
    border: 1px solid rgba(var(--theme-rgb), 0.16);
    background: rgba(var(--theme-rgb), 0.08);
}

.btn-soft-theme:hover {
    color: #fff;
    border-color: var(--theme);
    background: var(--theme);
    transform: translateY(-2px);
}

/* Cards */
.glass-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.glass-card:hover {
    border-color: rgba(var(--theme-rgb), 0.28);
    box-shadow: var(--shadow-md);
}

/* Hero slider */
.hero-section {
    padding: 25px 0 35px;
}

.hero-slider {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 75px rgba(47, 29, 79, 0.18);
}

.hero-slide {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s ease;
}

.carousel-item.active .hero-slide > img {
    transform: scale(1.06);
}

.hero-slide::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background: linear-gradient(
        90deg,
        rgba(18, 10, 30, 0.18),
        rgba(18, 10, 30, 0.8) 58%,
        rgba(18, 10, 30, 0.96)
    );
}

.hero-content {
    display: flex;
    min-height: 520px;
    max-width: 760px;
    flex-direction: column;
    justify-content: center;
    padding: 65px 7%;
    color: #fff;
}

.hero-content .badge {
    width: fit-content;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2 {
    margin: 17px 0;
    font-size: clamp(2rem, 4.2vw, 4rem);
    font-weight: 900;
    line-height: 1.3;
}

.hero-content p {
    max-width: 610px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.04rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 19px;
}

.hero-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 21px;
    color: #20142f;
    border-radius: 15px;
    background: #fff;
    font-weight: 900;
    transition: var(--transition);
}

.hero-play:hover {
    color: var(--theme);
    transform: translateY(-3px);
}

.hero-play i {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--theme);
}

.carousel-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 20px;
    transition: width var(--transition);
}

.carousel-indicators .active {
    width: 33px;
    background-color: var(--theme);
}

/* Section title */
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 29px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 13px;
}

.section-title-icon {
    display: inline-grid;
    width: 49px;
    height: 49px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--theme), var(--theme-secondary));
    box-shadow: var(--shadow-theme);
}

.section-title {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 900;
}

.section-subtitle {
    margin: 4px 0 0;
    color: var(--text-soft);
}

/* =========================================================
   Categories - All colors follow selected theme
========================================================= */

.category-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 7px 3px 18px;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-card {
    position: relative;
    min-width: 168px;
    overflow: hidden;
    padding: 26px 17px 22px;
    text-align: center;
    border-color: rgba(var(--theme-rgb), 0.13);
}

.category-card::before {
    position: absolute;
    top: -70px;
    right: -70px;
    width: 150px;
    height: 150px;
    content: "";
    border-radius: 50%;
    background: rgba(var(--theme-rgb), 0.07);
    transition: var(--transition);
}

.category-card:hover {
    border-color: rgba(var(--theme-rgb), 0.35);
    transform: translateY(-8px);
}

.category-card:hover::before {
    background: rgba(var(--theme-rgb), 0.13);
    transform: scale(1.4);
}

/* آیکون کاملاً وابسته به رنگ تم */
.category-icon {
    position: relative;
    z-index: 2;
    display: inline-grid;
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    place-items: center;
    color: var(--theme);
    border: 1px solid rgba(var(--theme-rgb), 0.15);
    border-radius: 22px;
    background: rgba(var(--theme-rgb), 0.1);
    box-shadow: 0 10px 25px rgba(var(--theme-rgb), 0.1);
    font-size: 1.75rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--theme), var(--theme-secondary));
    box-shadow: var(--shadow-theme);
    transform: rotate(-5deg) scale(1.06);
}

.category-card h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 9px;
    color: var(--heading);
    font-size: 1rem;
    font-weight: 900;
}

/* تعداد ویدیوها کاملاً وابسته به رنگ تم */
.category-count {
    position: relative;
    z-index: 2;
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 11px;
    color: var(--theme);
    border: 1px solid rgba(var(--theme-rgb), 0.15);
    border-radius: 30px;
    background: rgba(var(--theme-rgb), 0.08);
    font-size: 0.76rem;
    font-weight: 900;
    transition: var(--transition);
}

.category-count i {
    color: var(--theme);
}

.category-card:hover .category-count {
    color: #fff;
    border-color: var(--theme);
    background: var(--theme);
}

.category-card:hover .category-count i {
    color: #fff;
}

/* Video card */
.video-card {
    height: 100%;
    overflow: hidden;
}

.video-card:hover {
    transform: translateY(-9px);
}

.video-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin: 7px;
    border-radius: calc(var(--radius-lg) - 6px);
    background: var(--surface-soft);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 700ms cubic-bezier(.2, .8, .2, 1),
        filter var(--transition);
}

.video-card:hover .video-thumbnail img {
    filter: brightness(0.72) saturate(1.08);
    transform: scale(1.09);
}

.video-duration {
    position: absolute;
    right: 11px;
    bottom: 11px;
    z-index: 3;
    padding: 3px 9px;
    color: #fff;
    border-radius: 9px;
    background: rgba(10, 7, 15, 0.75);
    font-size: 0.73rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.play-overlay span {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(var(--theme-rgb), 0.84);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
    font-size: 1.5rem;
    backdrop-filter: blur(8px);
    transform: scale(0.7);
    transition: transform var(--transition);
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-card:hover .play-overlay span {
    transform: scale(1);
}

.video-card-body {
    padding: 14px 19px 20px;
}

.video-category {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    color: var(--theme);
    border-radius: 9px;
    background: rgba(var(--theme-rgb), 0.08);
    font-size: 0.74rem;
    font-weight: 900;
}

.video-card-title {
    display: -webkit-box;
    min-height: 55px;
    overflow: hidden;
    margin-bottom: 12px;
    color: var(--heading);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.75;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-card-title a:hover {
    color: var(--theme);
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--text-soft);
    font-size: 0.77rem;
}

.video-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Page hero */
.page-hero {
    margin-top: 20px;
}

.page-hero-inner {
    position: relative;
    overflow: hidden;
    padding: 60px 7%;
    color: #fff;
    border-radius: var(--radius-xl);
    background: linear-gradient(
        125deg,
        #281343,
        var(--theme-dark) 55%,
        var(--theme-secondary)
    );
    box-shadow: var(--shadow-theme);
}

.page-hero-inner::before {
    position: absolute;
    top: -150px;
    left: -80px;
    width: 370px;
    height: 370px;
    content: "";
    border: 65px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
}

.page-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumb {
    margin: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.67);
}

.breadcrumb-item.active {
    color: #fff;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

/* Forms and content */
.form-card,
.content-card,
.video-detail-card,
.doctor-card {
    padding: clamp(22px, 4vw, 36px);
}

.form-label {
    margin-bottom: 8px;
    color: var(--heading);
    font-weight: 800;
}

.form-control,
.form-select {
    min-height: 52px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    background-color: var(--surface-soft);
    box-shadow: none !important;
}

textarea.form-control {
    min-height: 145px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus {
    color: var(--text);
    border-color: rgba(var(--theme-rgb), 0.55);
    background-color: var(--surface-solid);
    box-shadow: 0 0 0 4px rgba(var(--theme-rgb), 0.1) !important;
}

.form-control::placeholder {
    color: var(--text-soft);
    opacity: 0.7;
}

.form-check-input:checked {
    border-color: var(--theme);
    background-color: var(--theme);
}

/* Video page */
.video-player-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    background: #08070b;
    box-shadow: 0 28px 70px rgba(20, 10, 37, 0.25);
}

.video-player-wrapper video,
.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-detail-title {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.4rem, 3vw, 2.15rem);
    font-weight: 900;
    line-height: 1.55;
}

.video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.action-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    font-weight: 800;
    transition: var(--transition);
}

.action-button:hover,
.action-button.active {
    color: var(--theme);
    border-color: rgba(var(--theme-rgb), 0.25);
    background: rgba(var(--theme-rgb), 0.09);
    transform: translateY(-2px);
}

.doctor-avatar {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 4px solid var(--surface-solid);
    border-radius: 24px;
    box-shadow: 0 0 0 2px rgba(var(--theme-rgb), 0.17);
}

.sidebar-video {
    display: grid;
    grid-template-columns: 125px 1fr;
    gap: 13px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-video:last-child {
    border-bottom: 0;
}

.sidebar-video-image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 13px;
}

.sidebar-video-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.sidebar-video:hover img {
    transform: scale(1.08);
}

.sidebar-video h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 7px;
    color: var(--heading);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Contact, about and rules */
.contact-info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 22px;
}

.contact-info-card:hover {
    transform: translateX(-5px);
}

.contact-info-icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--theme);
    border: 1px solid rgba(var(--theme-rgb), 0.14);
    border-radius: 18px;
    background: rgba(var(--theme-rgb), 0.09);
    font-size: 1.3rem;
}

.stat-card,
.feature-card {
    height: 100%;
    padding: 28px 22px;
}

.stat-card {
    text-align: center;
}

.stat-card:hover,
.feature-card:hover {
    transform: translateY(-7px);
}

.stat-number {
    display: block;
    color: var(--theme);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
}

.rules-nav {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    padding: 19px;
}

.rules-nav a {
    display: block;
    margin-bottom: 5px;
    padding: 9px 12px;
    color: var(--text-soft);
    border-radius: 11px;
    font-size: 0.88rem;
    font-weight: 700;
}

.rules-nav a:hover,
.rules-nav a.active {
    color: var(--theme);
    background: rgba(var(--theme-rgb), 0.08);
}

.rule-section {
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
}

.rule-section:last-child {
    border-bottom: 0;
}

.rule-section h2 {
    position: relative;
    margin-bottom: 16px;
    padding-right: 17px;
    color: var(--heading);
    font-size: 1.25rem;
    font-weight: 900;
}

.rule-section h2::before {
    position: absolute;
    top: 7px;
    right: 0;
    width: 6px;
    height: 23px;
    content: "";
    border-radius: 10px;
    background: var(--theme);
}

/* Newsletter */
.newsletter {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 7vw, 70px) 25px;
    color: #fff;
    border-radius: var(--radius-xl);
    background: linear-gradient(
        125deg,
        #28133e,
        var(--theme-dark),
        var(--theme-secondary)
    );
    box-shadow: var(--shadow-theme);
}

.newsletter::before {
    position: absolute;
    top: -140px;
    right: -80px;
    width: 320px;
    height: 320px;
    content: "";
    border: 50px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.newsletter-content {
    position: relative;
    z-index: 2;
}

/* Footer */
.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 65px;
    padding: 68px 0 25px;
    color: #c8c0d3;
    background: #17101f;
}

.site-footer::before {
    position: absolute;
    top: -220px;
    right: -130px;
    width: 510px;
    height: 510px;
    content: "";
    border-radius: 50%;
    background: rgba(var(--theme-rgb), 0.17);
    filter: blur(90px);
}

.site-footer h5,
.site-footer h6 {
    color: #fff;
    font-weight: 900;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    width: fit-content;
    color: #aaa0b7;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-4px);
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.social-links a:hover {
    border-color: transparent;
    background: var(--theme);
    transform: translateY(-4px);
}

.footer-bottom {
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Settings */
.settings-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1040;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #fff;
    border: 0;
    border-radius: 19px;
    background: linear-gradient(135deg, var(--theme), var(--theme-secondary));
    box-shadow: var(--shadow-theme);
    font-size: 1.3rem;
    transition: var(--transition);
}

.settings-toggle:hover {
    transform: translateY(-4px) rotate(12deg);
}

.settings-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    z-index: 1040;
    width: min(330px, calc(100% - 30px));
    padding: 22px;
    visibility: hidden;
    opacity: 0;
    border: 1px solid var(--border);
    border-radius: 23px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(22px);
    transform: translateY(18px) scale(0.96);
    transition: var(--transition);
}

.settings-panel.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.theme-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.theme-color {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 4px solid var(--surface-solid);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border);
    transition: var(--transition);
}

.theme-color:hover,
.theme-color.active {
    box-shadow:
        0 0 0 3px var(--surface-solid),
        0 0 0 5px currentColor;
    transform: scale(1.08);
}

/* Skeleton */
.skeleton-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--surface-soft);
}

.skeleton-wrapper::before {
    position: absolute;
    inset: 0;
    z-index: 5;
    content: "";
    background: linear-gradient(
        100deg,
        transparent 25%,
        rgba(255, 255, 255, 0.68) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: skeletonMove 1.35s infinite;
}

[data-bs-theme="dark"] .skeleton-wrapper::before {
    background: linear-gradient(
        100deg,
        transparent 25%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
}

.skeleton-wrapper.loaded::before {
    display: none;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 700ms cubic-bezier(.16, 1, .3, 1),
        transform 700ms cubic-bezier(.16, 1, .3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile navigation */
.mobile-bottom-nav {
    display: none;
}

/* Toast */
.toast {
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

/* Animations */
@keyframes logoShine {
    0%,
    60% {
        transform: translateX(-100%) rotate(10deg);
    }

    80%,
    100% {
        transform: translateX(120%) rotate(10deg);
    }
}

@keyframes skeletonMove {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    :root {
        --header-height: 70px;
    }

    .section-space {
        padding: 70px 0;
    }

    .navbar-collapse {
        max-height: calc(100vh - 95px);
        overflow-y: auto;
        margin-top: 12px;
        padding: 17px;
        border: 1px solid var(--border);
        border-radius: 20px;
        background: var(--surface);
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(20px);
    }

    .search-box {
        width: 100%;
        margin-top: 12px;
    }

    .hero-slide,
    .hero-content {
        min-height: 470px;
    }

    .rules-nav {
        position: static;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 74px;
    }

    .section-space {
        padding: 56px 0;
    }

    .section-space-sm {
        padding: 43px 0;
    }

    .hero-section {
        padding-top: 12px;
    }

    .hero-slider {
        border-radius: 25px;
    }

    .hero-slide,
    .hero-content {
        min-height: 490px;
    }

    .hero-slide::before {
        background: linear-gradient(
            0deg,
            rgba(15, 8, 25, 0.97),
            rgba(15, 8, 25, 0.22)
        );
    }

    .hero-content {
        justify-content: flex-end;
        padding: 44px 24px 64px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2rem;
    }

    .section-subtitle {
        display: none;
    }

    .page-hero-inner {
        padding: 45px 25px;
        border-radius: 25px;
    }

    .settings-toggle {
        right: auto;
        bottom: 87px;
        left: 16px;
        width: 52px;
        height: 52px;
        border-radius: 17px;
    }

    .settings-panel {
        right: 15px;
        bottom: 150px;
        width: calc(100% - 30px);
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 12px;
        bottom: 9px;
        left: 12px;
        z-index: 1030;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: var(--surface);
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(22px);
    }

    .mobile-bottom-nav a {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        color: var(--text-soft);
        border-radius: 15px;
        font-size: 0.67rem;
        font-weight: 800;
    }

    .mobile-bottom-nav a i {
        font-size: 1.14rem;
    }

    .mobile-bottom-nav a.active {
        color: var(--theme);
        background: rgba(var(--theme-rgb), 0.09);
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .brand-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 1.75rem;
    }

    .category-card {
        min-width: 145px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .sidebar-video {
        grid-template-columns: 112px 1fr;
    }

    .action-button {
        flex-grow: 1;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.hero-slide::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background: none;
}

.feature-card{
    text-align:center;
}
