/* assets/css/style.css */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #e5e7eb;
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.logo span {
    color: #38bdf8;
}
.tagline {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #cbd5f5;
    opacity: 0.8;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.card {
    width: 100%;
    max-width: 640px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(16px);
}

.card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.95rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.form {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: #e5e7eb;
}

.input-row {
    display: flex;
    gap: 0.75rem;
}

.input {
    flex: 1;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: rgba(15, 23, 42, 0.6);
    color: #f9fafb;
    outline: none;
    font-size: 0.95rem;
}

.input::placeholder {
    color: #6b7280;
}

.input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    color: #0b1120;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 16px 40px rgba(56, 189, 248, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

.btn-download {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.loader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #e5e7eb;
    margin-bottom: 1rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.5);
    border-top-color: #38bdf8;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.result {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.75rem;
}

.thumb {
    width: 140px;
    height: 140px;
    border-radius: 0.75rem;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.info {
    flex: 1;
}

.video-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #f9fafb;
}

.footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    .card {
        padding: 1.6rem 1.2rem;
    }

    .input-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .thumb {
        width: 180px;
        height: 180px;
    }
}
