/* ============================================
   e-PATA - Mobile-First Vedic Astrology Platform
   Optimized for Smartphones & Touch Devices
   ============================================ */

/* CSS Variables */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-sidebar: #1a1a2e;
    
    --text: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --text-light: #dfe6e9;
    
    --border: #e1e8ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-xl: 0 8px 32px rgba(0,0,0,0.15);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --bottom-nav-height: 64px;
    --header-height: 56px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Theme */
.dark-theme {
    --bg: #0a0a0f;
    --bg-card: #1a1a24;
    --bg-elevated: #252530;
    --text: #f1f1f1;
    --text-secondary: #a0a0a0;
    --text-muted: #6c6c6c;
    --border: #2d2d3a;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', 'Noto Sans Kannada', 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

/* ============================================
   PULL TO REFRESH
   ============================================ */
.pull-to-refresh {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
    font-size: 13px;
    color: var(--text-secondary);
}

.pull-to-refresh.visible {
    transform: translateY(0);
}

.pull-spinner {
    animation: spin 1s linear infinite;
}

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

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.menu-btn, .search-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
}

.menu-btn:active, .search-toggle:active {
    background: var(--bg);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 12px 16px;
    transform: translateY(-100%);
    transition: transform var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.search-bar-container.active {
    transform: translateY(0);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border-radius: var(--radius-xl);
    padding: 10px 16px;
}

.search-bar i {
    color: var(--text-muted);
    font-size: 16px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    outline: none;
}

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

.search-clear {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--text-muted);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity var(--transition);
}

.search-clear.visible {
    opacity: 1;
}

.search-filters {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.search-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.filter-chip:active {
    transform: scale(0.95);
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-light);
    overflow-y: auto;
    z-index: 1001;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 12px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.nav-section {
    padding: 16px 0;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 20px;
    margin-bottom: 8px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.nav-item:hover, .nav-item.active {
    background: rgba(108, 92, 231, 0.2);
    border-left-color: var(--primary);
}

.nav-item i {
    width: 22px;
    font-size: 16px;
    color: var(--text-muted);
}

.nav-item.active i {
    color: var(--primary);
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

.badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.home-link, .theme-toggle-desktop {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    border: none;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background var(--transition);
}

.home-link:hover, .theme-toggle-desktop:hover {
    background: var(--primary);
}

/* ============================================
   MOBILE DRAWER
   ============================================ */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-sidebar) 0%, #16213e 100%);
    color: #fff;
}

.drawer-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.drawer-info {
    flex: 1;
}

.drawer-info h3 {
    font-size: 18px;
    font-weight: 700;
}

.drawer-info p {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.drawer-section {
    margin-bottom: 16px;
}

.drawer-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 20px;
    margin-bottom: 8px;
}

.drawer-menu {
    list-style: none;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background var(--transition);
}

.drawer-item:active {
    background: var(--bg);
}

.drawer-item.active {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.drawer-item i {
    width: 22px;
    font-size: 18px;
    color: var(--text-secondary);
}

.drawer-item.active i {
    color: var(--primary);
}

.drawer-item span {
    font-size: 15px;
    font-weight: 500;
}

.drawer-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.drawer-link, .drawer-theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    margin-bottom: 8px;
}

.drawer-link i, .drawer-theme-toggle i {
    color: var(--primary);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
}

.desktop-header {
    display: none;
}

/* ============================================
   WELCOME BANNER
   ============================================ */
.welcome-banner {
    background: linear-gradient(135deg, #607d8b 0%, #455a64 100%);
    margin: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-content p {
    font-size: 13px;
    opacity: 0.9;
}

.welcome-stats {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 16px;
    gap: 8px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex: 1;
    max-width: 80px;
}

.quick-action-btn:active {
    transform: scale(0.95);
}

.quick-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
}

.quick-action-btn span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: var(--primary);
}

.see-all-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.see-all-btn i {
    font-size: 11px;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: #fff;
    font-size: 16px;
}

.stat-icon.purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon.blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-icon.green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.stat-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.stat-info p {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   CONTINUE CARD
   ============================================ */
.continue-card {
    margin: 0 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.continue-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg);
}

.continue-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.continue-play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
    border: none;
}

.continue-info {
    padding: 16px;
}

.continue-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.continue-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.continue-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.continue-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}

