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

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Cairo", sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-main: #0f172a;
    --bg-second: #1e293b;
    --primary: #60a5fa;
    --primary-hover: #2563eb;
    --border-top: aquamarine;
    --nav-bg: rgba(0, 0, 0, 0.4);
    --card: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.2);
    --text: white;
    --input-bg: white;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Body */
body {
    background: linear-gradient(135deg, var(--bg-main), var(--bg-second));
    color: var(--text);
    min-height: 100vh;
}

/* Navbar */
nav {
    backdrop-filter: blur(10px);
    background: var(--nav-bg);
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.text{
    margin-bottom: 50px;
}
.logo {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    white-space: nowrap;
    /* يمنع تخريب الناف */
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--primary);
    right: 0;
    bottom: -5px;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links button {
    background: var(--primary);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text);
    transition: 0.3s;
}

.nav-links button:hover {
    transform: scale(1.05);
    background: var(--primary-hover);
}

/* Content */
.content {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Title */
.text h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.text p {
    opacity: 0.8;
}

/* Input */
.inp {
    background: var(--input-bg);
    border-radius: 50px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    padding: 8px 15px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 10px 30px var(--shadow);
    transition: 0.3s;
}

.inp:focus-within {
    transform: scale(1.02);
}

#urlVideo:placeholder-shown~#clear {
    max-width: 0;
}

#urlVideo {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1em;
    background: transparent;
}

#clear {
    color: #333;
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
    max-width: 20px;
}

#clear:hover {
    transform: rotate(90deg);
}

/* Video Section */
.video {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: start;
}

#imageVid {
    position: relative;
    display: flex;
    width: 260px;
    height: 160px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#title {
    display: block;
    font-weight: bold;
    max-width: 260px;
    margin-top: 15px;
}

#iconDown {
    position: absolute;
    z-index: 1;
    margin: 10px;
    bottom: 0;
    width: 25px !important;
    height: 25px !important;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
}

#iconDown:hover {
    transform: scale(1.1);
}

#imageVid:hover>#iconDown {
    opacity: 1;
    visibility: visible;
}

#imageVid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Options */
.options {
    display: flex;
    gap: 20px;
}

.option {
    background: var(--card);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    max-height: 400px;
    overflow-y: scroll;
    transition: 0.3s;
}

.option::-webkit-scrollbar {
    display: none;
}

.option::-webkit-scrollbar {
    display: none;
}

.option:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.op {
    margin-top: 10px;
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.op:hover {
    background: var(--primary);
}

/* How To Download */
.howDown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.howDowns {
    background: var(--card);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    transition: 0.3s;
}

.howDowns:hover {
    transform: translateY(-5px);
}

.howDowns span {
    padding: 10px;
    display: block;
}

.howDown img {
    width: 100%;
}

@media (max-width: 570px) {
    .video {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9em;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .text h1 {
        font-size: 1.6rem;
    }
}

.error {
    color: brown;
    font-size: .9em;
    font-weight: bold;
    display: none;
}

.error.show {
    display: block;
}

.contactBox a {
    color: var(--text);
    list-style: none;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.load {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 5px solid #272727;
    border-top-color: var(--border-top);
    border-right-color: var(--primary-hover);
    border-bottom-color: var(--primary);
    border-left-color: var(--primary-hover);
    display: none;
    box-shadow: 0 0 10px;
    animation: rotate 1s linear infinite;
}

.load.show {
    display: block;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.cards {
    background-color: #252424a6;
    backdrop-filter: blur(3px);
    width: 100%;
    height: 100vh;
    position: fixed;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
}

.cards.show {
    display: flex;
}

.card {
    position: relative;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.image-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 30%;
}

.image-card img {
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.image-card button {
    padding: 3px 5px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    transition: .3s ease-in-out;
    background: var(--bg-main);
    color: var(--text);
}

.image-card button:hover {
    transform: scale(1.05);
}