@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Cairo:wght@300;400;700&display=swap');

:root {
    --primary: #1e3a8a; /* Deep Blue Premium */
    --primary-light: #3b82f6;
    --hover: #12518a;
    --bg-color: #f1f5f9; /* Slate 100 */
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

body, input, button, textarea, select, span, p, h1, h2, h3, h4, label { font-family: var(--font-ar); }
[lang="en"] body, [lang="en"] input, [lang="en"] button, [lang="en"] textarea, [lang="en"] select, [lang="en"] span, [lang="en"] p, [lang="en"] h1, [lang="en"] h2, [lang="en"] h3, [lang="en"] h4, [lang="en"] label { font-family: var(--font-en); }

* { margin: 0; padding: 0; box-sizing: border-box; transition: background 0.3s, color 0.3s; }

body {
    background-color: #cbd5e1; /* Deeper Slate */
    background-image: radial-gradient(circle at top right, #cbd5e1, transparent 50%),
                      radial-gradient(circle at bottom left, #94a3b8, transparent 50%);
    min-height: 100vh;
    color: var(--text-dark);
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

[dir="rtl"] body {
    font-family: var(--font-ar);
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Premium Card */
.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.header {
    text-align: center;
    margin-bottom: 30px;
}
.header img {
    height: 70px;
    margin-bottom: 15px;
}
.header h2 {
    color: var(--primary);
    font-size: 1.6rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}
.form-control {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
    background: #f8fafc;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Radio Scales precisely 1-4 */
.section-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.rating-box {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.rating-box p {
    font-weight: 600;
    margin-bottom: 15px;
}
.radio-scale {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.radio-scale label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    font-weight: 600;
    flex: 1;
    min-width: 60px;
    text-align: center;
}
.radio-scale input[type="radio"] {
    accent-color: var(--primary);
    transform: scale(1.2);
}
.radio-scale label:hover {
    border-color: var(--primary);
    background: #eef5fc;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.15);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.25);
    filter: brightness(1.1);
}

/* Dashboard specific */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.dashboard-table th, .dashboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
[dir="rtl"] .dashboard-table th, [dir="rtl"] .dashboard-table td { text-align: right; }
.dashboard-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.generator-box {
    background: #eef5fc;
    padding: 20px;
    border-radius: 10px;
    border: 1px dashed var(--primary);
    margin-bottom: 30px;
}
.generated-link {
    display: block;
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    font-family: monospace;
    word-break: break-all;
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}

.btn-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}
