/* Base Styles with Arabic Font Support - Enhanced Modern Design */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10d876;
    --warning-color: #ffa726;
    --danger-color: #f44336;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 25px;
    --transition-fast: all 0.2s ease;
    --transition-medium: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

body {
    background: var(--gradient-bg);
    background-attachment: fixed;
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: floating 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Arabic and English text styles */
.ar-text {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-weight: 500;
}

.en-text {
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Enhanced Language Toggle */
.language-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

[dir="rtl"] .language-toggle {
    left: auto;
    right: 20px;
}

.language-toggle .btn {
    font-size: 18px;
    padding: 14px 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition-medium);
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.language-toggle .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.language-toggle .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    background: white;
    border-color: var(--primary-color);
}

.language-toggle .btn:hover::before {
    left: 100%;
}

/* Enhanced Welcome Card */
.welcome-card {
    border-radius: var(--border-radius-lg);
    border: none;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-heavy), 0 0 50px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

.welcome-card .card-body {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
}

.welcome-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    font-size: 1.6rem;
    opacity: 0.95;
    margin-bottom: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Enhanced Main Card */
.main-card {
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: var(--shadow-heavy), 0 0 80px rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(25px);
    background: rgba(255, 255, 255, 0.98);
    position: relative;
    overflow: hidden;
}

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

.card-header {
    background: var(--gradient-primary);
    border-bottom: none;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.header-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.logout-btn {
    font-size: 1.3rem;
    padding: 16px 32px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.4);
    min-height: 55px;
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.logout-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    background: white;
    color: var(--secondary-color);
}

.logout-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Large Tabs */
.large-tabs {
    border-bottom: 3px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(to right, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    position: relative;
}

.large-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
}

.large-tab {
    font-size: 1.6rem;
    padding: 1.8rem 3rem;
    font-weight: 600;
    border: none;
    border-bottom: 4px solid transparent;
    transition: var(--transition-medium);
    background: transparent;
    min-height: 75px;
    position: relative;
    overflow: hidden;
}

.large-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.large-tab:hover::before {
    transform: scaleX(1);
}

.large-tab:hover {
    border-bottom-color: var(--primary-color);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.large-tab.active {
    background: white;
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 -8px 20px rgba(102, 126, 234, 0.15);
    z-index: 1;
}

.large-tab.active::before {
    display: none;
}

/* Enhanced Card Body */
.large-padding {
    padding: 3.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    position: relative;
}

.large-padding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
}

/* Enhanced Instruction Card */
.instruction-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: var(--border-radius-md);
    padding: 3rem;
    border: 3px solid rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-medium), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.instruction-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    z-index: -1;
    opacity: 0.1;
}

.instruction-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.instruction-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.instruction-text {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0;
    line-height: 1.8;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Enhanced Extra Large Buttons */
.btn-xl {
    font-size: 1.7rem;
    padding: 1.8rem 3.5rem;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    min-width: 240px;
    min-height: 70px;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.btn-xl::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.btn-xl:hover::before {
    width: 400px;
    height: 400px;
}

.btn-xl:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn-xl:active {
    transform: translateY(-2px);
    transition: var(--transition-fast);
}

.recording-btn {
    position: relative;
    border: none;
    background: var(--gradient-primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #06d755 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0ecf6b 0%, var(--success-color) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e53935 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f55a4e 0%, var(--danger-color) 100%);
    color: white;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
}

/* Enhanced Modern Input Group */
.modern-input-group {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: var(--transition-medium);
    overflow: hidden;
}

.modern-input-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.modern-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-medium);
    transform: translateY(-2px);
}

.modern-input-group:focus-within::before {
    opacity: 0.05;
}

/* Enhanced Add Todo Button */
.add-todo-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.4rem;
    padding: 1.2rem 2.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.add-todo-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

[dir="rtl"] .add-todo-btn {
    margin-right: 0;
    margin-left: 1rem;
}

.add-todo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
}

.add-todo-btn:hover::before {
    width: 300px;
    height: 300px;
}

.add-todo-btn:active {
    transform: translateY(-1px);
}

