* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

h1 {
    font-size: 2.8rem;
}

.main-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.courses-section {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 15, 46, 0.7);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.pdf-section {
    flex: 2;
    min-width: 500px;
    background: rgba(0, 15, 46, 0.7);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00c6ff;
}

.course-list {
    list-style: none;
}

.course-item {
    background: rgba(0, 40, 85, 0.6);
    margin-bottom: 15px;
    padding: 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-item:hover, .course-item.active {
    background: rgba(0, 60, 120, 0.8);
    transform: translateX(5px);
}

.pdf-container {
    flex: 1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pdf-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 30, 60, 0.7);
    border-bottom: 1px solid rgba(0, 198, 255, 0.3);
}

.pdf-controls button {
    background: rgba(0, 150, 255, 0.7);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-controls button:hover {
    background: rgba(0, 180, 255, 0.9);
}

.pdf-viewer-container {
    flex: 1;
    position: relative;
    overflow: auto;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #333;
}

.no-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.protection-info {
    background: rgba(200, 0, 0, 0.2);
    border: 1px solid rgba(255, 50, 50, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* --- Fullscreen Styles --- */
.close-maximize {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

body.is-maximized {
    padding: 0;
    overflow: hidden;
}

body.is-maximized .container {
    max-width: 100%;
    height: 100vh;
    padding: 0;
}

body.is-maximized header,
body.is-maximized .courses-section,
body.is-maximized footer,
body.is-maximized .protection-info,
body.is-maximized .section-title {
    display: none;
}

body.is-maximized .pdf-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    padding: 0;
    border-radius: 0;
}

body.is-maximized .pdf-container {
    border-radius: 0;
}

body.is-maximized .close-maximize {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Protection (General overlay, for random elements) */
.content-protection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

/* Access Blocked Page */
.access-blocked {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    display: none; /* Initially hidden */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    text-align: center;
    padding: 20px;
}

.block-icon {
    font-size: 5rem;
    color: #ff4d4d;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.block-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ff9999;
}

.block-message {
    font-size: 1.3rem;
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.block-button {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

.block-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 65, 108, 0.6);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    color: #333;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.tab-container {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    background-color: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    flex-grow: 1;
    text-align: center;
}

.tab-button:hover {
    background-color: #ddd;
}

.tab-button.active {
    background-color: #ccc;
    border-bottom: 3px solid #00c6ff;
}

.tab-content {
    display: none;
    padding: 6px 12px;
    border-top: none;
}

.tab-content.active {
    display: block;
}

.modal-form-group {
    margin-bottom: 15px;
}

.modal-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.modal-submit-button {
    background-color: #00c6ff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s ease;
}

.modal-submit-button:hover {
    background-color: #0099cc;
}

.view-question-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: auto;
    font-size: 0.9rem;
}

.view-question-button:hover {
    background-color: #0056b3;
}

/* ================= Anti-Screenshot Moving Shapes ================= */
.anti-screenshot-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000; /* بالاتر از همه عناصر به جز مودال و صفحه قفل */
    overflow: hidden;
}

.anti-screenshot-shape {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 10000;
}

/* انیمیشن‌های حرکت */
@keyframes float0 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(100px, 50px); }
    50% { transform: translate(50px, 100px); }
    75% { transform: translate(-100px, 50px); }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(150px, -100px) rotate(180deg); }
}

@keyframes float2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(300px); }
}

/* انواع اشکال */
.anti-screenshot-shape:nth-child(3n) {
    border-radius: 50%;
    background: rgba(01, 180, 255, 0.8);
}

.anti-screenshot-shape:nth-child(3n+1) {
    border-radius: 50%;
    background: rgba(01, 180, 255, 0.8);
}

.anti-screenshot-shape:nth-child(3n+2) {
    border-radius: 50%;
    background: rgba(01, 180, 255, 0.8);
}


/* Styles for Device Manager Panel */

