/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --bg-body: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --error-color: #dc3545;
    --input-border: #cbd5e1;
    --input-focus: #818cf8;
    --accent-color: #f59e0b;
    --plyr-color-main: #cc0000;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/vazirmatn/light.woff2') format('woff2');
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url('../fonts/vazirmatn/regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: bold;
    font-display: swap;
    src: url('../fonts/vazirmatn/bold.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', tahoma, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* =========================================
   2. UTILITIES & LAYOUT
   ========================================= */
.container { width: 100%; max-width: 500px; margin: auto; }
.dashboard-container { max-width: 900px; align-self: flex-start; padding-top: 40px; }
.text-center { text-align: center; }
.text-start { text-align: left; direction: ltr; }
.mb-5 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }
.pt-4 { padding-top: 1.5rem; }
.fw-bold { font-weight: bold; }
.text-primary { color: var(--primary-color); }
.text-dark { color: var(--text-dark); }
.text-muted { color: var(--text-muted); }
.w-100 { width: 100%; }
.d-none { display: none; }
.pe-none { pointer-events: none; }
.d-flex-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

*,
*:focus,
*:active {
    outline: none;
}

/* =========================================
   3. ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); } 
    75% { transform: translateX(-5px); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes shakeAnimation {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.95) rotate(-2deg); }
    30%, 50%, 70%, 90% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0); }
}
.animate-up { animation: fadeInUp 0.8s ease-out forwards; }
.shake-field { animation: fieldShake 0.3s ease-in-out 2; }
.shake-animation { animation: shakeAnimation 0.6s ease-in-out; }

/* =========================================
   4. LANDING PAGE ELEMENTS (Page 1)
   ========================================= */
.instructor-image-container {
    width: 100%; margin-bottom: -20px; border-radius: 20px;
    overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: relative; z-index: 1;
}
.instructor-image-container img { width: 100%; height: auto; display: block; object-fit: contain; }
.glass-card {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); padding: 40px 30px; position: relative; z-index: 2;
}
.glass-card h3 { text-align: center; font-weight: 800; margin-bottom: 25px; font-size: 1.5rem; line-height: 1.5; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.form-control {
    width: 100%; padding: 12px 15px; font-size: 1rem; font-family: inherit;
    border: 2px solid var(--input-border); border-radius: 12px; transition: all 0.3s ease;
}
.form-control:focus { outline: none; border-color: var(--input-focus); box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2); }
.form-control.is-invalid { border-color: var(--error-color) !important; box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important; }
.error-feedback { color: var(--error-color); font-size: 0.8rem; margin-top: 5px; display: none; font-weight: 600; }
.btn-main {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white; border: none; border-radius: 12px; padding: 15px; font-size: 1.1rem;
    font-family: inherit; font-weight: bold; width: 100%; cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4); display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 30px;
}
.btn-main:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.5); }
.btn-main:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.spinner {
    display: none; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%; border-top-color: white; animation: spin 1s ease-in-out infinite;
}

/* =========================================
   5. WELCOME PAGE ELEMENTS (Page 2)
   ========================================= */