/* Enhanced Upload Button */
.upload-btn {
    background: var(--gradient-accent);
    border: none;
    color: white;
    font-size: 1.3rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
    color: white;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:active {
    transform: translateY(0);
}

/* Enhanced Status Text */
.status-text {
    font-size: 1.4rem;
    font-weight: 600;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    margin: 1rem 0;
}

/* Enhanced Audio Container */
.audio-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(102, 126, 234, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.large-audio {
    width: 100%;
    height: 60px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-light);
    background: var(--bg-light);
    margin-top: 1rem;
}

/* Enhanced Processing Card */
.processing-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(102, 126, 234, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.processing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    animation: processing-bar 2s ease-in-out infinite;
}

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

.large-spinner {
    width: 4rem;
    height: 4rem;
    border-width: 0.4rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

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

.processing-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.5rem;
}

.processing-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Enhanced Result Card */
.result-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(16, 216, 118, 0.2);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--success-color) 0%, #06d755 100%);
}

.result-title {
    font-size: 1.8rem;
    color: var(--success-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(16, 216, 118, 0.2);
}

/* Enhanced Transcription Box */
.transcription-box {
    background: linear-gradient(135deg, rgba(16, 216, 118, 0.05), rgba(6, 215, 85, 0.05));
    border: 2px solid rgba(16, 216, 118, 0.2);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 500;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.transcription-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(16, 216, 118, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.transcription-tasks {
    margin-top: 1.5rem;
}

.transcription-task-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(16, 216, 118, 0.2);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
}

.transcription-task-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--success-color);
}

.task-text {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0;
    font-weight: 500;
    line-height: 1.6;
}

/* Enhanced Todos Title */
.todos-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Enhanced Collapsible Headers */
.card-header .btn-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3rem;
    padding: 1.5rem 0;
    transition: var(--transition-medium);
    border-radius: var(--border-radius-sm);
}

.card-header .btn-link:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateX(5px);
}

.card-header .btn-link:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    outline: none;
}

.card-header .btn-link.collapsed .bi-chevron-down {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.card-header .btn-link:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* Enhanced Card Styles */
.card {
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: var(--transition-medium);
}

.card:hover {
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

/* Enhanced Form Selects */
.form-select.large-input {
    font-size: 1.3rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition-medium);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    box-shadow: var(--shadow-light);
}

[dir="rtl"] .form-select.large-input {
    background-position: left 1.5rem center;
}

.form-select.large-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-medium);
    outline: none;
    transform: translateY(-1px);
}

/* Enhanced Badge */
.badge {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: var(--shadow-light);
}

/* Enhanced Search Input */
#search-todos {
    font-size: 1.3rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-light);
}

#search-todos:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-medium);
    outline: none;
    transform: translateY(-1px);
}

[dir="rtl"] #search-todos {
    text-align: right;
    padding-right: 2.5rem;
}

/* Enhanced Clear Filters Button */
#clear-filters {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ff9800 100%);
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
}

#clear-filters:hover {
    background: linear-gradient(135deg, #ff9800 0%, var(--warning-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 167, 38, 0.3);
    color: white;
}

/* Enhanced Todo Item Styling */
.large-list .list-group-item.todo-item {
    background: linear-gradient(135deg, white, rgba(102, 126, 234, 0.02));
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-medium);
    cursor: pointer;
    min-height: 85px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.large-list .list-group-item.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: top;
}

[dir="rtl"] .large-list .list-group-item.todo-item {
    text-align: right;
}

[dir="rtl"] .large-list .list-group-item.todo-item::before {
    left: auto;
    right: 0;
}

.large-list .list-group-item.todo-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
    background: linear-gradient(135deg, white, rgba(102, 126, 234, 0.05));
}

.large-list .list-group-item.todo-item:hover::before {
    transform: scaleY(1);
}

[dir="rtl"] .large-list .list-group-item.todo-item:hover {
    transform: translateY(-4px);
}

.large-list .list-group-item.completed-todo {
    background: linear-gradient(135deg, rgba(16, 216, 118, 0.05), rgba(6, 215, 85, 0.05));
    border-color: rgba(16, 216, 118, 0.3);
    opacity: 0.85;
    position: relative;
}

