/* styles/custom.css */

/* Responsive scaling fixes for Chrome Android zoom issues */
html {
    font-size: 16px; /* Base font size */
    -webkit-text-size-adjust: 100%; /* Prevent iOS text size adjustment */
    -ms-text-size-adjust: 100%; /* Prevent Windows Phone text size adjustment */
    text-size-adjust: 100%; /* Standard property */
    overscroll-behavior-x: none; /* Prevents horizontal overscroll */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Responsive font scaling for different screen densities */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px; /* Smaller base font for small screens */
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    html {
        font-size: 15px; /* Medium base font for tablets */
    }
}

@media screen and (min-width: 769px) {
    html {
        font-size: 16px; /* Standard base font for desktop */
    }
}

/* High DPI display adjustments */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Synthesiser Page Styles */
.synthesiser-body {
    overflow: hidden;
    height: 100vh;
    background-color: var(--light);
}

.translations-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 230px;
    background: white;
    overflow: hidden;
    margin: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.translations-container .container {
    height: 100%;
    max-width: 1320px;
}

@media (max-width: 1399.98px) {
    .translations-container .container {
        max-width: 1140px;
    }
}

@media (max-width: 1199.98px) {
    .translations-container .container {
        max-width: 960px;
    }
}

@media (max-width: 991.98px) {
    .translations-container .container {
        max-width: 720px;
    }
}

@media (max-width: 767.98px) {
    .translations-container .container {
        max-width: 540px;
    }
}

@media (max-width: 575.98px) {
    .translations-container .container {
        max-width: none;
    }
}


