:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(249, 115, 22, 0.15), transparent 40%),
                radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.1), transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.container {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    z-index: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.glow-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

input[type="url"] {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="url"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

button:active {
    transform: translateY(0);
}

.error {
    color: var(--error);
    font-size: 0.9rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

.results-container {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

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

.media-preview {
    text-align: center;
    margin-bottom: 2rem;
}

.media-preview img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-preview h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.downloads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateX(5px);
}

.quality-badge {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 640px) {
    .container {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    .input-group {
        flex-direction: column;
    }
    button {
        padding: 1rem;
    }
}