.continue-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.continue-progress span {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   HORIZONTAL SCROLL
   ============================================ */
.playlist-scroll, .lesson-scroll {
    display: flex;
    gap: 12px;
    padding: 4px 16px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.playlist-scroll::-webkit-scrollbar,
.lesson-scroll::-webkit-scrollbar {
    display: none;
}

/* Playlist Cards */
.playlist-card {
    flex: 0 0 160px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform var(--transition);
}

.playlist-card:active {
    transform: scale(0.97);
}

.playlist-header {
    padding: 16px;
    color: #fff;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.playlist-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.playlist-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.playlist-body {
    padding: 12px;
}

.playlist-count {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.playlist-progress {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
    margin-top: 4px;
}

/* Lesson Cards (Horizontal) */
.lesson-card-small {
    flex: 0 0 200px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    scroll-snap-align: start;
    cursor: pointer;
}

.lesson-card-small:active {
    transform: scale(0.97);
}

.lesson-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg);
}

.lesson-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.lesson-card-small:active .lesson-thumb-overlay {
    opacity: 1;
}

.play-btn-small {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
}

.lesson-info-small {
    padding: 12px;
}

.lesson-title-small {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.lesson-meta-small {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    flex: 1;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.results-count {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   LESSONS GRID
   ============================================ */
.lessons-container {
    display: grid;
    gap: 12px;
    padding: 0 16px 24px;
}

.lessons-container.grid-view {
    grid-template-columns: repeat(2, 1fr);
}

.lessons-container.list-view {
    grid-template-columns: 1fr;
}

.lesson-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
}

.lesson-card.completed::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 2;
}

.lesson-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg);
    overflow: hidden;
}

.lesson-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.lesson-card:active .lesson-thumbnail img {
    transform: scale(1.05);
}

.lesson-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.lesson-card:active .lesson-overlay {
    opacity: 1;
}

.play-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}

.lesson-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.lesson-content {
    padding: 12px;
}

.lesson-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.lesson-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.lesson-playlist-name {
    color: var(--primary);
    font-weight: 500;
}

.lesson-has-notes {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
}

.lesson-actions-row {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid var(--border);
}

.lesson-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.lesson-action-btn:active {
    transform: scale(0.95);
}

