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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    background: #0b0b0b;
    transition: background 0.3s;
}

.phone-container {
    width: 375px;
    height: 812px;
    background-image: url('https://i.ibb.co/XxyKvdb8/iq.jpg') !important;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-radius: 38px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 2px rgba(183,28,28,0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: floatIn 0.8s cubic-bezier(0.16,1,0.3,1) both;
    transition: all 0.3s ease;
}

.phone-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.60);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
}
.phone-container > * {
    position: relative;
    z-index: 1;
}

@keyframes floatIn {
    0% { opacity:0; transform:scale(0.95) translateY(24px); }
    100% { opacity:1; transform:scale(1) translateY(0); }
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 12px;
    background: rgba(0,0,0,0.40) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(183,28,28,0.30);
    position: relative;
    z-index: 20;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.menu-btn {
    background: rgba(183,28,28,0.25);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.menu-btn:hover {
    background: rgba(183,28,28,0.45);
    transform: scale(1.04);
}
.logo-badge {
    background: #b71c1c;
    color: #fff;
    padding: 6px 16px 6px 18px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(183,28,28,0.40);
    letter-spacing: 0.3px;
}
.header-icons {
    display: flex;
    gap: 16px;
    font-size: 18px;
    color: #f0f0f0;
}
.header-icons i {
    transition: transform 0.25s ease, color 0.25s ease;
    cursor: pointer;
}
.header-icons i:hover {
    transform: scale(1.1) translateY(-2px);
    color: #b71c1c;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 100px;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}
.main-content::-webkit-scrollbar {
    width: 3px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: rgba(183,28,28,0.40);
    border-radius: 10px;
}

.section-header {
    margin-bottom: 14px;
    text-align: center;
}
.section-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #f0f0f0;
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.image-slider-banner {
    position: relative;
    width: 100%;
    height: 130px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 18px;
    background: rgba(0,0,0,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.slider-slide {
    min-width: 100%;
    height: 100%;
}
.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s, transform 0.2s;
}
.slider-btn:hover {
    background: rgba(183,28,28,0.8);
    transform: translateY(-50%) scale(1.05);
}
.slider-btn.prev { left: 8px; }
.slider-btn.next { right: 8px; }

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.slider-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
    cursor: pointer;
}
.slider-dots span.active {
    background: #b71c1c;
    width: 16px;
    border-radius: 6px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    flex: 1;
    align-content: start;
}
.menu-card {
    background: rgba(0,0,0,0.55) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    border: 1px solid rgba(183,28,28,0.25);
    padding: 22px 8px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-decoration: none;
    color: #f0f0f0;
}
.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(183,28,28,0.40);
    border-color: #b71c1c;
}
.menu-card i {
    font-size: 40px;
    color: #b71c1c;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.menu-card:hover i {
    color: #fff;
}
.menu-card .menu-label {
    font-size: 17px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    color: #f0f0f0;
}

.sidebar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.40);
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    border-radius: 38px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: rgba(0,0,0,0.70) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), background 0.4s ease;
    box-shadow: -8px 0 30px rgba(0,0,0,0.6);
    border-radius: 38px 0 0 38px;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    border-left: 1px solid rgba(183,28,28,0.20);
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(183,28,28,0.20);
}
.sidebar-header h2 {
    font-size: 20px;
    color: #f0f0f0;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
}
.close-sidebar {
    background: rgba(183,28,28,0.20);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 18px;
    color: #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.25s ease;
}
.close-sidebar:hover {
    background: rgba(183,28,28,0.40);
    transform: rotate(90deg);
}
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.sidebar-menu li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #f0f0f0;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.25s ease, transform 0.2s ease;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}
.sidebar-menu li i {
    width: 24px;
    font-size: 20px;
    color: #b71c1c;
    transition: color 0.25s ease;
}
.sidebar-menu li:hover {
    background: rgba(183,28,28,0.20);
    transform: translateX(-4px);
}
.sidebar-menu li:hover i {
    color: #fff;
}
.sidebar-menu li a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.sidebar-footer {
    border-top: 1px solid rgba(183,28,28,0.15);
    padding-top: 16px;
    font-size: 13px;
    color: #aaaaaa;
    font-family: 'Tajawal', sans-serif;
}
.sidebar-footer .version {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: rgba(0,0,0,0.40) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(183,28,28,0.25);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 10;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #aaaaaa;
    cursor: pointer;
    flex: 1;
    height: 100%;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    transition: color 0.3s ease;
}
.nav-item:hover {
    color: #b71c1c;
}
.nav-item.active {
    color: #b71c1c;
    font-weight: 700;
}
.nav-item i {
    font-size: 22px;
}

.toast {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #b71c1c;
    color: #fff;
    padding: 10px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    box-shadow: 0 8px 24px rgba(183,28,28,0.40);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 50;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 420px) {
    body {
        background: #000 !important;
        padding: 0;
        align-items: stretch;
    }
    .phone-container {
        width: 100%;
        height: 100vh;
        border-radius: 0 !important;
        box-shadow: none !important;
        animation: none;
    }
    .phone-container::before {
        border-radius: 0 !important;
    }
    .sidebar {
        border-radius: 0 !important;
    }
    .sidebar-overlay {
        border-radius: 0 !important;
    }
    .slider-btn {
        padding: 4px 8px;
        font-size: 14px;
    }
    .image-slider-banner {
        height: 110px;
    }
}

@media (min-width: 1025px) {
    body {
        background: radial-gradient(circle at center, #1a1a2e, #0f0f1a);
        padding: 40px 20px;
    }
    .phone-container {
        width: 400px;
        height: 850px;
        border-radius: 48px;
        box-shadow: 0 30px 80px rgba(0,0,0,0.9), 0 0 0 3px rgba(183,28,28,0.3), 0 0 60px rgba(183,28,28,0.1);
        transition: transform 0.3s ease;
    }
    .phone-container:hover {
        transform: scale(1.02);
    }
    .sidebar {
        border-radius: 48px 0 0 48px !important;
    }
    .sidebar-overlay {
        border-radius: 48px !important;
    }
    .image-slider-banner {
        height: 150px;
    }
    .menu-card i {
        font-size: 46px;
    }
    .menu-card .menu-label {
        font-size: 18px;
    }
}

.mods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 4px 0;
}
.loading-spinner, .no-mods, .error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #f0f0f0;
    font-size: 18px;
    padding: 40px 0;
    font-family: 'Tajawal', sans-serif;
}
.loading-spinner i {
    margin-left: 10px;
}
.mod-card {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(183,28,28,0.25);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.mod-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(183,28,28,0.35);
    border-color: #b71c1c;
}
.mod-image {
    width: 100%;
    height: 140px;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.mod-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mod-image i {
    font-size: 48px;
    color: #b71c1c;
}
.mod-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.mod-name {
    font-size: 16px;
    font-weight: 700;
    color: #f0f0f0;
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mod-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #cccccc;
    font-family: 'Tajawal', sans-serif;
    flex-wrap: wrap;
    gap: 4px;
}
.mod-version i, .mod-stats i {
    margin-left: 4px;
    color: #b71c1c;
}
.mod-stats {
    display: flex;
    gap: 8px;
}
.mod-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #b71c1c;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    margin-top: 6px;
    width: 100%;
}
.mod-download-btn:hover {
    background: #8f1414;
    transform: scale(1.02);
}
.mod-download-btn i {
    font-size: 14px;
}

@media (max-width: 420px) {
    .mods-grid {
        gap: 12px;
    }
    .mod-image {
        height: 110px;
    }
    .mod-name {
        font-size: 14px;
    }
    .mod-meta {
        font-size: 11px;
    }
    .mod-download-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}
@media (min-width: 1025px) {
    .mods-grid {
        gap: 20px;
    }
    .mod-image {
        height: 160px;
    }
    .mod-name {
        font-size: 18px;
    }
    .mod-meta {
        font-size: 13px;
	}

@media (min-width: 421px) and (max-width: 1024px) {
    body {
        background: #111;
        padding: 20px;
    }
    .phone-container {
        width: 100%;
        max-width: 420px;
        height: 90vh;
        border-radius: 38px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    }
}