﻿/* =======================================================
   1. GLOBAL RESET & BASE STYLES
   ======================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* الحاوية الأساسية للصفحة */
body {
    background-color: #0b0b0e;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* هذا السطر يضع كل شيء في المنتصف أفقياً */
    margin: 0;
    padding-top: 60px; /* مسافة من الأعلى */
    position: relative;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center; /* يضمن توسيط الصندوق والأدوات */
    padding: 0 20px;
}

/* لتوسيط بطاقة التحميل عمودياً وأفقياً في المساحة المتبقية */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* تثبيت عرض الشريط الجانبي */
.sidebar {
    width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tiktok-badge {
    width: 48px;
    height: 48px;
    background: #fe2c55;
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.brand-subtitle {
    font-size: 11px;
    color: #777;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.input-box input {
    width: 100%;
    padding: 16px 20px;
    background: #1b1b1f;
    border: 1px solid #2d2d33;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

    .input-box input:focus {
        border-color: #fe2c55;
    }

.tiktok-dl-btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(90deg, #fe2c55, #25f4ee);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 24px rgba(254, 44, 85, 0.3);
}

    .tiktok-dl-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(254, 44, 85, 0.45);
    }

/* =======================================================
   3. BOTTOM TOOLS SECTION & 4-COLUMNS GRID (تم التحديث هنا 🚀)
   ======================================================= */
.tools-section {
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

    .tools-section h2 {
        font-size: 20px;
        margin-bottom: 25px;
        color: #ffffff;
    }

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 أعمدة */
    gap: 20px;
    width: 100%;
}

/* تنسيق البطاقة الواحدة مطابق للصورة */
.card {
    background: #141416;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: white;
    border: 1px solid #222;
    border-bottom: 3px solid transparent; /* مساحة للخط الملون السفلي */
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
    }

    .card .icon {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .card h3 {
        font-size: 15px;
        margin: 0 0 10px 0;
    }

    .card p {
        font-size: 12px;
        color: #888;
        margin: 0;
        line-height: 1.4;
    }

/* الألوان السفلية للبطاقات */
.image-card {
    border-bottom-color: #2cd573;
}
/* أخضر */
.mute-card {
    border-bottom-color: #ff4757;
}
/* أحمر */
.trim-card {
    border-bottom-color: #ffa502;
}
/* برتقالي */
.audio-card {
    border-bottom-color: #1e90ff;
}
/* أزرق */

/* Responsive adjustments */
@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* =======================================================
   4. MODERN TOP-RIGHT MENU & DROPDOWN
   ======================================================= */
.menu-container {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.modern-menu-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

    .modern-menu-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(254, 44, 85, 0.5);
        box-shadow: 0 0 15px rgba(254, 44, 85, 0.4), 0 0 25px rgba(37, 244, 238, 0.2);
        transform: translateY(-2px) scale(1.05);
    }

.grid-layout {
    width: 20px;
    height: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    transition: transform 0.4s ease;
}

.modern-menu-btn:hover .grid-layout {
    transform: rotate(45deg);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.dot-1 {
    background: #fe2c55;
}

.dot-2 {
    background: #ffffff;
}

.dot-3 {
    background: #ffffff;
}

.dot-4 {
    background: #25f4ee;
}

.modern-dropdown {
    display: none;
    position: absolute;
    top: 58px;
    right: 0;
    width: 230px;
    background: rgba(18, 18, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    animation: menuSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

    .modern-dropdown.show {
        display: block;
    }

@keyframes menuSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-header {
    font-size: 11px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 12px 4px;
    text-align: left;
}

.modern-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .modern-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.item-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
}

.item-text {
    display: flex;
    flex-direction: column;
}

.item-title {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.item-text small {
    color: #888;
    font-size: 11px;
}

/* =======================================================
   5. MODAL WINDOWS
   ======================================================= */
.tool-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    color: #fff;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}

    .close-btn:hover {
        color: #fff;
    }

.modal-content input {
    width: 100%;
    padding: 14px;
    margin: 20px 0;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
}

.action-btn {
    background: #fe2c55;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s ease;
}

    .action-btn:hover {
        opacity: 0.9;
    }

/* =======================================================
   6. FOOTER
   ======================================================= */
.site-footer {
    background-color: transparent;
    color: #777;
    text-align: center;
    padding: 30px 0 20px;
    margin-top: auto;
    font-size: 12px;
}

    .site-footer p {
        margin: 0 0 10px 0;
    }

.footer-links a {
    color: #888;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
}

    .footer-links a:hover {
        color: #25f4ee;
    }