.large-list .list-group-item.completed-todo::before {
    background: linear-gradient(135deg, var(--success-color) 0%, #06d755 100%);
}

[dir="rtl"] .large-list .list-group-item.completed-todo {
    text-align: right;
}

.large-list .list-group-item.completed-todo:hover {
    opacity: 1;
    border-color: var(--success-color);
    box-shadow: 0 12px 35px rgba(16, 216, 118, 0.25);
}

[dir="rtl"] .large-list .list-group-item.completed-todo:hover {
    transform: translateY(-3px);
}

/* Enhanced Todo Content Structure */
.todo-content {
    flex: 1;
    margin-right: 1.5rem;
    min-height: 45px;
}

[dir="rtl"] .todo-content {
    margin-right: 0;
    margin-left: 1.5rem;
}

.todo-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
    letter-spacing: -0.01em;
}

.completed-todo .todo-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.todo-meta {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-weight: 500;
}

.completed-badge {
    background: linear-gradient(135deg, var(--success-color), #06d755);
    color: white;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    margin-left: 1rem;
    box-shadow: 0 4px 15px rgba(16, 216, 118, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.completed-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: completed-shine 2s ease-in-out infinite;
}

@keyframes completed-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

[dir="rtl"] .completed-badge {
    margin-left: 0;
    margin-right: 1rem;
}

/* Enhanced Todo Action Buttons */
.todo-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.todo-action-btn {
    width: 55px;
    height: 55px;
    border-radius: var(--border-radius-md);
    border: 2px solid transparent;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    background: white;
}

.todo-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.todo-action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.todo-action-btn:hover::before {
    width: 100px;
    height: 100px;
}

.todo-action-btn.btn-success::before {
    background: rgba(16, 216, 118, 0.1);
}

.todo-action-btn.btn-warning::before {
    background: rgba(255, 167, 38, 0.1);
}

.todo-action-btn.btn-danger::before {
    background: rgba(244, 67, 54, 0.1);
}

.todo-action-btn i {
    font-size: 1.3rem;
    z-index: 1;
    position: relative;
}

/* Enhanced Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ff9800 100%);
    border: none;
    color: white;
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, var(--warning-color) 100%);
    border-color: #ff9800;
    color: white;
}

/* Enhanced Empty Message */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: var(--border-radius-md);
    border: 2px dashed rgba(102, 126, 234, 0.2);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.empty-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.empty-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    opacity: 0.7;
    animation: gentle-bounce 3s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.empty-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.empty-subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
    font-weight: 500;
}

/* Enhanced Loading Text */
.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary-color);
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: var(--border-radius-md);
    margin: 1rem 0;
}

/* Enhanced Large Alert */
.large-alert {
    font-size: 1.4rem;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-medium);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.large-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.3;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(229, 57, 53, 0.1));
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 216, 118, 0.1), rgba(6, 215, 85, 0.1));
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.1), rgba(255, 152, 0, 0.1));
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Enhanced Recording Pulse Animation */
.recording-pulse {
    position: relative;
    left: 20px;
    top: 20px;
}

