@import url('https://fonts.cdnfonts.com/css/minecraft-4');

/* ===== تصميم عام ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Minecraft', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== حاوية عامة ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== العناوين ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Minecraft', sans-serif;
    color: #55ff55;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #005500;
}

h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

/* ===== الفقرات والنصوص ===== */
p {
    margin-bottom: 15px;
    font-family: 'Minecraft', sans-serif;
    line-height: 1.6;
}

a {
    color: #55ff55;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #7dff7d;
    text-decoration: underline;
}

/* ===== القوائم ===== */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
}

/* ===== حدود البيكسل ===== */
.pixel-border {
    --border-size: 4px;
    --border-color: #4f4f4f;
    position: relative;
    border: var(--border-size) solid var(--border-color);
    margin: 10px;
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--border-size));
    left: calc(-1 * var(--border-size));
    height: calc(100% + var(--border-size) * 2);
    width: calc(100% + var(--border-size) * 2);
    background: transparent;
    border: var(--border-size) solid #292929;
    z-index: -1;
}

/* ===== الأزرار ===== */
.mc-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #55ff55;
    color: #000000;
    border: none;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    margin: 5px;
}

.mc-button:hover {
    background-color: #7dff7d;
    transform: scale(1.05);
}

.mc-button:active {
    transform: scale(0.95);
}

.mc-button.secondary {
    background-color: #5555ff;
    color: #ffffff;
}

.mc-button.secondary:hover {
    background-color: #7d7dff;
}

.mc-button.danger {
    background-color: #ff5555;
    color: #ffffff;
}

.mc-button.danger:hover {
    background-color: #ff7d7d;
}

/* ===== حقول الإدخال ===== */
.mc-input {
    width: 100%;
    padding: 12px 15px;
    background-color: #333333;
    border: 3px solid #555555;
    color: #ffffff;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 15px;
}

.mc-input:focus {
    outline: none;
    border-color: #55ff55;
    box-shadow: 0 0 15px rgba(85, 255, 85, 0.3);
}

.mc-input::placeholder {
    color: #777777;
}

/* ===== مجموعة الإدخال ===== */
.mc-input-group {
    position: relative;
    margin-bottom: 20px;
}

.mc-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaaaaa;
    font-size: 14px;
}

/* ===== القائمة المنسدلة ===== */
.mc-select {
    width: 100%;
    padding: 12px 15px;
    background-color: #333333;
    border: 3px solid #555555;
    color: #ffffff;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    appearance: none;
    position: relative;
    cursor: pointer;
    margin-bottom: 15px;
}

.mc-select:focus {
    outline: none;
    border-color: #55ff55;
    box-shadow: 0 0 15px rgba(85, 255, 85, 0.3);
}

.mc-select-wrapper {
    position: relative;
}

.mc-select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #55ff55;
    pointer-events: none;
}

/* ===== خانات الاختيار ===== */
.mc-checkbox {
    display: none;
}

.mc-checkbox + label {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    margin-bottom: 10px;
    display: inline-block;
}

.mc-checkbox + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #333333;
    border: 2px solid #555555;
}

.mc-checkbox:checked + label:before {
    background-color: #55ff55;
    border-color: #55ff55;
}

.mc-checkbox:checked + label:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: -2px;
    color: #000000;
    font-size: 16px;
}

/* ===== أزرار الراديو ===== */
.mc-radio {
    display: none;
}

.mc-radio + label {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    margin-bottom: 10px;
    display: inline-block;
}

.mc-radio + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #333333;
    border: 2px solid #555555;
    border-radius: 50%;
}

.mc-radio:checked + label:before {
    background-color: #333333;
    border-color: #55ff55;
}

.mc-radio:checked + label:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    width: 12px;
    height: 12px;
    background-color: #55ff55;
    border-radius: 50%;
}

/* ===== الجداول ===== */
.mc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 25px;
}

.mc-table th, 
.mc-table td {
    padding: 12px 15px;
    text-align: left;
    border: 2px solid #555555;
}

.mc-table th {
    background-color: #2a2a2a;
    color: #55ff55;
    font-weight: normal;
    text-transform: uppercase;
}

.mc-table tr {
    background-color: #333333;
    transition: all 0.3s ease;
}

.mc-table tr:hover {
    background-color: #3a3a3a;
}

.mc-table tr:nth-child(even) {
    background-color: #2f2f2f;
}

/* ===== البطاقات ===== */
.mc-card {
    background-color: #2a2a2a;
    border: 4px solid #555555;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #55ff55;
}

