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

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.header-actions h1 {
    flex: 1;
    text-align: center;
    color: #333;
    margin: 0;
    font-size: 28px;
}

.btn-back-menu {
    display: inline-block;
    padding: 10px 20px;
    background: #666;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-back-menu:hover {
    background: #555;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
    font-size: 14px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    resize: vertical;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 100px;
}

small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

input[type="checkbox"] {
    margin-left: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

input[type="checkbox"]:disabled + span,
label:has(input[type="checkbox"]:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-generate {
    width: 100%;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

/* چیپس استایل‌ها */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    min-height: 60px;
    align-items: flex-start;
    background: white;
    transition: border-color 0.3s;
}

.chips-container:focus-within {
    border-color: #667eea;
}

.chips-input {
    flex: 1;
    min-width: 200px;
    border: none;
    outline: none;
    padding: 0;
    font-size: 14px;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    background: transparent;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    animation: chipAppear 0.3s ease-out;
    /* رنگ از طریق JavaScript به صورت inline تنظیم می‌شود */
}

@keyframes chipAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chip-text {
    flex: 1;
    white-space: nowrap;
}

.chip-close {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    padding: 0 4px;
    transition: transform 0.2s, color 0.2s;
    user-select: none;
}

.chip-close:hover {
    transform: scale(1.2);
    color: #ffcccc;
}



