/* أسلوب عام للتطبيق */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #667eea;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    padding: 10px;
    border-radius: 5px;
}

nav a:hover {
    background: #5a67d8;
}

.login-form, .register-form {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-form h2, .register-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #667eea;
}

input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}

button:hover {
    background: #5a67d8;
}

ul {
    list-style: none;
}

li {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

#message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
}

#message.success {
    background: #c6f6d5;
    color: #276749;
}

#message.error {
    background: #fed7d7;
    color: #c53030;
}

section {
    background: white;
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
}

/* تنسيقات البوتات */
.bot-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 1rem 0;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.bot-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.2rem;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.status.running {
    background: #c6f6d5;
    color: #276749;
}

.status.stopped {
    background: #fed7d7;
    color: #c53030;
}

.status.error {
    background: #feebc8;
    color: #c05621;
}

.bot-info {
    margin: 1rem 0;
}

.bot-info p {
    color: #666;
    margin-bottom: 1rem;
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.bot-stats span {
    text-align: center;
    font-size: 0.9em;
    color: #4a5568;
}

.bot-usage {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.bot-usage span {
    color: #4a5568;
    font-size: 0.9em;
}

.bot-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.bot-actions button {
    width: auto;
    padding: 0.5rem 1rem;
}

.bot-actions button.start {
    background: #48bb78;
}

.bot-actions button.stop {
    background: #f56565;
}

.bot-actions button.delete {
    background: #718096;
}

/* نموذج إنشاء بوت */
#createBotForm {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#createBotForm h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="number"] {
    width: 150px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

#createBotForm button[type="submit"] {
    background: #667eea;
    margin-left: 0.5rem;
}

#createBotForm button[type="button"] {
    background: #718096;
}