.mc-card-header {
    margin: -20px -20px 15px -20px;
    padding: 15px 20px;
    background-color: #333333;
    color: #55ff55;
    font-size: 18px;
}

.mc-card-footer {
    margin: 15px -20px -20px -20px;
    padding: 15px 20px;
    background-color: #333333;
    font-size: 14px;
    color: #aaaaaa;
}

/* ===== عناصر التنقل ===== */
.mc-navbar {
    background-color: #2a2a2a;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    border-bottom: 4px solid #555555;
}

.mc-navbar-brand {
    font-size: 24px;
    color: #55ff55;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.mc-navbar-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mc-navbar-items li {
    margin: 0 10px;
}

.mc-navbar-items a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.mc-navbar-items a:hover {
    color: #55ff55;
    text-decoration: none;
}

.mc-navbar-items a.active {
    color: #55ff55;
    border-bottom: 2px solid #55ff55;
}

/* ===== القائمة المنسدلة في التنقل ===== */
.mc-dropdown {
    position: relative;
}

.mc-dropdown-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

.mc-dropdown-btn:after {
    content: '▼';
    margin-left: 5px;
    font-size: 10px;
}

.mc-dropdown-btn:hover {
    color: #55ff55;
}

.mc-dropdown-content {
    display: none;
    position: absolute;
    background-color: #2a2a2a;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 1;
    border: 3px solid #555555;
}

.mc-dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.mc-dropdown-content a:hover {
    background-color: #333333;
    color: #55ff55;
}

.mc-dropdown:hover .mc-dropdown-content {
    display: block;
}

/* ===== التبويبات ===== */
.mc-tabs {
    margin-bottom: 20px;
}

.mc-tab-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 3px solid #555555;
}

.mc-tab-link {
    padding: 10px 15px;
    background-color: #2a2a2a;
    color: #aaaaaa;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
    border-right: 3px solid #555555;
}

.mc-tab-link:first-child {
    border-left: 3px solid #555555;
}

.mc-tab-link:hover {
    color: #ffffff;
}

.mc-tab-link.active {
    background-color: #333333;
    color: #55ff55;
    border-top-color: #55ff55;
}

.mc-tab-content {
    padding: 20px;
    background-color: #333333;
    border: 3px solid #555555;
    border-top: none;
}

.mc-tab-pane {
    display: none;
}

.mc-tab-pane.active {
    display: block;
}

/* ===== الرسائل التنبيهية ===== */
.mc-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 3px solid transparent;
    position: relative;
    animation: fadeIn 0.5s;
}

.mc-alert-success {
    background-color: rgba(85, 255, 85, 0.1);
    border-color: #55ff55;
    color: #55ff55;
}

.mc-alert-info {
    background-color: rgba(85, 85, 255, 0.1);
    border-color: #5555ff;
    color: #aaaaff;
}

.mc-alert-warning {
    background-color: rgba(255, 255, 85, 0.1);
    border-color: #ffff55;
    color: #ffff55;
}

.mc-alert-danger {
    background-color: rgba(255, 85, 85, 0.1);
    border-color: #ff5555;
    color: #ff5555;
}

.mc-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: inherit;
}

/* ===== شريط التقدم ===== */
.mc-progress {
    height: 20px;
    background-color: #333333;
    border: 3px solid #555555;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.mc-progress-bar {
    height: 100%;
    background-color: #55ff55;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.5s ease;
}

.mc-progress-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    z-index: 1;
}

/* ===== نموذج البحث ===== */
.mc-search-form {
    display: flex;
    margin-bottom: 20px;
}

.mc-search-input {
    flex: 1;
    padding: 12px 15px;
    background-color: #333333;
    border: 3px solid #555555;
    color: #ffffff;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
}