[dir="rtl"] .recording-pulse {
    left: auto;
    right: 20px;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(244, 67, 54, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

.recording-pulse .btn {
    animation: pulse 2s infinite;
}

/* Enhanced Card Hover Effects */
.card {
    position: relative;
    transition: var(--transition-medium);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card:hover::after {
    opacity: 1;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .welcome-title {
        font-size: 2.2rem; /* Slightly smaller but still large */
    }

    .welcome-subtitle {
        font-size: 1.3rem;
    }

    .btn-xl {
        font-size: 1.4rem;
        padding: 1.2rem 2rem;
        min-width: 180px;
        min-height: 55px; /* Maintain large touch targets */
    }

    .large-padding {
        padding: 2rem; /* Reduced but still generous */
    }

    .instruction-card {
        padding: 2rem;
    }

    .instruction-title {
        font-size: 1.6rem;
    }

    .instruction-text {
        font-size: 1.2rem;
    }

    .large-list .list-group-item.todo-item {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        min-height: auto;
    }

    .todo-content {
        margin-right: 0;
        width: 100%;
    }

    .todo-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 1rem;
        gap: 0.5rem; /* Reduced gap for mobile */
    }

    .todo-action-btn {
        width: auto; /* Allow width to accommodate text */
        min-width: 80px; /* Minimum width for text buttons */
        height: 45px;
        font-size: 0.9rem; /* Slightly smaller font for mobile */
        padding: 0.5rem 0.75rem; /* Add horizontal padding for text */
        white-space: nowrap; /* Prevent text wrapping */
    }

    .large-list .list-group-item.todo-item:hover {
        transform: none; /* Disable transform on mobile */
    }

    [dir="rtl"] .large-list .list-group-item.todo-item:hover {
        transform: none;
    }

    .modern-input-group {
        flex-direction: column;
        border-radius: 20px;
        width: 100%; /* Ensure full width */
    }

    .modern-input-group:focus-within {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    }

    .large-input {
        border-radius: 18px 18px 0 0;
        font-size: 1.2rem;
        padding: 1rem 1.2rem;
        width: 100% !important; /* Force full width */
        flex: 1; /* Take remaining space */
        border-right: 2px solid rgba(102, 126, 234, 0.2) !important; /* Ensure border on mobile */
    }

    .add-todo-btn {
        border-radius: 0 0 18px 18px;
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        width: 100%; /* Full width on mobile */
    }

    .add-todo-btn:hover {
        transform: none; /* Disable transform on mobile */
    }

    [dir="rtl"] .large-input {
        border-radius: 18px 18px 0 0;
        border-left: 2px solid rgba(102, 126, 234, 0.2) !important;
        border-right: 2px solid rgba(102, 126, 234, 0.2) !important;
    }

    [dir="rtl"] .add-todo-btn {
        border-radius: 0 0 18px 18px;
    }

    .btn-xl::before,
    .btn-xl::after {
        display: none; /* Remove any pseudo-elements on mobile */
    }

    /* Fix for manual add form input group on mobile */
    .manual-add-form .input-group {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .manual-add-form .input-group .form-control {
        flex: 1;
        width: auto;
    }

    .manual-add-form .input-group .btn {
        flex-shrink: 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
        font-weight: 600; /* Bolder text in high contrast */
    }

    .card {
        border: 3px solid black; /* Strong borders */
        background: white;
    }

    .btn {
        border: 3px solid black !important;
        font-weight: 700 !important; /* Very bold text */
        font-size: 1.1em !important; /* Slightly larger text */
    }

    .btn-primary {
        background: black !important;
        color: white !important;
    }

    .btn-success {
        background: #006600 !important;
        color: white !important;
    }

    .btn-danger {
        background: #cc0000 !important;
        color: white !important;
    }

    .instruction-card,
    .processing-card,
    .result-card {
        border: 3px solid black;
        background: white;
    }

    .large-input {
        border: 3px solid black !important;
        background: white !important;
        color: black !important;
    }

    .todo-item {
        border: 3px solid black !important;
        background: white !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        transform: none !important; /* Remove all transforms */
    }

    .recording-pulse {
        animation: none; /* Remove pulsing animation */
    }

    .btn:hover,
    .todo-item:hover,
    .large-tab:hover {
        transform: none !important; /* No hover transforms */
    }
}

.manual-add-form .input-group {
    margin-bottom: 1.5rem;
}

.large-input {
    font-size: 1.3rem; /* Increased from default */
    padding: 1.2rem 1.5rem; /* Increased padding */
    border-radius: 18px 0 0 18px;
    border: 2px solid rgba(102, 126, 234, 0.2); /* Stronger border */
    background: white;
    color: #2c3e50;
    font-weight: 500;
    min-height: 60px; /* Larger touch target */
    flex: 1; /* Take remaining space in flex container */
    border-right: none; /* Remove right border to connect with button */
}

.large-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.25); /* Stronger focus indicator */
    background: #fafbff;
}

[dir="rtl"] .large-input {
    border-radius: 0 18px 18px 0;
    border-left: none; /* Remove left border in RTL */
    border-right: 2px solid rgba(102, 126, 234, 0.2); /* Restore right border in RTL */
}

.large-input::-webkit-input-placeholder {
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 400;
}

.large-input::-moz-placeholder {
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 400;
} 
} 