.video-box {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-box.with-border {
    border: 4px solid white;
}

.plyr {
    direction: ltr;
}
.plyr__tooltip {
    display: none !important;
}
.action-buttons {
    display: flex;
    gap: 20px; justify-content: center; flex-direction: column; align-items: center;
}
@media (min-width: 768px) { .action-buttons { flex-direction: row; } }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-success { background: #10b981; }
.btn-success:hover, .btn-success:focus { background: #059669; }
.btn-telegram { background: #0088cc; }
.btn-telegram:hover, .btn-telegram:focus { background: #047fbd; }
.card { background: white; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); overflow: hidden; }
.card-header { background: #1e293b; color: white; padding: 15px; text-align: center; }
.card-header h3 { font-size: 1.2rem; margin: 0; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: center; }
.table th, .table td { padding: 15px; border-bottom: 1px solid #eee; }
.table th { background: #f8fafc; font-weight: bold; }
.table tr:last-child td { border-bottom: none; }
/* =========================================
   6. DOLLAR PAGE ELEMENTS (Page 3 / VSL)
   ========================================= */
body.page-dollar {
    background-color: #233a52; /* Match image exact background */
    color: #ffffff;
    display: block; /* Override flex */
    padding: 40px 15px;
}
.page-dollar .dollar-container {
    max-width: 750px;
    margin: 0 auto;
}
.page-dollar .header-title {
    font-size: 1.6rem;
    margin-bottom: 5px;
    font-weight: bold;
}
.page-dollar .header-title span {
    color: #ffc107; /* Gold/yellow accent from image */
}
.page-dollar .header-time {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: #ffffff;
}
.vsl-card {
    background: #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.vsl-card-header {
    background: #004b6b; /* Dark teal/blue */
    color: #ffffff;
    padding: 8px;
}
.vsl-card-header .dashed-border {
    border: 2px dashed rgba(255,255,255,0.4);
    padding: 15px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
}
.vsl-card-body {
    padding: 20px 30px 40px 30px;
    color: #333333;
    text-align: center;
}
.vsl-card-body h4 {
    font-size: 1.2rem;
    font-weight: normal;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}
.page-dollar .video-box {
    margin-bottom: 25px;
    border-radius: 0;
    border: 3px solid #000;
}
.page-dollar .delayed-action-wrapper {
    display: none; 
}
.btn-red {
    display: inline-block;
    padding: 10px 43px;
    color: #fff;
    background: #bd030c;
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #FFF;
    border-radius: 50px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.36);
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-red:hover {
    transform: translateY(3px);
    color: #ffffff;
}
.dollar-footer {
    overflow: hidden;
    font-size: 1.6rem;
    position: relative;
}
.footer-btn-wrapper {
    display: block;
    margin-top: 25px;
}
.btn-footer {
    background: #ffffff;
    color: #004b6b;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 4px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-footer:hover {
    background: #e2e8f0;
    color: #003a55;
}
.footer-arrow {
    position: absolute;
    top: 5%;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: -1;
}
.arrow-left {
    right: 2%;
    transform: scaleX(-1) rotate(-10deg);
}
.arrow-right {
    left: 2%;
    transform: rotate(-10deg);
}

@media (max-width: 600px) {
    .page-dollar .header-title { font-size: 1.4rem; }
    .vsl-card-header .dashed-border { font-size: 1.1rem; padding: 10px; }
}

/* =========================================
   6b. WEBINAR PAGE
   ========================================= */
body.page-webinar {
    --plyr-color-main: #22c55e;
    background-color: #ffffff;
    color: #222222;
    display: block;
    padding: 0;
    min-height: 100vh;
}

.page-webinar .webinar-header {
    text-align: center;
    padding: 22px 16px 18px;
    border-bottom: 1px solid #ececec;
}

.page-webinar .webinar-header h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1.8;
}

.page-webinar .webinar-page {
    width: 100%;
}

.page-webinar .webinar-container {
    max-width: 980px;
    margin: 28px auto 48px;
    padding: 0 16px;
    text-align: center;
}

.page-webinar .video-box {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    border: 1px solid #111;
    background: #000;
}

.page-webinar .delayed-action-wrapper {
    display: none;
    margin-top: 28px;
}

.btn-webinar-cta {
    display: inline-block;
    padding: 12px 28px;
    color: #ffffff;
    background: #22c55e;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-webinar-cta:hover,
.btn-webinar-cta:focus {
    background: #16a34a;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-webinar-archive {
    display: block;
    width: fit-content;
    margin: 14px auto 0;
    padding: 8px 16px;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 999px;
}

.btn-webinar-archive:hover,
.btn-webinar-archive:focus {
    color: #4b5563;
    background: #f3f4f6;
    border-color: #9ca3af;
}

@media (max-width: 600px) {
    .page-webinar .webinar-header h1 { font-size: 1rem; }
    .page-webinar .webinar-container { margin-top: 18px; }
    .btn-webinar-cta { font-size: 0.95rem; padding: 10px 22px; }
    .btn-webinar-archive { font-size: 0.75rem; padding: 5px 12px; }
}

/* =========================================
   7. LIVE WORKSHOP PAGE ELEMENTS (Page 4)
   ========================================= */

/* Override body properties specifically for this page */
body.page-live {
    background: radial-gradient(circle at 20% 50%, #292a35 0%, #151821 50%, #0d1017 100%);
    background-color: #0d1017;
    color: #ffffff;
    display: block; 
    padding: 0; /* Reset padding to allow full-width top bar and footer */
}

/* Orange Play Button Override for Plyr */
.page-live {
    --plyr-color-main: #f05a28; 
}

/* Top Bar */
.live-top-bar {
    background-color: #1a1c23;
    color: #a0a5b0;
    text-align: center;
    padding: 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid #2a2d35;
    width: 100%;
}

/* Container limits width and centers content */
.live-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 180px); /* Pushes footer down */
}

/* Typography */
.live-title {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #ffffff;
}

.live-title .underline-text {
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 2px;
}

.live-subtitle {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffeb3b; /* Distinct Yellow */
    margin-bottom: 30px;
}

/* Video Box shadow exactly like the image */
.live-video-box {
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    border: 5px solid #2a2a2a;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
    margin-bottom: 40px;
}

/* Red CTA Button */
.page-live .delayed-action-wrapper {
    display: none; 
}

.btn-live-red {
    background-color: #c62828;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 18px 40px;
    border-radius: 4px; /* Slightly square edges based on image */
    display: inline-block;
    transition: background-color 0.2s;
    width: 100%; /* Spans full width of container */
    max-width: 700px;
}

.btn-live-red:hover {
    background-color: #b71c1c;
    color: #ffffff;
}

/* Footer strictly matching the image */
.live-footer {
    background-color: #000000;
    color: #555555;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.85rem;
    line-height: 2;
    border-top: 1px solid #111;
}

.live-footer p {
    margin: 0;
}

.footer-links a {
    color: #a0a5b0;
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 0 4px;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Blur Backdrop */
.custom-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.custom-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    background: #1a1c23; /* Matches live.html top bar */
    border: 1px solid #2a2d35;
    border-radius: 12px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    color: #ffffff;
}
.custom-modal.show {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}

/* Modal Header */
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #2a2d35;
    background: #151821;
    border-radius: 12px 12px 0 0;
}
.custom-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}
.custom-modal-close {
    background: none;
    border: none;
    color: #a0a5b0;
    cursor: pointer;
    padding: 5px;
    display: flex;
    transition: color 0.2s, transform 0.2s;
}
.custom-modal-close:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Modal Content Formatting */
.custom-modal-body {
    padding: 25px;
    overflow-y: auto;
    line-height: 1.9;
    font-size: 0.95rem;
    color: #b0bec5;
    text-align: right;
}
.custom-modal-body h4 {
    color: #ffffff;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.15rem;
    font-weight: bold;
}
.custom-modal-body h4:first-child {
    margin-top: 0;
}
.custom-modal-body p {
    margin-bottom: 15px;
}
.custom-modal-body ul {
    margin-bottom: 20px;
    padding-right: 25px;
}
.custom-modal-body li {
    margin-bottom: 8px;
    position: relative;
}
.custom-modal-body a {
    color: #ef4444;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .live-title { font-size: 1.5rem; }
    .live-subtitle { font-size: 1.3rem; }
    .btn-live-red { font-size: 1.2rem; padding: 15px 20px; }
}

/* =========================================
   8. PISHBINI PAGE (MOBILE AUDIO PLAYER)
   ========================================= */
.page-pishbini-dark {
    background-color: #233a52; /* Match dollar.html background */
}

.page-pishbini-dark .mobile-app-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: #233a52;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.svg-icon {
    width: 20px;
    height: 20px;
}
.text-danger { color: #ff6b6b; }

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #004b6b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}
.app-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
}
.highlight-blink {
    color: #ffc107;
    animation: blink 1.5s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

.btn-icon-text {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    color: #ffffff;
}

/* Hero */
.app-hero-card {
    background: #1b2f44; /* Dark elevated card */
    margin: 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.hero-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-content {
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #b5c7d8; /* Muted light blue */
}
.instructor-signature {
    margin-top: 15px;
    font-weight: bold;
    color: #ffffff;
}

/* Sessions List */
.sessions-container {
    padding: 0 20px 40px;
}
.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #9cb3c9;
    margin-bottom: 15px;
}
.session-item {
    background: #1b2f44;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s;
}
.session-item:active {
    transform: scale(0.98);
}
.session-number {
    width: 45px;
    height: 45px;
    background: #004b6b;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 15px;
}
.session-info {
    flex: 1;
}
.session-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
}
.session-info span {
    font-size: 0.8rem;
    color: #9cb3c9;
}
.arrow-left-svg {
    width: 24px;
    height: 24px;
    color: #5c7894;
}

/* Player Sheet (The Overlay) */
.player-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 95vh;
    max-width: 500px;
    margin: 0 auto;
    background: #162638; /* Deep dark blue for the sheet */
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.player-sheet.show {
    transform: translateY(0);
}

/* Sheet Layout */
.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #004b6b;
    border-radius: 30px 30px 0 0;
}
.btn-icon {
    background: none;
    border: none;
    color: #ffffff;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
}
.sheet-title {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

/* Now Playing */
.now-playing-section {
    padding: 20px 15px 0;
    text-align: center;
}
.cover-art {
    width: 100%;
    height: 180px;
    margin: 0 auto 15px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: #0d1a26;
}
.cover-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.track-details h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.track-details .btn-red {
    display: none;
    padding: 8px 25px;
    font-size: 1rem;
    margin: 0;
    width: auto;
    min-width: 200px;
}

/* Controls */
.player-controls-wrap {
    padding: 10px 30px;
}
.scrubber-wrap {
    height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    direction: rtl;
}
.scrubber-bg,
.scrubber-fill {
    height: 6px;
    border-radius: 3px;
    position: absolute;
    right: 0;
    left: auto !important;
    pointer-events: none;
}
.scrubber-bg {
    width: 100%;
    background: #0d1a26; /* Dark track background */
}
.scrubber-fill {
    background: #cc0000; /* Red fill to match dollar.html buttons */
    width: 0%;
    transition: width 0.1s linear;
}
.time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9cb3c9;
    margin-top: -5px;
    direction: rtl;
}
.playback-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    margin-top: 15px;
}
.btn-ctrl {
    background: none;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    cursor: pointer;
}
.btn-ctrl:disabled {
    color: #3b536b;
}
.btn-play-master {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #cc0000; /* Match red button */
    color: #fff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.3);
    cursor: pointer;
}
.btn-play-master svg {
    width: 30px;
    height: 30px;
}

/* Playlist Area inside Overlay */
.playlist-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    border-top: 1px solid #233a52;
    margin-top: 10px;
}
.list-track {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #233a52;
    cursor: pointer;
}
.list-track.active {
    background: #1b2f44;
    border-radius: 12px;
}
.list-status {
    width: 30px;
    text-align: center;
    margin-left: 15px;
}
.t-num {
    color: #5c7894;
    font-weight: bold;
    font-size: 0.9rem;
}
.svg-wave {
    width: 18px;
    height: 18px;
    color: #cc0000;
}
.list-info {
    flex: 1;
}
.list-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 3px;
}
.list-meta {
    font-size: 0.8rem;
    color: #9cb3c9;
}