.mc-search-button {
    padding: 12px 20px;
    background-color: #55ff55;
    color: #000000;
    border: none;
    font-family: 'Minecraft', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mc-search-button:hover {
    background-color: #7dff7d;
}

/* ===== معرض الصور ===== */
.mc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mc-gallery-item {
    position: relative;
    overflow: hidden;
    border: 3px solid #555555;
    transition: all 0.3s ease;
}

.mc-gallery-item:hover {
    transform: scale(1.03);
    border-color: #55ff55;
    z-index: 2;
}

.mc-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.mc-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.mc-gallery-item:hover .mc-gallery-caption {
    transform: translateY(0);
}

/* ===== التذييل ===== */
.mc-footer {
    background-color: #2a2a2a;
    padding: 30px 20px;
    text-align: center;
    border-top: 4px solid #555555;
    margin-top: 50px;
}

.mc-footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.mc-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mc-footer-links a {
    color: #aaaaaa;
    margin: 0 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mc-footer-links a:hover {
    color: #55ff55;
}

.mc-footer-copyright {
    color: #777777;
    font-size: 14px;
}

/* ===== مودال ===== */
.mc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.mc-modal.active {
    display: flex;
}

.mc-modal-content {
    background-color: #2a2a2a;
    border: 4px solid #555555;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideDown 0.3s;
}

.mc-modal-header {
    padding: 15px 20px;
    background-color: #333333;
    color: #55ff55;
    font-size: 18px;
    border-bottom: 3px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mc-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #aaaaaa;
    transition: all 0.3s ease;
}

.mc-modal-close:hover {
    color: #ff5555;
}

.mc-modal-body {
    padding: 20px;
}

.mc-modal-footer {
    padding: 15px 20px;
    background-color: #333333;
    border-top: 3px solid #555555;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== التوستر (الإشعارات المؤقتة) ===== */
.mc-toaster {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.mc-toast {
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #2a2a2a;
    border-left: 4px solid #55ff55;
    color: #ffffff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 300px;
    animation: toastSlideIn 0.3s, toastFadeOut 0.3s 5s forwards;
}

.mc-toast.success {
    border-left-color: #55ff55;
}

.mc-toast.info {
    border-left-color: #5555ff;
}

.mc-toast.warning {
    border-left-color: #ffff55;
}

.mc-toast.error {
    border-left-color: #ff5555;
}

.mc-toast-close {
    cursor: pointer;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== المؤشرات (الدوارة) ===== */
.mc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(85, 255, 85, 0.3);
    border-radius: 50%;
    border-top-color: #55ff55;
    animation: spin 1s infinite linear;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== التوليميحات ===== */
.mc-tooltip {
    position: relative;
    display: inline-block;
}

.mc-tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #2a2a2a;
    color: #ffffff;
    text-align: center;
    padding: 8px;
    border: 2px solid #555555;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.mc-tooltip:hover .mc-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== شرائح العرض ===== */
.mc-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid #555555;
}

.mc-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.mc-slide {
    min-width: 100%;
    position: relative;
}

.mc-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.mc-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.mc-slider-nav {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.mc-slider-prev,
.mc-slider-next {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: 2px solid #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mc-slider-prev:hover,
.mc-slider-next:hover {
    background-color: rgba(85, 255, 85, 0.3);
    border-color: #55ff55;
}

/* ===== ترقيم الصفحات ===== */
.mc-pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.mc-page-item {
    margin: 0 5px;
}

.mc-page-link {
    display: block;
    padding: 8px 15px;
    background-color: #2a2a2a;
    border: 2px solid #555555;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mc-page-link:hover {
    background-color: #333333;
    border-color: #55ff55;
    color: #55ff55;
}

.mc-page-link.active {
    background-color: #55ff55;
    border-color: #55ff55;
    color: #000000;
}

/* ===== الرسوم المتحركة ===== */
@keyframes pulse {
    0% { text-shadow: 2px 2px 0px #005500; }
    50% { text-shadow: 2px 2px 15px #55ff55; }
    100% { text-shadow: 2px 2px 0px #005500; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* ===== تصميم متجاوب ===== */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .mc-navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mc-navbar-items {
        margin-top: 15px;
        flex-direction: column;
        width: 100%;
    }
    
    .mc-navbar-items li {
        margin: 5px 0;
    }
    
    .mc-dropdown-content {
        position: static;
        box-shadow: none;
        border-left: 3px solid #55ff55;
        display: none;
    }
    
    .mc-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 { font-size: 30px; }
    h2 { font-size: 26px; }
    h3 { font-size: 22px; }
    
    .mc-card {
        padding: 15px;
    }
    
    .mc-tab-links {
        flex-direction: column;
    }
    
    .mc-tab-link {
        border: 3px solid #555555;
        margin-bottom: -3px;
    }
    
    .mc-search-form {
        flex-direction: column;
    }
    
    .mc-search-button {
        width: 100%;
        margin-top: 10px;
    }
    
    .mc-footer-links {
        flex-direction: column;
    }
    
    .mc-footer-links a {
        margin: 5px 0;
    }
    
    .mc-toast {
        width: calc(100% - 40px);
    }
}

@media (max-width: 576px) {
    .mc-input-group {
        flex-direction: column;
    }
    
    .mc-table {
        display: block;
        overflow-x: auto;
    }
    
    .mc-modal-content {
        width: 95%;
    }
    
    .mc-gallery {
        grid-template-columns: 1fr;
    }
}