/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #56ab2f;
    --danger-color: #ff6b6b;
    --warning-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
    --transition: all 0.3s ease;
    --gradient-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --text-color: #ffffff;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --white: #2d2d2d;
    --card-bg: rgba(45, 45, 45, 0.95);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
    --gradient-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body {
    font-family: 'Inter', 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient-bg);
    min-height: 100vh;
    direction: ltr;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

body[dir="rtl"] {
    direction: rtl;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 2s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 3s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    top: 70%;
    right: 5%;
    animation-delay: 5s;
}

.shape-7 {
    width: 50px;
    height: 50px;
    top: 50%;
    left: 40%;
    animation-delay: 6s;
    animation-duration: 8s;
}

.shape-8 {
    width: 110px;
    height: 110px;
    top: 85%;
    left: 70%;
    animation-delay: 7s;
    animation-duration: 7s;
}

.shape-9 {
    width: 70px;
    height: 70px;
    top: 5%;
    left: 50%;
    animation-delay: 8s;
    animation-duration: 9s;
}

.shape-10 {
    width: 130px;
    height: 130px;
    top: 30%;
    right: 25%;
    animation-delay: 9s;
    animation-duration: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Top Controls */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: center;
}

body[dir="rtl"] .top-controls {
    right: auto;
    left: 20px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.lang-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Theme Switcher */
.theme-switcher {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.theme-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.1);
    background: rgba(102, 126, 234, 0.1);
}

.light-icon, .dark-icon {
    position: absolute;
    transition: var(--transition);
}

[data-theme="dark"] .light-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .dark-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .light-icon,
[data-theme="dark"] .dark-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .dark-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Header Styles */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
    animation: rainbow 3s ease-in-out infinite;
}

@keyframes rainbow {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

[data-theme="dark"] .logo {
    color: var(--text-color);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .logo-text {
    background: linear-gradient(135deg, #a8b2f1, #e4b9ff);
    -webkit-background-clip: text;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 1rem;
}

.made-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.author-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .author-link {
    color: #a8b2f1;
    background: rgba(168, 178, 241, 0.1);
}

.author-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Dashboard Stats */
.dashboard {
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-info p {
    color: var(--text-light);
    font-weight: 500;
}

.stat-icon .fa-fire {
    color: #ff9d2f;
}

/* Quote Section */
.quote-section {
    margin-bottom: 1rem;
}

.quote-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quote-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    animation: quoteProgress 2s ease-out 0.5s forwards;
}

@keyframes quoteProgress {
    to { transform: scaleX(1); }
}

.quote-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
    animation: quoteFloat 3s ease-in-out infinite;
}

@keyframes quoteFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

#dailyQuote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.8;
}

#quoteAuthor {
    color: var(--primary-color);
    font-weight: 600;
}

/* Section Styles */
.task-section, .goal-section, .progress-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.task-section::before, .goal-section::before, .progress-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    animation: sectionProgress 1s ease-out 0.3s forwards;
}

@keyframes sectionProgress {
    to { transform: scaleX(1); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #a8e6cf);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-light);
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ee5a52);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Form Styles */
.task-form, .goal-form {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
    animation: formSlideDown 0.3s ease-out;
}

@keyframes formSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-form input, .goal-form input, .goal-form textarea, .goal-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--white);
    color: var(--text-color);
}

.task-form input:focus, .goal-form input:focus, .goal-form textarea:focus, .goal-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.goal-form textarea {
    resize: vertical;
    min-height: 80px;
}

.goal-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.goal-metrics label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    display: block;
}

.goal-metrics input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

#progressValue {
    font-weight: 600;
    color: var(--primary-color);
}

.form-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Task Filters */
.task-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.3s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: taskSlideIn 0.5s ease-out;
}

@keyframes taskSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: var(--success-color);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.task-checkbox.checked {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
    animation: checkboxPop 0.3s ease-out;
}

@keyframes checkboxPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.task-content {
    flex: 1;
}

.task-text {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    align-items: center;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #e9ecef;
    color: #495057;
}

.task-due-date.overdue {
    background: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

.task-priority {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #ffe6e6;
    color: #d63384;
}

.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-actions button {
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
    color: var(--text-color);
}

.task-actions button:hover {
    background: var(--bg-color);
    transform: scale(1.1);
}

/* Goals Grid */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.goal-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
    animation: goalSlideIn 0.5s ease-out;
}

@keyframes goalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.goal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.goal-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.goal-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Progress Charts */
.progress-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close:hover {
    color: var(--text-color);
    transform: scale(1.2);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    z-index: 1000;
    animation: fabFloat 3s ease-in-out infinite;
}

body[dir="rtl"] .fab {
    right: auto;
    left: 30px;
}

@keyframes fabFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fab:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    animation: emptyStateFloat 2s ease-in-out infinite;
}