.translations-header {
    background: var(--gray-50);
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.translations-scroll {
    height: calc(100%);
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.translations-scroll::-webkit-scrollbar {
    width: 6px;
}

.translations-scroll::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.translations-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.translation-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
    position: relative;
    overflow: hidden;
}

.translation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

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

.translation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.english-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.urdu-text {
    font-size: 1rem;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 12px;
    direction: rtl;
    text-align: right;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.timestamp {
    font-size: 0.75rem;
    color: var(--gray-500);
}

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

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.speak-btn {
    background: var(--primary);
    color: white;
}

.speak-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.delete-btn {
    background: var(--danger);
    color: white;
}

.delete-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.empty-subtitle {
    font-size: 1rem;
    opacity: 0.7;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.header-subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

.clear-all-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

.synthesiser-main {
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.recorder-container {
    position: fixed;
    bottom: 90px;
    left: 0;
    right: 0;
    height: 140px;
    background: white;
    border-top: 1px solid var(--gray-200);
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    animation: float-particle 6s ease-in-out infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: 4s; }

@keyframes float-particle {
    0%, 100% { transform: translateY(100px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.record-button-container {
    position: relative;
    display: inline-block;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring:nth-child(1) { animation-delay: 0s; }
.pulse-ring:nth-child(2) { animation-delay: 0.5s; }

@keyframes pulse-ring {
    0% { width: 50px; height: 50px; opacity: 1; }
    100% { width: 90px; height: 90px; opacity: 0; }
}

.record-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.record-btn.recording {
    background: var(--danger);
    animation: recording-pulse 1s ease-in-out infinite;
}

@keyframes recording-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.wave-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 25px;
    margin: 8px 0;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.4s ease;
}

.wave-container.active {
    opacity: 1;
    transform: translateY(0);
}

.wave-bar {
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
    transform-origin: bottom;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }
.wave-bar:nth-child(6) { animation-delay: 0.3s; }

@keyframes wave {
    0%, 100% { height: 6px; }
    50% { height: 20px; }
}

.status-text {
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.3;
}

.instruction-text {
    color: var(--gray-600);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.countdown-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
    animation: countdown-glow 1s ease-in-out infinite;
}

@keyframes countdown-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.processing-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Prevent swipe gestures from interfering with app */
* {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection only where needed */
input, textarea, .selectable {
    -webkit-user-select: text;
    user-select: text;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light);
    color: var(--gray-900);
    line-height: 1.5;
    padding-bottom: 80px;
}

/* App Header */
.app-header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

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

.card.border-0 {
    border: none !important;
}

/* Feature Icons */
.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e5e7;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    position: relative;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    width: 100%;
    position: relative;
    flex-direction: row;
    transform: translateY(35px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8e8e93;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 50px;
}

.nav-item.active {
    color: #007aff;
}

.nav-item:hover {
    color: #007aff;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

.nav-spacer {
    width: 60px;
}

/* Quiz button - positioned absolutely in exact center */
.quiz-fab {
    width: 60px;
    height: 60px;
    background: #8e8e93;
    border-radius: 50%;
    color: white !important;
    box-shadow: 0 8px 25px rgba(142, 142, 147, 0.3);
    border: 3px solid white;
    position: fixed;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-fab:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.05);
    color: white !important;
}

.quiz-fab.active {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.fab-icon {
    font-size: 20px;
}

.fab-label {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Prevent content from being hidden behind bottom navigation */
.main-content {
    padding-bottom: 90px;
}



/* Typography */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

.text-muted {
    color: var(--gray-500) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Progress */
.progress {
    border-radius: 4px;
    background-color: var(--gray-200);
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Foundation Grid */
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.foundation-item {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.foundation-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.foundation-item.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.foundation-item .letter {
    font-size: 1.2rem;
    font-weight: 600;
}

.foundation-item .number {
    font-size: 1.2rem;
    font-weight: 600;
}

.foundation-item .urdu {
    font-size: 1rem;
    margin-top: 4px;
    color: var(--gray-600);
    font-weight: 500;
}

.foundation-item.active .urdu {
    color: rgba(255, 255, 255, 0.8);
}

/* Detail View */
.foundation-detail {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.foundation-detail h2 {
    font-size: 4rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}

.foundation-detail .urdu-large {
    font-size: 2rem;
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.foundation-detail .example {
    text-align: center;
    margin-bottom: 8px;
}

.foundation-detail .example-urdu {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Writing Canvas */
.writing-canvas {
    background-color: var(--gray-100);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    cursor: crosshair;
    width: 100%;
    height: 200px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .app-header .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .main-content .container {
        padding-top: 16px;
        padding-bottom: 16px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .foundation-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .foundation-detail h2 {
        font-size: 3rem;
    }
    
    .foundation-detail .urdu-large {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .nav-text {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .foundation-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Quiz Options */
.quiz-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quiz-option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.quiz-option:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #2196f3;
}

.quiz-option:active {
    transform: translateY(0);
}

.quiz-option:disabled {
    opacity: 1 !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
}

.quiz-option.correct {
    background: #e8f5e8 !important;
    border-color: #4caf50 !important;
    color: #2e7d32 !important;
}

.quiz-option.incorrect {
    background: #ffebee !important;
    border-color: #f44336 !important;
    color: #c62828 !important;
}

.option-letter {
    width: 32px;
    height: 32px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6c757d;
    flex-shrink: 0;
}

.quiz-option:hover .option-letter {
    background: #2196f3;
    color: white;
}

.quiz-option.correct .option-letter {
    background: #4caf50 !important;
    color: white !important;
}

.quiz-option.incorrect .option-letter {
    background: #f44336 !important;
    color: white !important;
}

.option-text {
    flex: 1;
    font-weight: 500;
}

/* Progress Circles */
.progress-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.progress-circle.learned {
    background: #10b981;
    border-color: #10b981;
}

.progress-circle.review {
    background: #f59e0b;
    border-color: #f59e0b;
}

.progress-circle.current {
    border-color: #6c757d;
    border-width: 3px;
}

/* Review Stack */
.review-stack {
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
}

.review-word-chip {
    display: inline-block;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    animation: slideInFromTop 0.3s ease-out;
}

.review-word-chip strong {
    font-weight: 600;
}

.review-word-chip em {
    font-style: italic;
    opacity: 0.7;
    font-weight: 400;
}

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

.empty-stack {
    font-style: italic;
}

/* Difficulty Level Badges */
.difficulty-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-width: 80px;
    opacity: 0.5;
}

.difficulty-badge.current {
    border-color: #0d6efd;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.difficulty-badge.unlocked {
    border-color: #198754;
    background: #f8fff9;
    opacity: 1;
}

.difficulty-badge.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

.difficulty-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.difficulty-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.difficulty-progress {
    font-size: 0.65rem;
    opacity: 0.8;
}

.level-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

/* Word of the Day Animated Gradient */
.word-of-day-gradient {
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #4facfe 100%);
    background-size: 300% 300%;
    animation: fluidGradient 12s ease-in-out infinite;
    color: white;
    transform: none !important;
    transition: none !important;
    border: none !important;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.word-of-day-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes fluidGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.word-of-day-gradient:hover,
.word-of-day-gradient:active,
.word-of-day-gradient:focus {
    transform: none !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.word-of-day-gradient .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.word-of-day-gradient .h6 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.5rem !important; /* Make Urdu text bigger */
    font-weight: 600;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.border-bottom {
    border-bottom: 1px solid var(--gray-200);
}

.border-top {
    border-top: 1px solid var(--gray-200);
}

.rounded-circle {
    border-radius: 50%;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.text-decoration-none {
    text-decoration: none;
}

.cursor-pointer {
    cursor: pointer;
}
/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-overlay.active .sidebar {
    transform: translateX(0);
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.user-name {
    margin-top: 1rem;
    margin-bottom: 0;
    color: #333;
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.sidebar-link i {
    width: 20px;
}
.user-avatar .avatar-placeholder {
    width: 80px;
    height: 80px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}
/* Quiz question styling */
.quiz-question {
    font-weight: 300 !important; /* Light weight for regular text */
}

.quiz-question strong {
    font-size: 1.5em; /* Make the highlighted word bigger */
    font-weight: 700 !important; /* Bold weight for the target word */
    color: #0d6efd; /* Slightly different blue for emphasis */
}
/* Make Urdu text in Word of the Day bigger */
#dailyWordUrdu {
    font-size: 2rem !important;
    font-weight: 700 !important;
}
/* Compact Word of the Day text colors */
.word-of-day-gradient .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.word-of-day-gradient .text-white-75 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Speak button styling for Word of the Day */
.word-of-day-gradient .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word-of-day-gradient .btn-light:hover {
    background-color: white;
    border-color: rgba(255, 255, 255, 0.5);
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.word-of-day-gradient .btn-light:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Beautiful Learning Material Cards */
.lesson-card, .podcast-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.lesson-card:hover, .podcast-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Thumbnail Containers */
.lesson-thumbnail, .podcast-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.lesson-thumbnail img, .podcast-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lesson-card:hover .lesson-thumbnail img,
.podcast-card:hover .podcast-thumbnail img {
    transform: scale(1.1);
}

/* Overlay Effects */
.lesson-overlay, .podcast-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s ease;
}

.lesson-card:hover .lesson-overlay,
.podcast-card:hover .podcast-overlay {
    opacity: 1;
}

/* Play Buttons */
.lesson-play-btn, .podcast-play-btn {
    color: white;
    font-size: 4rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.lesson-card:hover .lesson-play-btn,
.podcast-card:hover .podcast-play-btn {
    transform: scale(1);
}

/* Badges */
.lesson-count, .podcast-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}

.podcast-badge {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

/* Card Body */
.lesson-card .card-body, .podcast-card .card-body {
    padding: 20px;
    background: white;
}

.lesson-card .card-title, .podcast-card .card-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.lesson-card .card-text, .podcast-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Buttons */
.lesson-card .btn, .podcast-card .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.lesson-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.lesson-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.podcast-card .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.podcast-card .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

/* Animation Delays */
.lesson-card:nth-child(1), .podcast-card:nth-child(1) { animation-delay: 0.1s; }
.lesson-card:nth-child(2), .podcast-card:nth-child(2) { animation-delay: 0.2s; }
.lesson-card:nth-child(3), .podcast-card:nth-child(3) { animation-delay: 0.3s; }
.lesson-card:nth-child(4), .podcast-card:nth-child(4) { animation-delay: 0.4s; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .lesson-thumbnail, .podcast-thumbnail {
        height: 160px;
    }
    
    .lesson-play-btn, .podcast-play-btn {
        font-size: 3rem;
    }
    
    .lesson-card .card-body, .podcast-card .card-body {
        padding: 15px;
    }
}
/* Video List Items */
.video-list-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-list-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.video-list-item.border-primary {
    background-color: #e3f2fd;
}

.video-thumbnail-small {
    position: relative;
}

.play-overlay-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.video-thumbnail-small:hover .play-overlay-small {
    opacity: 1;
}

/* Embedded Player Styles */
.player-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player-info h5 {
    color: #2c3e50;
    font-weight: 600;
}
/* Compact Learning Material Layout */
.learning-container {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Back Button Row */
.back-button-row {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Fixed Player - 30% of viewport */
.fixed-player {
    height: 30vh;
    background: #000;
    flex-shrink: 0;
}

.video-player {
    width: 100%;
    height: 100%;
}

/* Scrollable Areas */
.lessons-scroll-container,
.videos-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.videos-header {
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 5;
}

.videos-list {
    padding-bottom: 20px;
}

/* Compact Video List Items */
.video-list-item, .podcast-list-item {
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.video-list-item .d-flex, .podcast-list-item .d-flex {
    align-items: center;
}

.video-thumbnail-small img {
    width: 60px !important;
    height: 45px !important;
    border-radius: 4px;
}

.video-list-item h6, .podcast-list-item h6 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.video-list-item small, .podcast-list-item small {
    font-size: 0.75rem;
}

/* Compact Lesson Cards */
.lesson-card, .podcast-card {
    margin-bottom: 12px;
}

.lesson-card .card-body,
.podcast-card .card-body {
    padding: 15px;
}

.lesson-icon, .podcast-icon {
    font-size: 2rem !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fixed-player {
        height: 25vh;
    }
    
    .back-button-row {
        padding: 8px 12px;
    }
    
    .video-thumbnail-small img {
        width: 50px !important;
        height: 38px !important;
    }
}
