body {
    margin: 0;
    font-family: 'Rubik', sans-serif;
    direction: rtl;
    overflow-x: hidden;
}

/* Header */
.header {
    background-color: #8B0000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-family: 'Rubik', sans-serif;
}
.header h1 {
    margin: 0;
    font-size: 2rem;
}
.menu-icon, .back-icon {
    cursor: pointer;
    font-size: 24px;
}
.back-icon i {
    color: white;
}

/* Sidebar */
.sidebar {
    height: 100%;
    width: 250px;
    position: fixed;
    top: 0;
    right: -250px;
    background-color: #f0f0f0;
    overflow-x: hidden;
    transition: right 0.3s ease;
    padding-top: 60px;
    z-index: 1000;
}
.sidebar a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 18px;
    color: black;
    display: block;
    transition: 0.3s;
}
.sidebar a:hover {
    background-color: #ddd;
}
.sidebar .closebtn {
    position: absolute;
    top: 0;
    left: 25px;
    font-size: 36px;
    margin-left: 50px;
}

/* Backdrop */
.backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
}

/* Main content */
#main {
    padding: 16px;
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.dot {
    width: 10px;
    height: 10px;
    background-color: #8B0000;
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 1.4s infinite ease-in-out both;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.text-center {
    text-align: center;
}

/* Form */
.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Cards */
.card {
    margin-top: 20px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}
.card-body {
    padding: 20px;
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}
.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    padding: 4px 8px;
    font-size: 0.9rem;
}
.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Alerts */
.alert-light {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}
.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.alert-link {
    color: #721c24;
}

/* Tooltip (Tippy.js) */
.tippy-box[data-theme='light'] {
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    color: #000;
}
.tippy-box[data-theme='light'] img {
    display: block;
    margin: 5px;
    border-radius: 4px;
}

/* Bootstrap Table */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.table thead th {
    background-color: #8B0000;
    color: white;
    font-weight: 700;
    text-align: right;
}
.table tbody tr:hover {
    background-color: #f1f1f1;
}
.table td, .table th {
    padding: 12px;
    vertical-align: middle;
    border-color: #dee2e6;
}
.table .image-link {
    color: #007bff;
    text-decoration: none;
}
.table .image-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    transform: translateX(30px); 
}
.pagination .page-link {
    color: #8B0000;
    border-radius: 12px;
    margin: 0 5px;
    padding: 8px 12px;
}
.pagination .page-item.active .page-link {
    background-color: #8B0000;
    border-color: #8B0000;
    color: white;
}
.pagination .page-item.disabled .page-link {
    color: #6c757d;
}
.pagination .page-item.first-last .page-link {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-weight: normal;
    margin: 0 10px;
}
.pagination .page-item.first-last .page-link:hover {
    background-color: #e9ecef;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    .header {
        padding: 8px 15px;
    }
    .sidebar {
        width: 200px;
        right: -200px;
    }
    #main {
        padding: 10px;
    }
    .container {
        padding: 10px;
    }
    .table {
        font-size: 0.9rem;
    }
    .table td, .table th {
        padding: 8px;
    }
    .form-control {
        font-size: 0.9rem;
    }
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    .pagination .page-item.first-last .page-link {
        margin: 0 8px;
    }
    .pagination {
        transform: translateX(20px); 
    }
    .btn-outline-secondary {
        padding: 3px 6px;
        font-size: 0.8rem;
    }
}

.dice-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 30px;
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s; 
}

.dice-icon:hover {
    transform: rotate(360deg);
}