/* =========================================
   9. MINI PLAYER (BACKGROUND PLAYBACK)
   ========================================= */
.has-mini-player .mobile-app-wrapper {
    padding-bottom: 80px; 
}

.mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1b2f44; /* Dark mini player */
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 9998; 
    display: flex;
    flex-direction: column;
    transform: translateY(120%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    padding-bottom: env(safe-area-inset-bottom); 
}

.mini-player.show {
    transform: translateY(0);
}

.mini-progress-bg {
    width: 100%;
    height: 3px;
    background: #0d1a26;
    position: relative;
}

.mini-progress-fill {
    height: 100%;
    background: #cc0000; /* Red progress */
    position: absolute;
    right: 0; 
    width: 0%;
    transition: width 0.1s linear;
}

.mini-player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    height: 65px;
}

.mini-track-info {
    flex: 1;
    overflow: hidden;
    padding-left: 15px;
}

.mini-track-info h4 {
    margin: 0 0 3px 0;
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-track-info span {
    font-size: 0.8rem;
    color: #9cb3c9;
}

.btn-mini-play {
    background: #004b6b; /* Dark Teal button */
    border: none;
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.btn-mini-play svg {
    width: 22px;
    height: 22px;
}

/* =========================================
   15. AUDIO PLAYBACK SPEED CONTROLS
   ========================================= */
.btn-speed, .btn-speed-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff; /* Yellow Accent */
    border-radius: 6px;
    width: 44px;
    height: 26px;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.btn-speed:hover, .btn-speed-mini:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Subtle adjustment for the mini player to blend with its dark teal gradient */
.btn-speed-mini {
    background: rgba(0, 75, 107, 0.4); 
    border-color: rgba(255, 255, 255, 0.08);
}

/* =========================================
   11. CLOSED PAGE ELEMENTS
   ========================================= */
body.page-closed {
    background-color: #233a52; /* Matches your dark theme */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.closed-container {
    max-width: 700px;
    width: 100%;
}

.closed-card {
    background: rgba(13, 26, 38, 0.6); /* Deep dark glassmorphism */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 50px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
}

/* =========================================
   12. CSS HANGING SIGN (Replaces Image)
   ========================================= */
.css-hanging-sign {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    /* Subtle physics-based swinging animation */
    animation: swingSign 4s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite alternate;
}

@keyframes swingSign {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(2deg); }
}

/* The top pin attached to the "wall" */
.wall-pin {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #94a3b8;
    border-radius: 50%;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
    z-index: 3;
}

/* String wrapper */
.sign-strings {
    width: 200px;
    height: 60px;
    position: relative;
    z-index: 1;
}

/* Individual strings */
.string-line {
    position: absolute;
    top: 5px;
    width: 2px;
    height: 116px;
    background: #94a3b8;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.string-left {
    left: 50%;
    transform-origin: top left;
    transform: rotate(59deg); /* Exact angle to hit the left nail */
}

.string-right {
    right: 50%;
    transform-origin: top right;
    transform: rotate(-59deg); /* Exact angle to hit the right nail */
}

/* The Red Sign Board */
.sign-board {
    width: 100%;
    max-width: 280px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border: 4px solid #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
    margin-top: -15px; /* Overlaps strings exactly at the nail coordinates */
}

/* Nails connecting strings to the board */
.nail {
    width: 10px;
    height: 10px;
    background: #cbd5e1;
    border-radius: 50%;
    position: absolute;
    top: 12px;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.6), 0 1px 2px rgba(255,255,255,0.4);
}

