:root {
    --bg-color: #0f0c29;
    --primary-color: #363266;
    --secondary-color: #282841;
    --accent-color: #537895;
    --text-color: #ffffff;
    --fb-blue: #1877f2;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    text-decoration: none;
}
body {
    font-family: 'Segoe UI',sans-serif;
    background: linear-gradient(135deg, #141e30, #243b55);
    color: #f1f1f1;
    min-height: 100vh;
}
/* background animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.square {
    position: absolute;
    list-style: none;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: rotate 25s linear infinite;
    bottom: -200px;
}
@keyframes rotate {
    form {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}
/* main content */
.container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 98vh;
    padding: 2rem;
    text-align: center;
}
header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}
#url-form {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 10px;
}
#url-form input {
    flex-grow: 1;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid var(--primary-color);
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#url-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(83, 120, 149, 0.5);
}
#url-form button {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    background-color: var(--fb-blue);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#url-form button:hover, #url-form button:disabled {
    background-color: #166fe5;
}
#url-form button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* loader */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.);
    border-top: 5px solid var(--text-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 2rem;
}
@keyframes spin {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}
/* result card */
.result-card {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    background: rgba(36, 36, 62, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    text-align: left;
    display: flex;
    gap: 1.5rem;
}
.result-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}
.result-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.result-card .info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}
.result-card .info .download-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-weight: bold;
    background-color: #28a745;
    color: var(--text-color);
    border-radius: 8px;
    transition: background-color 0,3s ease;
}
.result-card .info .download-btn:hover {
    background-color: #218838;
}
/* footer */
footer {
    justify-content: center;
    position: relative;
    align-items: center;
    text-align: center;
    bottom: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}
/* responsive */
@media (max-width: 680px) {
    header h1 { font-size: 2rem; }
    #url-form { flex-direction: column; }
    .result-card { flex-direction: column; align-items: center; text-align: center; }
    .result-card img { width: 100%; height: auto; max-width: 250px; }
    .result-card .info { width: 100%; }
}