.simple-button {
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.simple-button:hover {
    background-color: rgba(0, 100, 220, 1);
}

.device-list-container {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.device-info .this-device-tag {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.remove-device-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.remove-device-btn:hover {
    background-color: #c82333;
}

.remove-device-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
/* Welcome Message Style */
.welcome-message {
    color: #00e1ff;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    height: 22px; /* اختصاص فضا برای جلوگیری از پرش صفحه */
    text-shadow: 0 0 5px rgba(0, 225, 255, 0.5);
    text-align: center;
}

/* User Actions Container in Footer */
.user-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.user-actions .logout-btn {
    background-color: rgba(220, 53, 69, 0.8);
}

.user-actions .logout-btn:hover {
    background-color: rgba(200, 35, 50, 1);
}
/* Custom Alert/Toast Styles */
.custom-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 100001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, top 0.3s, visibility 0.3s;
    font-size: 1.1rem;
}

.custom-toast.show {
    top: 50px;
    opacity: 1;
    visibility: visible;
}

.custom-toast.error {
    background-color: #dc3545;
}

.custom-toast.success {
    background-color: #28a745;
}
/* ===== 1. Developer Link Styles ===== */

.developer-link {
    color: #ffeb3b !important; /* رنگ زرد طلایی برای تضاد بهتر */
    text-decoration: none; /* حذف خط زیر لینک */
    font-weight: bold; /* پررنگ کردن متن */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* سایه متن برای خوانایی */
    padding: 5px 10px; /* ایجاد کمی فاصله داخلی */
    border-radius: 5px; /* گرد کردن گوشه‌ها */
    transition: all 0.3s ease; /* انیمیشن نرم برای تغییرات */
}

.developer-link:hover {
    color: #ffffff !important; /* تغییر رنگ متن به سفید هنگام هاور */
    background-color: rgba(255, 235, 59, 0.2); /* پس‌زمینه نیمه‌شفاف زرد */
    transform: translateY(-2px); /* کمی حرکت به بالا */
}


/* ===== 2. Responsive Design for Mobile Devices ===== */
/* این قوانین زمانی اعمال می‌شوند که عرض صفحه نمایش 768 پیکسل یا کمتر باشد */

@media (max-width: 768px) {
    body {
        padding: 10px; /* کاهش فاصله از اطراف در موبایل */
    }

    h1 {
        font-size: 2rem; /* کوچک کردن عنوان اصلی */
    }

    .main-content {
        flex-direction: column; /* بخش لیست دروس و نمایش PDF زیر هم قرار می‌گیرند */
        gap: 20px;
    }

    .courses-section,
    .pdf-section {
        min-width: 100%; /* عرض کامل صفحه را اشغال می‌کنند */
        padding: 15px;
    }

    .section-title {
        font-size: 1.5rem; /* کوچک کردن عناوین بخش‌ها */
    }

    .course-item {
        padding: 15px;
        flex-wrap: wrap; /* اجازه شکستن خط در آیتم‌های دروس */
    }

    .view-question-button {
        margin-top: 10px;
        width: 100%; /* دکمه مشاهده تمام عرض را بگیرد */
        text-align: center;
    }

    .modal-content {
        width: 95%; /* مودال‌ها کمی پهن‌تر شوند تا بهتر دیده شوند */
    }

    .protection-info h4 {
        font-size: 0.9rem; /* کوچک کردن متن اخطار */
    }
}

/* Payment Modal Styles */
.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 1.3rem;
    direction: ltr;
    border: 2px dashed #adb5bd;
}

.card-info button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}
/* Unique Price Style */
.unique-price {
    color: #dc3545;
    font-size: 1.5rem;
    background-color: #fff3cd;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ffeeba;
}
/* ===== Advanced & Secure Watermark Styles ===== */

.watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.watermark-text {
    position: absolute;
    /* اندازه فونت واکنش‌گرا: ۲.۵٪ از عرض صفحه نمایش */
    font-size: 2.5vw; 
    font-weight: 600; /* کمی ضخیم‌تر */
    color: rgba(255,255,255, 1); /* رنگ سفید خالص */
    transform-origin: center center;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    /* افزایش کدری برای ناخوانا کردن اسکرین‌شات */
    opacity: 0.9; 
    /* افزودن سایه برای سخت‌تر کردن حذف واترمارک در نرم‌افزارهای ویرایش عکس */
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 
}