.nail-left { left: 35px; }
.nail-right { right: 35px; }

/* Sign Typography */
.sign-board h2 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: #ffffff;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.sign-board h3 {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 5px 0;
    color: #ffffff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.closed-title {
    color: #ffc107; /* Standardized yellow accent */
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.5;
}

.closed-subtitle {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 35px;
    line-height: 1.6;
}

.book-banner-link {
    display: block;
    margin-top: 20px;
}

.book-banner {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.book-banner-link:hover .book-banner {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.page-closed .support-footer {
    color: #9cb3c9;
    font-size: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.page-closed .support-footer a {
    color: #ffc107; 
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.page-closed .support-footer a:hover {
    color: #ffffff;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .closed-card { padding: 35px 20px; }
    .closed-title { font-size: 1.5rem; }
    .closed-subtitle { font-size: 1.1rem; }
    .closed-icon { max-width: 180px; }
}

/* =========================================
   13. GREEN DOWNLOAD BUTTON (Replaces Image)
   ========================================= */
.btn-green-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, #8cc53f, #5b9b18);
    border: 1px solid #7cb52a;
    border-radius: 12px;
    padding: 12px 20px;
    text-decoration: none;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 30px auto 0;
    max-width: 380px;
    width: 100%;
}

.btn-green-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.btn-green-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    padding-left: 15px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 900;
}

.btn-green-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.12); /* Dark overlay to match image circle */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-shrink: 0;
}

