/* CSS خفن برای یادداشت‌های تو */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

/* کانتینر اصلی */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* هدر */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: white;
    font-size: 2.2rem;
    text-align: center;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* کنترل‌ها */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.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: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-new {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
}

.btn-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 176, 155, 0.4);
}

.btn-delete-all {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-delete-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 65, 108, 0.4);
}

.btn-logout {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
}

.btn-logout:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(142, 45, 226, 0.4);
}

/* شبکه یادداشت‌ها */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.note-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.note-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.note-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px dashed #eee;
}

.note-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    direction: ltr;
}

.note-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.note-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
}

.note-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.action-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-view {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-view:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-delete {
    background: rgba(255, 65, 108, 0.1);
    color: #ff416c;
    border: 1px solid #ff416c;
}

.btn-delete:hover {
    background: #ff416c;
    color: white;
    transform: translateY(-2px);
}

/* مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 24px;
    padding: 35px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-save {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.3);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 176, 155, 0.4);
}

.btn-cancel {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 14px 35px;
    border: 2px solid #6c757d;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-3px);
}

/* حالت خالی */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin-top: 50px;
}

.empty-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* فوتور */
.footer {
    text-align: center;
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 20px;
}

/* استایل‌های اضافه برای مودال مشاهده */
.note-meta {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    font-size: 0.95rem;
}

.note-content-full {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #eee;
    min-height: 300px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 1.1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.note-content-full::-webkit-scrollbar {
    width: 8px;
}

.note-content-full::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.note-content-full::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.note-content-full::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a3fc8 100%);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}