:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #f59e0b;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

/* Background Animations */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
    z-index: -2;
}

.circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.circles div {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.circles div:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
    background: rgba(99, 102, 241, 0.2);
}

.circles div:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
    background: rgba(168, 85, 247, 0.2);
}

.circles div:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
    background: rgba(245, 158, 11, 0.2);
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

nav button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

nav button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Glass Card */
.card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeInUp 0.6s ease-out;
    margin-bottom: 2rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input,
select,
textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Role Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s;
}

.role-card {
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.8);
}

.role-options {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.role-options button {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(168, 85, 247, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1.25rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.role-options button:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.change-role-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all 0.3s;
}

.change-role-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

table th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    text-align: right;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tr {
    transition: transform 0.2s;
}

table tbody tr:hover {
    transform: scale(1.01);
    background: rgba(255, 255, 255, 0.02);
}

table td {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

table tr td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

table tr td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.suitability-مناسبة {
    color: #4ade80;
    font-weight: bold;
}

.suitability-غير {
    color: #f87171;
    font-weight: bold;
}

.suitability-قيد {
    color: #fbbf24;
}

/* Dashboard Cards */
.dash-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: transform 0.3s;
}

.dash-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.3);
}

.dash-card h3 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0;
}

.dash-card p {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0;
    background: linear-gradient(to right, white, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}