/* =========================================
   14. BOOK PAGE ELEMENTS (Dark Theme)
   ========================================= */
body.page-book {
    background-color: #233a52; /* Deep Navy */
    display: block; /* Overrides global flex centering */
    padding: 0;
}

.book-page-bg {
    position: relative;
}

.book-page-bg .book-fixed-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    background-image: url(../img/book-bg.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-color: #000;
    background-attachment: fixed;
    z-index: 0;
}

.book-page-bg .book-fixed-bg:after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 1;
}

.book-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 100px; /* Extra bottom padding for floating WA button */
}

.book-top-banner img {
    width: 100%;
    height: auto;
}

.book-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* --- SIDEBAR WIDGET --- */
.book-sidebar {
    width: 35%;
    position: sticky;
    top: 30px;
}

.book-widget {
    background: #1b2f44; /* Dark card */
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.widget-header-text {
    background: #122235;
    padding: 20px;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.8;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.text-yellow { color: #ffc107 !important; }
.text-red { color: #ff6b6b !important; }

/* Steps */
.step-indicator {
    display: flex;
    background: #162638;
}

.step {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px;
    opacity: 0.5;
    transition: opacity 0.3s;
    border-bottom: 3px solid transparent;
}

.step.active {
    opacity: 1;
    background: #1b2f44;
    border-bottom-color: #ffc107; /* Yellow active indicator */
}

.step-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffc107;
    margin-left: 10px;
}

.step-text {
    display: flex;
    flex-direction: column;
}

.step-text strong {
    color: #ffffff;
    font-size: 0.9rem;
}

.step-text span {
    color: #ffc107;
    font-size: 0.75rem;
}

/* Form Body */
.widget-body {
    padding: 25px;
}

/* Pure CSS Floating Labels */
.custom-input-group {
    position: relative;
    margin-bottom: 20px;
}

.custom-input {
    width: 100%;
    background: #0d1a26;
    border: 1px solid #2a4365;
    border-radius: 8px;
    padding: 16px 15px 10px;
    font-size: 1rem;
    color: #ffffff;
    font-family: inherit;
    transition: border-color 0.2s;
}

.custom-input:focus {
    border-color: #ffc107;
    outline: none;
}

.custom-label {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #9cb3c9;
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.2s ease all;
}

/* Float label up when focused or has text (via placeholder hack) */
.custom-input:focus ~ .custom-label,
.custom-input:not(:placeholder-shown) ~ .custom-label {
    top: 8px;
    font-size: 0.75rem;
    color: #ffc107;
}

.btn-book-submit {
    width: 100%;
    background: #ffc107; /* Yellow Button */
    color: #122235;
    border: none;
    border-radius: 50px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-book-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.3);
}

.btn-book-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Green Download Button */
.btn-book-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #10b981;
    color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s;
}
.btn-book-download:hover { transform: translateY(-2px); color: #fff; }

/* --- MAIN CONTENT --- */
.book-main-content {
    width: 65%;
}

.book-details-card {
    background: #1b2f44;
    border-radius: 16px;
    padding: 30px;
    color: #b5c7d8;
    line-height: 1.9;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.book-slide-banner {
    margin-bottom: 25px;
}
.book-slide-banner img {
    width: 100%;
    border-radius: 12px;
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

.book-meta-grid {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #122235;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
}

.book-meta-text {
    flex: 1;
}
.book-meta-text p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #ffffff;
}
.book-meta-text strong {
    color: #9cb3c9;
}

.book-meta-image img {
    max-width: 150px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.book-list {
    padding-right: 20px;
    margin-bottom: 20px;
}
.book-list li {
    margin-bottom: 10px;
    color: #ffffff;
}

/* FAQs */
.faq-section {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
}
.faq-item {
    background: #122235;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
}
.faq-item strong {
    display: block;
    color: #ffc107;
    margin-bottom: 8px;
}
.faq-item p { margin: 0; }

/* --- TELEGRAM FLOATING BUTTON --- */
.telegram-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #0088cc; /* Telegram Official Blue */
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 10px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.4);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    direction: ltr; /* Keeps icon on left */
}

.telegram-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.5);
    color: #ffffff;
}

