.downloader-page {
    min-height: 100vh;
    margin: -1.5rem -1.5rem -1.1rem;
    padding: 1.5rem;
    background: linear-gradient(160deg, #0c1222 0%, #1a1f35 40%, #0f1929 70%, #0a0f1a 100%);
    position: relative;
    overflow: hidden;
}

.downloader-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(167,139,250,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section {
    position: relative;
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-icon svg {
    filter: drop-shadow(0 4px 20px rgba(59,130,246,0.3));
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 40%, #f472b6 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 580px;
}

.input-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.input-card.card-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.url-input-group {
    display: flex;
    gap: 0;
}

.url-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    color: #e2e8f0 !important;
    border-radius: 14px 0 0 14px !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.url-input::placeholder {
    color: #64748b;
}

.btn-download {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 0 14px 14px 0 !important;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
}

.btn-download:active:not(:disabled) {
    transform: translateY(0);
}

.btn-download:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-content {
    display: inline-flex;
    align-items: center;
}

.supported-platforms {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.platforms-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.platforms-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    position: relative;
}

.platform-pill img {
    max-width: 16px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.platform-pill::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.platform-pill:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.platform-pill:hover img {
    opacity: 1;
}

.platform-pill:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.platform-pill:active {
    transform: translateY(-1px);
}

.platforms-more {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0 2px;
    cursor: default;
    transition: color 0.2s ease;
}

.platforms-more:hover {
    color: #94a3b8;
}

.status-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    animation: fadeSlideUp 0.45s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.loading-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.dot-1 { animation-delay: -0.32s; }
.dot-2 { animation-delay: -0.16s; }
.dot-3 { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1.1); opacity: 1; }
}

.download-animation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-svg {
    filter: drop-shadow(0 0 20px rgba(59,130,246,0.2));
}

.progress-ring {
    animation: spin 2s linear infinite;
    transform-origin: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.download-arrow {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0% { stroke-dashoffset: 36; opacity: 0.6; }
    50% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -36; opacity: 0.6; }
}

.status-title {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 1.4rem;
}

.status-text {
    color: #94a3b8;
    font-size: 0.95rem;
}

.result-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeSlideUp 0.5s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.screenshot-wrapper {
    position: relative;
    background: #0f172a;
    cursor: pointer;
}

.video-screenshot {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.screenshot-wrapper:hover .video-screenshot {
    transform: scale(1.02);
}

.result-body {
    border-top: 1px solid rgba(148,163,184,0.08);
}

.success-badge {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-title {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
    word-break: break-word;
}

.result-url {
    color: #64748b;
    word-break: break-all;
    font-size: 0.8rem;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-download-file {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.btn-download-file:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35);
    color: white !important;
}

.btn-new-download {
    display: inline-flex;
    align-items: center;
    background: rgba(148, 163, 184, 0.08) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    font-weight: 500;
    padding: 0.8rem 1.25rem;
    border-radius: 14px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-new-download:hover {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #e2e8f0 !important;
}

.error-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 20px;
    animation: fadeSlideUp 0.45s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.error-title {
    color: #fca5a5;
    font-weight: 700;
    font-size: 1.4rem;
}

.error-text {
    color: #94a3b8;
    font-size: 0.95rem;
}

.btn-retry {
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    color: #93c5fd !important;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.btn-retry:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    color: #bfdbfe !important;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .downloader-page {
        padding: 1rem;
        margin: -1rem -1rem -1.1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .url-input-group {
        flex-direction: column;
    }

    .url-input {
        border-radius: 12px !important;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem !important;
    }

    .btn-download {
        border-radius: 12px !important;
        padding: 0.75rem 1.25rem;
    }

    .supported-platforms {
        justify-content: center;
    }

    .platforms-label {
        display: none;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-new-download {
        justify-content: center;
    }

    .status-title,
    .error-title {
        font-size: 1.2rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
}