.lesson-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.lesson-action-btn.favorite.active {
    background: rgba(253, 121, 168, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Load More */
.load-more-container {
    padding: 16px;
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.load-more-btn:active {
    background: var(--bg);
    transform: scale(0.98);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-icon i {
    font-size: 36px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-action-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.empty-action-btn:active {
    transform: scale(0.97);
    background: var(--primary-dark);
}

/* ============================================
   PROGRESS VIEW
   ============================================ */
.progress-header {
    background: var(--bg-card);
    padding: 24px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.progress-circle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.progress-circle {
    position: relative;
    width: 160px;
    height: 160px;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--bg);
    stroke-width: 8;
}

.progress-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    transition: stroke-dashoffset 1s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text span {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.progress-summary {
    text-align: center;
}

.progress-summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.progress-summary p {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-courses {
    padding: 0 16px;
}

.progress-course-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.progress-course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-course-name {
    font-size: 14px;
    font-weight: 500;
}

.progress-course-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.progress-course-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-course-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-course-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    padding-bottom: var(--safe-area-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.bottom-nav-item i {
    font-size: 20px;
    transition: transform var(--transition-bounce);
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

.bottom-nav-item.active::before {
    opacity: 1;
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px + var(--safe-area-bottom));
    right: 16px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all var(--transition);
}

.fab:active {
    transform: scale(0.92);
}

.fab.hidden {
    transform: scale(0) rotate(180deg);
    opacity: 0;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    flex-direction: column;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-back, .modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-back:active, .modal-close:active {
    background: var(--bg);
}

.modal-header h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

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

.video-info {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.video-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.video-actions::-webkit-scrollbar {
    display: none;
}

.video-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.video-action-btn:active {
    transform: scale(0.95);
}

.video-action-btn i {
    font-size: 20px;
}

.video-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.video-action-btn.active {
    background: rgba(253, 121, 168, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Share Modal */
.share-modal .modal-content {
    height: auto;
    max-height: 80vh;
    margin-top: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.share-options {
    display: flex;
    justify-content: space-around;
    padding: 24px;
    gap: 16px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.share-option:active {
    transform: scale(0.95);
}

.share-option i {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.share-option[data-share="whatsapp"] i { background: #25d366; }
.share-option[data-share="telegram"] i { background: #0088cc; }
.share-option[data-share="copy"] i { background: var(--primary); }

.share-option span {
    font-size: 12px;
    font-weight: 500;
}

/* Privacy Policy Modal */
.privacy-modal .modal-content {
    height: auto;
    max-height: 85vh;
    margin-top: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.privacy-body {
    padding: 16px;
    overflow-y: auto;
}

.privacy-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--primary);
}

.privacy-body p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 10px;
}

.privacy-updated {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px + var(--safe-area-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-sidebar);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    opacity: 0;
    transition: all var(--transition);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 18px;
}

/* ============================================
   OFFLINE INDICATOR
   ============================================ */
.offline-indicator {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--danger);
    color: #fff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    z-index: 998;
    transform: translateY(-100%);
    transition: transform var(--transition);
}

.offline-indicator.active {
    transform: translateY(0);
}

/* Footer */
.app-footer {
    padding: 16px 16px 24px;
    text-align: center;
}

.footer-link {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.footer-link-external {
    margin-left: 12px;
}

/* ============================================
   VIEW SWITCHING
   ============================================ */
.view {
    animation: fadeIn 0.3s ease;
}

.view.hidden {
    display: none;
}

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

/* ============================================
   DESKTOP STYLES
   ============================================ */
@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }
    
    .mobile-header,
    .bottom-nav,
    .fab,
    .mobile-drawer,
    .drawer-overlay {
        display: none;
    }
    
    .sidebar {
        display: flex;
    }
    
    .main-content {
        margin-left: 260px;
        padding-top: 0;
    }
    
    .desktop-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .page-title {
        font-size: 24px;
        font-weight: 700;
    }
    
    .page-subtitle {
        font-size: 13px;
        color: var(--text-secondary);
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    
    .desktop-search {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--bg);
        padding: 10px 16px;
        border-radius: var(--radius-xl);
        min-width: 280px;
    }
    
    .desktop-search i {
        color: var(--text-muted);
    }
    
    .desktop-search input {
        border: none;
        background: transparent;
        font-size: 14px;
        outline: none;
        width: 100%;
    }
    
    .theme-btn {
        width: 42px;
        height: 42px;
        border: 1px solid var(--border);
        border-radius: 50%;
        background: var(--bg-card);
        color: var(--text);
        font-size: 18px;
        cursor: pointer;
        transition: all var(--transition);
    }
    
    .theme-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
    }
    
    .welcome-banner {
        margin: 24px;
        padding: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding: 0 24px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .stat-info p {
        font-size: 11px;
    }
    
    .section-header {
        padding: 0 24px;
    }
    
    .playlist-scroll,
    .lesson-scroll {
        padding: 4px 24px 16px;
    }
    
    .playlist-card {
        flex: 0 0 200px;
    }
    
    .lessons-container.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        padding: 0 24px 24px;
        gap: 20px;
    }
    
    .filter-bar {
        padding: 16px 24px;
        position: static;
    }
    
    .progress-header {
        display: flex;
        align-items: center;
        gap: 40px;
        padding: 32px;
    }
    
    .progress-circle {
        width: 180px;
        height: 180px;
    }
    
    .progress-courses {
        padding: 0 24px;
    }
    
    .modal {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 900px;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }
    
    .share-modal .modal-content {
        max-width: 400px;
        margin: 0;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .lessons-container.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Phone */
@media (min-width: 400px) and (max-width: 768px) {
    .lessons-container.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Phone */
@media (max-width: 399px) {
    .quick-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .quick-action-btn span {
        font-size: 10px;
    }
    
    .stat-info h3 {
        font-size: 16px;
    }
}

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

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--primary);
    color: #fff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   DONATE PAGE STYLES
   ============================================ */
.nav-item-donate,
.drawer-item-donate {
    color: var(--accent) !important;
}

.nav-item-donate i,
.drawer-item-donate i {
    color: var(--accent) !important;
}

.donate-header {
    background: linear-gradient(135deg, var(--accent) 0%, #e84393 100%);
    padding: 32px 24px;
    text-align: center;
    color: #fff;
}

.donate-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}

.donate-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.donate-header p {
    font-size: 14px;
    opacity: 0.9;
    max-width: 300px;
    margin: 0 auto;
}

.donate-content {
    padding: 24px 16px;
    max-width: 800px;
    margin: 0 auto;
}

.donate-message {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.donate-message p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.donate-message p:last-child {
    margin-bottom: 0;
}

.donate-benefits {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.donate-benefits h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.donate-benefits ul {
    list-style: none;
}

.donate-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.donate-benefits li:last-child {
    border-bottom: none;
}

.donate-benefits li i {
    color: var(--success);
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.donate-note {
    background: linear-gradient(135deg, rgba(0, 206, 201, 0.1) 0%, rgba(0, 206, 201, 0.05) 100%);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 206, 201, 0.3);
    display: flex;
    gap: 12px;
}

.donate-note i {
    color: var(--secondary);
    font-size: 20px;
    flex-shrink: 0;
}

.donate-note p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.donate-thanks {
    text-align: center;
    padding: 24px 0;
}

.donate-thanks p {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 16px;
}

.thank-you-text {
    font-size: 24px !important;
    font-weight: 700;
    color: var(--primary) !important;
}

.donate-author {
    text-align: right;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    margin-bottom: 24px;
}

.donate-author p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.donate-author h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.donate-author span {
    font-size: 12px;
    color: var(--text-muted);
}

.donate-image-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.donate-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.donate-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.donate-upi-btn,
.donate-website-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.donate-upi-btn {
    background: linear-gradient(135deg, var(--success) 0%, #00a884 100%);
    color: #fff;
    border: none;
}

.donate-upi-btn:active {
    transform: scale(0.97);
}

.donate-website-btn {
    background: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.donate-website-btn:active {
    background: var(--primary);
    color: #fff;
}

/* Desktop Donate */
@media (min-width: 769px) {
    .donate-header {
        padding: 48px;
        border-radius: var(--radius-lg);
        margin: 24px;
    }
    
    .donate-content {
        padding: 32px 24px;
    }
    
    .donate-message,
    .donate-benefits,
    .donate-image-container {
        padding: 28px;
    }
}

/* ============================================
   RESOURCES / APPS VIEW STYLES
   ============================================ */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px;
    padding-bottom: 100px;
}

.app-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.app-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.app-icon-wrapper.sheet { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.app-icon-wrapper.app { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.app-icon-wrapper.pdf { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.app-icon-wrapper.tool { background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%); }

.app-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px; /* Fixed height for alignment */
}

.app-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.app-btn {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.app-btn.open {
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--border);
}

.app-btn.open:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.app-btn.tutorial {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.app-btn.tutorial:hover {
    background: #ff6b6b;
    color: #fff;
}

/* ============================================
   DETAILED RESOURCES GRID (From app.html content)
   ============================================ */
.resources-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px;
    padding-bottom: 100px;
}

@media (max-width: 600px) {
    .resources-grid-detailed {
        grid-template-columns: 1fr;
    }
}

.app-card.detailed {
    align-items: flex-start;
    text-align: left;
    padding: 0;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    width: 100%;
    background: rgba(0,0,0,0.02);
}

.app-card.detailed .app-icon-wrapper {
    margin-bottom: 0;
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 12px;
    flex-shrink: 0;
}

.app-header-content {
    flex: 1;
    min-width: 0;
}

.app-card.detailed .app-title {
    margin-bottom: 4px;
    height: auto;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    -webkit-line-clamp: unset;
}

/* Resource Modal Styles */
.resource-container {
    flex: 1;
    width: 100%;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.resource-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.app-link-btn {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Reset button styles if app-link-btn is used on a button */
button.app-link-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

/* Resources Table Styles */
.resources-container {
    padding: 16px;
    padding-bottom: 100px;
}

.resources-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.resources-table th {
    background: var(--bg);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.resources-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.resources-table tr:last-child td {
    border-bottom: none;
}

.res-date {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.res-name {
    font-weight: 500;
    min-width: 150px;
}

.res-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

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

.res-btn.launch {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.res-btn.pdf {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.app-body {
    padding: 16px;
    width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
}

.app-body ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.app-body li {
    margin-bottom: 6px;
}

.pill {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.app-note {
    background: rgba(255, 203, 110, 0.1);
    border-left: 3px solid var(--warning);
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
    margin-top: 12px;
}

.app-note i {
    color: var(--warning);
    margin-right: 6px;
}

.sub-links {
    margin-top: 12px;
    background: var(--bg);
    padding: 10px;
    border-radius: 8px;
}

.sub-links p {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 12px;
}

.sub-links ul {
    margin-bottom: 0;
}

.sub-links a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
}

/* ============================================
   ABOUT VIEW STYLES
   ============================================ */
.about-hero {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--bg-sidebar) 0%, #16213e 100%);
    color: #fff;
    margin-bottom: 20px;
}

.about-profile-img {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 40px;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.about-hero h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.about-hero .subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.about-hero .role {
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.about-content {
    padding: 0 16px 100px;
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.about-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.about-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 10px;
}

.about-list {
    list-style: none;
    padding-left: 5px;
}

.about-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-list li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.offer-item {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.offer-item:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.offer-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.about-card.highlight {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-color: rgba(108, 92, 231, 0.2);
}

.about-footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.about-footer h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary);
}

.about-footer p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.signature {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.signature p {
    margin-bottom: 4px;
    font-style: italic;
}

.signature strong {
    color: var(--text);
    font-size: 16px;
}

/* ============================================
   DAILY MESSAGE
   ============================================ */
.daily-message-card {
    margin: 16px 16px 0;
    background: #fffde7;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid #fbc02d;
    border: 1px solid rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease;
}

.daily-message-icon {
    color: #f57f17;
    font-size: 20px;
    padding-top: 2px;
    flex-shrink: 0;
}

.daily-message-content {
    flex: 1;
}

.daily-message-content p {
    font-size: 14px;
    color: #37474f;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.5;
    font-style: italic;
}

.daily-message-date {
    font-size: 11px;
    color: #78909c;
    display: block;
    text-align: right;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: #2d3436;
}

.logo-pulse {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.loading-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.loading-text {
    font-size: 16px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform-origin: left;
    animation: progress 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes progress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ============================================
   SERVICE TRANSPARENCY VIEW
   ============================================ */
.support-view-wrapper {
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.support-header-minimal {
    text-align: center;
    margin-bottom: 20px;
}

.support-header-minimal h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.support-info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.support-section {
    margin-bottom: 20px;
}

.support-section:last-child {
    margin-bottom: 0;
}

.support-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    opacity: 0.9;
}

.support-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.9;
}

.support-section.assurance {
    background: rgba(108, 92, 231, 0.05);
    padding: 12px;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.support-section.personal-note {
    background: rgba(0, 0, 0, 0.02);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.support-section.personal-note p {
    margin-bottom: 12px;
}

.support-section.personal-note p:last-child {
    margin-bottom: 0;
}

.support-section.closing p {
    font-style: italic;
    color: var(--text-secondary);
}

.support-qr-container {
    margin-bottom: 16px;
    text-align: center;
}

.support-qr-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.optional-support-wrapper {
    margin-top: 24px;
    text-align: center;
}

.optional-support-details summary {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    list-style: none;
    text-decoration: underline;
    opacity: 0.8;
}

.optional-support-details summary::-webkit-details-marker {
    display: none;
}

.support-reveal-content {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.support-reveal-content p {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.support-links-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.text-link-action {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    font-family: inherit;
}

.separator {
    color: var(--text-muted);
}

/* ============================================
   INSTALL MODAL STYLES
   ============================================ */
.install-body {
    padding: 20px;
    text-align: center;
    overflow-y: auto;
}

.install-body p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.install-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.install-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition);
    color: #fff;
}

.install-action-btn:active {
    transform: scale(0.98);
}

.install-action-btn.android {
    background: #3ddc84; /* Android Green */
    color: #000;
}

.install-action-btn.ios {
    background: #007aff; /* iOS Blue */
    color: #fff;
}

.ios-instructions {
    background: rgba(0, 122, 255, 0.08);
    border-radius: var(--radius);
    padding: 16px;
    text-align: left;
    margin-top: 16px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    animation: fadeIn 0.3s ease;
}

.ios-instructions h4 {
    font-size: 15px;
    font-weight: 600;
    color: #007aff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ios-instructions ol {
    padding-left: 20px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

.ios-instructions li {
    margin-bottom: 8px;
}

.ios-instructions li i {
    color: var(--text-secondary);
    margin: 0 4px;
}

.install-benefits {
    margin-top: 20px;
    padding: 16px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius);
    text-align: left;
}

.install-benefits h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.benefits-list li {
    font-size: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefits-list li i {
    color: var(--primary);
    font-size: 12px;
    min-width: 16px;
    text-align: center;
}

.safety-info {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 184, 148, 0.08); /* Soft Green */
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: var(--radius);
    text-align: left;
}

.safety-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.safety-info p {
    font-size: 12px;
    color: var(--text);
    margin-bottom: 12px !important;
    line-height: 1.5;
}

.safety-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.safety-list li {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.safety-list li i {
    color: var(--success);
    font-size: 12px;
}

.safety-reassurance {
    font-weight: 600;
    color: var(--success) !important;
    margin-top: 12px !important;
    margin-bottom: 4px !important;
}

.safety-tech-note {
    font-size: 11px !important;
    color: var(--text-secondary) !important;
    margin-bottom: 0 !important;
}

@media (min-width: 769px) {
    .install-buttons {
        flex-direction: row;
    }
    
    .install-action-btn {
        flex: 1;
    }
    
    .install-content {
        max-width: 500px;
        height: auto;
        max-height: 80vh;
    }
}

/* ============================================
   QUIZ VIEW STYLES
   ============================================ */
.quiz-wrapper {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.quiz-date {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

.quiz-progress-text {
    font-size: 14px;
    font-weight: 700;
}

.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.question-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.6;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
}

.option-btn.correct {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    font-weight: 600;
}

.option-btn.wrong {
    border-color: var(--danger);
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.explanation-box {
    margin-top: 20px;
    padding: 16px;
    background: rgba(253, 203, 110, 0.1);
    border-left: 4px solid var(--warning);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    animation: slideUp 0.3s ease;
}

.quiz-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.quiz-next-btn, .quiz-restart-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-result-card {
    text-align: center;
    padding: 40px 20px;
}

/* ============================================
   SUPPORT TABS SYSTEM
   ============================================ */
.support-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 16px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--success);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--success);
    border-radius: 3px 3px 0 0;
}

.support-language {
    animation: fadeIn 0.4s ease;
}

/* ============================================
   UPDATES VIEW
   ============================================ */
.updates-container {
    padding: 16px;
}

.update-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.update-date {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.update-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.update-message {
    line-height: 1.5;
    margin-bottom: 10px;
    font-size: 14px;
}

.update-link {
    display: inline-block;
    padding: 6px 12px;
    background: #2e7d32;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.separator {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
    display: none; /* Hidden as cards have margins */
}

.course-card{
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.course-card h3{
    margin-bottom: 6px;
    font-size: 16px;
}

.course-card p{
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}

.enroll-btn{
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.enroll-btn:hover{
    opacity: 0.85;
}

#activeCourseStatus{
    display:inline-block;
    padding:4px 10px;
    border-radius:12px;
    font-size:12px;
    font-weight:600;
    background:#e8f0ff;
}

/* Mobile compact lesson button */
@media (max-width: 768px){

    .lesson-action-btn.primary {
        font-size: 0 !important;
        width: 36px;
        height: 36px;
        padding: 0 !important;
        border-radius: 50% !important;
        flex: 0 0 auto;
        gap: 0 !important;
    }

    .lesson-action-btn.primary i {
        margin: 0 !important;
        font-size: 14px !important;
    }
}

/* Courses Grid Layout */

.course-list{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px,1fr));
    gap:16px;
    padding:12px 16px 24px 16px;
}

.course-card{
    background:var(--bg-card);
    border-radius:14px;
    padding:18px 14px;
    cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease;
    box-shadow:0 4px 14px rgba(0,0,0,.08);
    border:1px solid rgba(0,0,0,.05);
    text-align:center;
}

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

.course-icon{
    font-size:34px;
    margin-bottom:8px;
}

.course-title{
    font-weight:600;
    font-size:16px;
    line-height:1.3;
}

.course-sub{
    margin-top:6px;
    font-size:12px;
    opacity:.65;
}

@media(max-width:600px){
    .course-list{
        grid-template-columns:repeat(2,1fr);
    }
}

/* Jyotisha Profile Cards */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.profile-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 8px;
}

.profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-btn.edit:hover { color: var(--primary); border-color: var(--primary); }
.profile-btn.delete:hover { color: var(--danger); border-color: var(--danger); }

/* South Indian Chart */
.south-indian-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
}

.chart-box {
    background: var(--bg-card);
    padding: 2px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.chart-center {
    grid-area: 2 / 2 / 4 / 4;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
}

.chart-info-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

.chart-info-dob {
    font-size: 11px;
    color: var(--text-secondary);
}

.rashi-label {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.7;
}

.planets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.planet-tag {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding: 1px 3px;
}

.planet-tag.lagna {
    color: var(--danger);
    font-weight: 800;
}

/* Jyotisha Layout */
.jyotisha-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 769px) {
    .jyotisha-layout {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }
    
    .chart-section {
        flex: 0 0 400px;
    }
    
    .details-section {
        flex: 0 0 300px;
    }
}

.details-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.detail-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.detail-row .good { color: var(--success); font-weight: 600; }
.detail-row .bad { color: var(--danger); font-weight: 600; }