@keyframes emptyStateFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Goal Meta and Controls */
.goal-meta {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.goal-controls {
    margin-top: 1rem;
}

.goal-progress-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.goal-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.goal-progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.goal-progress-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.goal-progress-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Sound Switcher */
.sound-switcher {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.sound-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
}

.sound-btn:hover {
    transform: scale(1.1);
    background: rgba(102, 126, 234, 0.1);
}

/* Search Container */
.search-container {
    position: relative;
    width: 50%;
    margin: 1.5rem auto 0;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 25px;
    border: 1px solid transparent;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: var(--transition);
}

body[dir="rtl"] .search-icon {
    left: auto;
    right: 1rem;
}

body[dir="rtl"] .search-input {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
}

.search-input:focus + .search-icon {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-info p {
    color: var(--text-light);
    font-weight: 500;
}

.task-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-options select, .task-options input[type="date"] {
    flex: 1;
    margin-bottom: 0;
}

/* Sub-tasks */
.sub-tasks {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.sub-task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.sub-task-item.completed .sub-task-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.sub-task-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.sub-task-checkbox.checked {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.add-sub-task-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.add-sub-task-form input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--bg-color);
    color: var(--text-color);
}

.add-sub-task-form button {
    padding: 0.5rem;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

/* Responsive Design */
@media (min-width: 769px) { /* Desktop styles */
    .mobile-menu-toggle {
        display: none;
    }

    .top-controls {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        padding-top: 0;
        background: none;
        backdrop-filter: none;
        box-shadow: none;
        transition: none;
        transform: none !important; /* Important to override mobile transform */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .mobile-menu-toggle {
        display: block; /* Show on mobile */
    }

    .header {
        padding: 1rem 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .logo {
        font-size: 2rem;
        margin-top: 3rem; /* Add space for the menu button */
    }
    
    .top-controls {
        position: fixed; 
        top: 0;
        right: -300px; /* Hidden off-screen */
        width: 250px;
        height: 100%;
        padding-top: 60px; /* Space for a close button if we add one */
        
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        
        background: var(--card-bg);
        backdrop-filter: blur(15px);
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
        z-index: 1001;
        transition: right 0.3s ease-in-out;
    }

    .top-controls.open {
        right: 0; /* Slide in */
    }
    
    body[dir="rtl"] .top-controls {
        right: auto;
        left: -300px;
    }

    body[dir="rtl"] .top-controls.open {
        left: 0;
    }
    
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .search-container {
        margin-top: 1.5rem;
        width: 90%;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-form, .goal-form {
        padding: 1rem;
    }
    
    .goal-metrics {
        grid-template-columns: 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .task-filters {
        justify-content: center;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    body[dir="rtl"] .fab {
        right: auto;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .task-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .task-actions {
        justify-content: center;
    }
    
    .made-by {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* RTL Specific Styles */
body[dir="rtl"] .task-item {
    border-left: none;
    border-right: 4px solid #dee2e6;
}

body[dir="rtl"] .task-item.completed {
    border-right-color: var(--success-color);
}

body[dir="rtl"] .goal-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

body[dir="rtl"] .task-item:hover {
    transform: translateX(-5px);
}

body[dir="rtl"] .section-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .goal-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .goal-actions {
    justify-content: flex-start;
}

body[dir="rtl"] .task-actions {
    flex-direction: row-reverse;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* AOS-like animations */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Achievements Modal */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.achievement-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.achievement-card.unlocked {
    border: 2px solid var(--success-color);
    transform: scale(1.05);
}

.achievement-card.unlocked .achievement-icon {
    color: var(--success-color);
    transform: scale(1.1);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    transition: var(--transition);
}

.achievement-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.achievement-description {
    font-size: 0.8rem;
    color: var(--text-light);
}

body[dir="rtl"] .stats-grid {
    flex-direction: row-reverse;
}

body[dir="rtl"] .section-header {
    flex-direction: row-reverse;
}

/* Mascot Styles */
.mascot-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
    cursor: pointer;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[dir="rtl"] .mascot-container {
    left: auto;
    right: 20px;
}

.mascot {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.orb {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: mascotFloat 5s ease-in-out infinite;
}

.orb-core {
    position: absolute;
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 0 15px var(--primary-color), 0 0 30px var(--primary-color), inset 0 0 10px rgba(255,255,255,0.5);
    animation: orbPulse 3s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0.5;
    filter: blur(1px);
}

.orb-ring:nth-child(1) {
    animation: rotate3D 6s linear infinite;
    border-style: dotted;
}
.orb-ring:nth-child(2) {
    animation: rotate3D 8s linear infinite reverse;
    border-style: dashed;
}
.orb-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation: rotate3D 10s linear infinite;
    border-style: solid;
    opacity: 0.8;
}

.mascot:hover .orb-ring {
    animation-play-state: paused;
}
.mascot:hover .orb-core {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--primary-color), 0 0 50px var(--primary-color), inset 0 0 15px rgba(255,255,255,0.7);
}

.mascot.clicked .orb {
    animation: mascotClick 0.5s ease;
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg) rotateX(10deg); }
    50% { transform: translateY(-15px) rotateY(20deg) rotateX(-10deg); }
}

@keyframes mascotClick {
    0% { transform: scale3d(1, 1, 1); }
    50% { transform: scale3d(0.9, 0.9, 0.9) rotate(15deg); }
    100% { transform: scale3d(1, 1, 1); }
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.9; }
}

@keyframes rotate3D {
    from { transform: rotate3d(1, 1, 0, 0deg); }
    to { transform: rotate3d(1, 1, 0, 360deg); }
}

.mascot-quote-bubble {
    position: absolute;
    bottom: 120px;
    left: 0;
    transform: scale(0);
    transform-origin: bottom left;
    background: var(--card-bg);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 250px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mascot-quote-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    transform: none;
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: var(--card-bg) transparent transparent transparent;
}

.mascot-quote-bubble.show {
    transform: scale(1);
    opacity: 1;
}

body[dir="rtl"] .mascot-quote-bubble {
    left: auto;
    right: 0;
    text-align: right;
    transform-origin: bottom right;
}

body[dir="rtl"] .mascot-quote-bubble::after {
    left: auto;
    right: 30px;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: block; /* Visible on mobile by default */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    color: var(--text-color);
    box-shadow: var(--shadow);
    cursor: pointer;
}

body[dir="rtl"] .mobile-menu-toggle {
    right: auto;
    left: 20px;
} 