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

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* فرم ایجاد */
.create-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.create-form input[type="text"] {
    width: 70%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.create-form input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

.create-form button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    transition: background 0.3s;
}

.create-form button:hover {
    background: #2980b9;
}

/* لیست دایرکتوری‌ها */
.directories-list {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.empty-message {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
    font-style: italic;
}

.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.dir-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
}

.dir-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.dir-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.dir-name {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    word-break: break-word;
}

.dir-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-rename, .btn-delete {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-rename {
    background: #f39c12;
    color: white;
}

.btn-rename:hover {
    background: #e67e22;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

/* بخش دانلود */
.download-section {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn-download {
    padding: 15px 40px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.btn-download:hover {
    background: #229954;
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideDown 0.3s;
}

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

.close {
    position: absolute;
    left: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: #2980b9;
}

/* پیام‌های موفقیت/خطا (اختیاری) */
.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .create-form input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .create-form button {
        width: 100%;
        margin-right: 0;
    }
    
    .dir-grid {
        grid-template-columns: 1fr;
    }
}