.tg-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
}

.tg-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    direction: rtl;
}

.tg-text strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.tg-text span {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Visibility Utilities */
.d-desktop-only { display: block; }
.d-mobile-only { display: none; }

/* Responsive Mobile Layout */
@media (max-width: 992px) {
    .book-grid { flex-direction: column; }
    .book-sidebar, .book-main-content { width: 100%; position: static; }
    .d-desktop-only { display: none; }
    .d-mobile-only { display: block; }
    .book-meta-grid { flex-direction: column-reverse; text-align: center; }
}

/* =========================================
   15. BOOK PAGE TYPOGRAPHY & LAYOUT UPGRADES
   ========================================= */

/* Hero Title */
.book-title-main {
    font-size: 1.5rem;
    color: #ffc107;
    line-height: 1.7;
    font-weight: 900;
    margin-bottom: 25px;
    border-bottom: 2px dashed rgba(255,255,255,0.08);
    padding-bottom: 20px;
}

/* Styled Intro Box */
.book-intro-box {
    background: linear-gradient(90deg, rgba(0, 136, 204, 0.1) 0%, transparent 100%);
    border-right: 4px solid #0088cc; /* Right border for RTL layout */
    padding: 20px 25px;
    border-radius: 8px 0 0 8px;
    margin-bottom: 40px;
}

.book-intro-box p {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Section Headers */
.book-section-header {
    font-size: 1.35rem;
    color: #ffffff;
    font-weight: 900;
    margin: 40px 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- LEARNING GRID CARDS --- */
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 45px;
}

.learning-card {
    background: #122235;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 25px 20px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.learning-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(255, 193, 7, 0.3); /* Subtle yellow glow on hover */
}

.learning-title {
    font-size: 1.05rem;
    color: #ffc107;
    margin-bottom: 15px;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
    line-height: 1.5;
}

/* Clean Inner Lists (inside cards) */
.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    margin-bottom: 12px;
    color: #b5c7d8;
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
}

/* --- STYLED STANDALONE LISTS --- */
.styled-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.styled-feature-list li {
    background: #122235;
    margin-bottom: 12px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.7;
    border: 1px solid rgba(255,255,255,0.02);
    transition: background 0.2s;
}

.styled-feature-list li:hover {
    background: #162638;
}

/* Apply CSS Grid to standard lists on desktop for better space usage */
@media (min-width: 768px) {
    .styled-feature-list.grid-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .styled-feature-list.grid-list li {
        margin-bottom: 0;
    }
}

/* Custom Divider */
.book-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 50px 0;
}

/* --- VERTICAL VIDEOS GRID --- */
.vertical-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns on desktop */
    gap: 25px;
    margin-bottom: 20px;
}

.book-vertical-video {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    /* Adding a subtle border makes it pop against the dark card */
    border: 1px solid rgba(255, 255, 255, 0.05); 
}

/* Ensure the video poster fills the vertical space correctly */
.book-vertical-video video {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .vertical-video-grid {
        grid-template-columns: 1fr; /* Stacks into 1 column on mobile */
        gap: 20px;
    }
}