/* در صفحه‌های کوچک‌تر (موبایل)، فونت را کمی بزرگتر می‌کنیم تا خواناتر باشد */
@media (max-width: 768px) {
    .watermark-text {
        font-size: 4.5vw;
        opacity: 0.9; /* در موبایل کمی شفاف‌تر می‌کنیم تا مزاحم خواندن نباشد */
    }
}
/* New Styles for Filter & Search Interface */
.filter-section {
    width: 100%;
    background: rgba(0, 15, 46, 0.7);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}
.search-container { margin-bottom: 30px; }
.search-form { display: flex; gap: 10px; }
.search-form input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(0, 198, 255, 0.5);
    background-color: rgba(0, 30, 60, 0.7);
    color: white;
    font-size: 1.1rem;
    direction: ltr;
    text-align: center;
}
.search-form button {
    padding: 0 25px;
    border-radius: 8px;
    border: none;
    background-color: #00c6ff;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.filter-grid select {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 40, 85, 0.6);
    color: white;
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
}
.filter-grid select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.result-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}
.resource-result {
    flex-grow: 1;
    background-color: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
}
.view-resource-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.view-resource-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
/* Login Button Container */
.login-btn-container {
    position: absolute;
    top: 20px;
    left: 20px;
}
.simple-button.login-btn {
    background-color: #007bff;
    padding: 10px 20px;
}
.simple-button.login-btn:hover {
    background-color: #0056b3;
}

/* Purchased Courses Modal */
.purchased-list-container {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}
.purchased-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    border-right: 5px solid #007bff;
}
.purchased-item-info {
    font-size: 1.1rem;
}
.purchased-item-info small {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
}
.view-purchased-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* =================================================== */
/* بخش جدید: بهبودهای ریسپانسیو برای موبایل      */
/* =================================================== */

/* این قوانین زمانی اعمال می‌شوند که عرض صفحه نمایش ۷۶۸ پیکسل یا کمتر باشد */
@media (max-width: 768px) {

    /* کاهش فاصله کلی صفحه در موبایل */
    body {
        padding: 10px;
    }

    /* کوچک کردن عنوان اصلی */
    h1 {
        font-size: 1.8rem;
        line-height: 1.4;
    }

    /* مدیریت هدر و دکمه ورود */
    header {
        position: relative;
        padding-bottom: 15px;
    }

    .login-btn-container {
        position: static; /* حذف حالت شناور */
        margin-bottom: 15px;
        text-align: center;
    }
    
    .welcome-container {
        flex-direction: column; /* عناصر زیر هم قرار می‌گیرند */
        gap: 10px;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }

    /* اصلاح چیدمان بخش جستجو */
    .search-form {
        flex-direction: column; /* فیلد جستجو و دکمه زیر هم قرار می‌گیرند */
        align-items: stretch; /* تمام عرض را اشغال می‌کنند */
    }

    .search-form button {
        padding: 12px;
    }

    /* اصلاح چیدمان منوهای کشویی */
    .filter-grid {
        /* در موبایل، همیشه یک ستون نمایش داده می‌شود */
        grid-template-columns: 1fr; 
    }

    /* اصلاح چیدمان بخش نتیجه */
    .result-container {
        flex-direction: column;
        align-items: stretch;
    }

    .view-resource-btn {
        width: 100%;
        text-align: center;
    }
    
    /* اصلاح چیدمان مودال‌ها */
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}
/* ===== Device Warning Box Styles ===== */

.device-warning {
    display: flex;
    align-items: flex-start; /* آیکون و متن از بالا تراز شوند */
    gap: 10px;
    background-color: #fff3cd; /* رنگ زرد هشدار */
    color: #664d03; /* رنگ متن تیره برای خوانایی */
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px; /* فاصله از فرم ورود */
    font-size: 0.9rem;
    line-height: 1.6;
}

