@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* تنظیمات کلی و variables */
:root {
    /* رنگ‌های اصلی - تم فارسی */
    --background: hsl(210, 20%, 98%);
    --foreground: hsl(222, 47%, 11%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(222, 47%, 11%);
    --primary: hsl(142, 76%, 36%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(142, 76%, 56%);
    --secondary: hsl(210, 40%, 94%);
    --secondary-foreground: hsl(222, 47%, 11%);
    --muted: hsl(210, 40%, 96%);
    --muted-foreground: hsl(215, 16%, 47%);
    --accent: hsl(25, 95%, 53%);
    --accent-foreground: hsl(0, 0%, 100%);
    --destructive: hsl(0, 84%, 60%);
    --destructive-foreground: hsl(0, 0%, 100%);
    --border: hsl(214, 32%, 91%);
    --input: hsl(214, 32%, 91%);
    --ring: hsl(142, 76%, 36%);
    --success: hsl(142, 76%, 36%);
    --warning: hsl(38, 92%, 50%);
    --task-blue: hsl(214, 84%, 56%);
    --goal-green: hsl(142, 76%, 36%);
    --event-purple: hsl(262, 83%, 58%);
    --shadow-elegant: 0 10px 30px -10px hsla(142, 76%, 36%, 0.3);
    --shadow-glow: 0 0 40px hsla(142, 76%, 56%, 0.4);
    --radius: 0.5rem;
}

[data-theme="dark"] {
    --background: hsl(222, 47%, 11%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(222, 47%, 11%);
    --card-foreground: hsl(210, 40%, 98%);
    --primary: hsl(142, 76%, 56%);
    --primary-glow: hsl(142, 76%, 66%);
    --secondary: hsl(215, 28%, 17%);
    --muted: hsl(215, 28%, 17%);
    --border: hsl(215, 28%, 17%);
    --input: hsl(215, 28%, 17%);
}

/* Reset و تنظیمات پایه */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Vazirmatn', system-ui, sans-serif;
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

/* Container ها */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Card Component */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elegant);
    color: var(--card-foreground);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-glow);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.card-content {
    padding: 1.5rem;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--primary-foreground);
    box-shadow: var(--shadow-elegant);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

/* Input Components */
.input {
    display: flex;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--background);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--foreground);
    min-height: 44px;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsla(142, 76%, 36%, 0.1);
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 0.5rem;
    background-color: var(--secondary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    transition: width 0.5s ease-in-out;
    border-radius: 9999px;
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-default {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Task Card Styles */
.task-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.task-card:hover {
    box-shadow: var(--shadow-elegant);
    transform: translateY(-1px);
}

.task-title {
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elegant);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Navigation */
.nav {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .input {
        min-height: 44px;
        font-size: 1rem;
    }
    
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.hidden { display: none; }
.block { display: block; }
.w-full { width: 100%; }
.mb-4 { margin-bottom: 1rem; }
.p-6 { padding: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }