:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --font-main: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    direction: rtl; /* RTL Support */
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--card-border);
    box-shadow: var(--glass-shadow);
    animation: fadeInDown 1s ease-out;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: -webkit-linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

header p {
    color: var(--text-muted);
    font-size: 1.2em;
}

/* Search Bar */
.search-container {
    margin: 20px auto;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
    border-color: var(--primary-color);
}

/* Sections */
.section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--text-main);
    border-right: 5px solid var(--primary-color);
    padding-right: 15px;
    display: inline-block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(5px);
    border: var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.card:hover::before {
    transform: translateX(100%);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* Push links to bottom */
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #8e2de2);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Specific Section Styles */
.mediafire-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 87, 34, 0.1));
    border-color: #ff9800;
    grid-column: 1 / -1; /* Full width */
    text-align: center;
}

.contact-card {
   background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(18, 140, 126, 0.1));
   border-color: #25D366;
   grid-column: 1 / -1;
   text-align: center;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.5em;
    }
}