.device-warning i {
    font-size: 1.5rem;
    margin-top: 3px;
    color: #856404;
}
/* ===== Attendance Button Styles ===== */
.attendance-btn {
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.attendance-btn:hover {
    background: linear-gradient(45deg, #218838, #1e7e34);
    transform: translateY(-2px);
}

/* محل ثابت گوشه صفحه (اختیاری) */
.attendance-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .attendance-btn {
        width: 100%;
        font-size: 1.1rem;
        padding: 15px;
    }
    .simple-button.logout-btn {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.6), rgba(200, 35, 50, 0.6)) !important;
}
    .attendance-fixed {
        position: static; /* در موبایل به صورت عادی در جریان صفحه */
        margin-top: 15px;
    }
}
/* Add to your CSS file */
.header-top-bar {
    width: 100%;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
}

.button-group {
    display: flex;
    gap: 12px;
    background: rgba(0, 30, 60, 0.4);
    padding: 8px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.simple-button {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.simple-button.login-btn {
    background: linear-gradient(135deg, #1a5276, #2980b9);
    padding: 10px 24px;
}

.simple-button.attendance-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    padding: 10px 20px;
}

.simple-button i {
    transition: transform 0.3s ease;
}

.simple-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.simple-button:hover i {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        border-radius: 15px;
        padding: 10px;
        gap: 8px;
        width: 100%;
    }
    
    .simple-button {
        justify-content: center;
        width: 100%;
    }
}
/* بخش جدید برای تنظیمات مخصوص موبایل */
/* Update existing mobile styles */
@media (max-width: 768px) {
   .header-top-bar {
        display: flex;
        justify-content: center;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .header-actions {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .button-group {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        padding: 8px;
        gap: 8px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        align-items: center; /* Center buttons horizontally */
    }
    
    .simple-button {
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(5px);
        padding: 12px 20px;
        transition: all 0.3s ease;
        width: 100%; /* Full width within container */
        max-width: 280px; /* Limit maximum width */
        text-align: center;
        display: flex;
        justify-content: center; /* Center button content */
    }
    
    .simple-button.login-btn {
        background: linear-gradient(135deg, rgba(26, 82, 118, 0.6), rgba(41, 128, 185, 0.6)) !important;
    }
    
    .simple-button.attendance-btn {
        background: linear-gradient(135deg, rgba(39, 174, 96, 0.6), rgba(46, 204, 113, 0.6)) !important;
    }
    
    .simple-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
    }

.simple-button.device-manager-btn {
    background: linear-gradient(135deg, rgba(160, 80, 200, 0.6), rgba(120, 60, 160, 0.6)) !important;
}

.simple-button.purchased-btn {
    background: linear-gradient(135deg, rgba(46, 134, 193, 0.6), rgba(52, 152, 219, 0.6)) !important;
}
/* داخل بلاک @media (max-width: 768px) */
.simple-button.logout-btn {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.6), rgba(200, 35, 50, 0.6)) !important;
}

}
/* استایل گالری شبیه‌سازی‌ها (اضافه‌شده جدید) */
/* استایل گالری شبیه‌سازی‌ها (اضافه‌شده جدید) */
/* استایل گالری شبیه‌سازی‌ها (اصلاح شده) */
.simulation-gallery {
    width: 100%;
    max-width: 1000px; /* کاهش حداکثر عرض برای نمایش بهتر ۳ ستون */
    margin-left: auto;
    margin-right: auto;
    background: rgba(0, 15, 46, 0.7);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* نمایش ۳ ستون با عرض یکسان */
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.gallery-item {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    /* نسبت ابعاد برای تصاویر مربعی (اختیاری) */
    aspect-ratio: 1 / 1; 
    object-fit: cover;
}

/* برای موبایل و تبلت، چیدمان را به ۱ ستون تغییر دهید */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
/* لوگوی وبسایت */
.logo-link {
    position: absolute;
    top: 23px;
    right: 40px;
    z-index: 100;
}

.website-logo {
    width: 150px; /* یا هر ابعاد مناسب دیگری */
    height: auto;
    transition: transform 0.3s ease;
}

.website-logo:hover {
    transform: scale(1.05);
}

/* اصلاحات برای موبایل */
@media (max-width: 768px) {
    /* جایگزین استایل قبلی .logo-link */
    .logo-link {
        position: absolute;
        top: 177px;
        right: 0px;
        z-index: 100;
    }

    .website-logo {
        width: 55px; /* ابعاد لوگو را به دلخواه تنظیم کنید */
        height: auto;
    }
}