* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.content {
    padding: 40px;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.input-container {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 18px 20px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #ff0844;
    box-shadow: 0 0 0 3px rgba(255, 8, 68, 0.1);
}

button {
    padding: 18px 35px;
    background: linear-gradient(135deg, #ff0844 0%, #ff7eb3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 8, 68, 0.2);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result {
    margin-top: 30px;
    display: none;
}

.video-preview {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.video-preview video {
    width: 100%;
    border-radius: 10px;
    max-height: 400px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 200px;
    padding: 18px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.loader {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0844;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #ffeaea;
    border: 2px solid #ff6b6b;
    color: #d32f2f;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
}

.instructions {
    background: #f0f7ff;
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
}

.instructions h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.steps {
    list-style: none;
    padding-left: 0;
}

.steps li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.steps i {
    color: #ff0844;
    font-size: 1.2rem;
}

.url-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #4CAF50;
    display: none;
}

.url-preview p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.url-preview .detected-url {
    color: #4CAF50;
    font-weight: 600;
    word-break: break-all;
}

.info-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-button {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    margin-top: 10px;
}

.install-button:hover {
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

.pwa-status {
    display: none;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 25px;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    .download-btn {
        min-width: 100%;
    }
}

/* ===============================
   DOWNLOAD LOCK (APP.JS)
   =============================== */
.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}
