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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #e6e6e6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
    background: rgba(30, 30, 50, 0.85);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 30px;
    margin-top: 20px;
    border: 1px solid rgba(100, 100, 255, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(100, 100, 255, 0.4);
}

h1 {
    font-size: 2.8rem;
    margin: 15px 0;
    background: linear-gradient(to right, #ff416c, #ff4b2b, #ff9a3d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-top: 10px;
}

.input-group {
    display: flex;
    margin: 25px 0;
}

#videoUrl {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    background: rgba(40, 40, 70, 0.9);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

#videoUrl::placeholder {
    color: #888;
}

#videoUrl:focus {
    box-shadow: 0 0 0 3px rgba(100, 100, 255, 0.5);
}

#downloadBtn {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 0 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

#downloadBtn:hover {
    background: linear-gradient(to right, #ff5277, #ff5733);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4);
}

#downloadBtn:active {
    transform: translateY(0);
}

#downloadBtn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.supported-sites {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.supported-sites::before {
    content: "Soporta múltiples plataformas";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    padding: 0 15px;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.site-logo {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.site-logo span {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.8;
    letter-spacing: 1px;
}

.site-logo:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.cat-web { 
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2) 0%, rgba(204, 0, 0, 0.4) 100%);
    color: #ff4d4d;
    border-color: rgba(255, 77, 77, 0.3);
}
.cat-web:hover { background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%); color: white; }

.cat-social { 
    background: linear-gradient(135deg, rgba(26, 183, 234, 0.2) 0%, rgba(13, 148, 194, 0.4) 100%);
    color: #4dc3ff;
    border-color: rgba(77, 195, 255, 0.3);
}
.cat-social:hover { background: linear-gradient(135deg, #1ab7ea 0%, #0d94c2 100%); color: white; }

.cat-stream { 
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2) 0%, rgba(0, 150, 36, 0.4) 100%);
    color: #4dff88;
    border-color: rgba(77, 255, 136, 0.3);
}
.cat-stream:hover { background: linear-gradient(135deg, #00c853 0%, #009624 100%); color: white; }

.instructions {
    background: rgba(40, 40, 70, 0.7);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border-left: 4px solid #ff4b2b;
}

.instructions h2 {
    color: #ff9a3d;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.instructions ol {
    padding-left: 25px;
    margin-top: 15px;
    font-size: 1.1rem;
}

.instructions li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.status {
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.status.visible {
    opacity: 1;
}

.status.success {
    background: rgba(40, 100, 40, 0.3);
    color: #6cff8d;
    border: 1px solid rgba(108, 255, 141, 0.3);
}

.status.error {
    background: rgba(100, 40, 40, 0.3);
    color: #ff6c6c;
    border: 1px solid rgba(255, 108, 108, 0.3);
}

.status.processing {
    background: rgba(60, 60, 100, 0.4);
    color: #a9a9ff;
}

.quality-selector {
    margin: 20px 0;
    display: none;
    text-align: center;
}

.quality-selector.visible {
    display: block;
}

.quality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.quality-btn {
    background: rgba(60, 60, 100, 0.7);
    border: 1px solid rgba(100, 100, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.quality-btn:hover {
    background: rgba(100, 100, 255, 0.3);
    transform: translateY(-2px);
}

.quality-btn.selected {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    border-color: transparent;
    transform: scale(1.05);
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #888;
    font-size: 0.9rem;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.extension-note {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border-left: 3px solid #ff9a3d;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2.3rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #videoUrl {
        border-radius: 50px;
        margin-bottom: 15px;
    }
    
    #downloadBtn {
        border-radius: 50px;
        padding: 15px;
        width: 100%;
        min-width: auto;
    }
    
    .site-logo {
        width: 65px;
        height: 65px;
        font-size: 1.2rem;
    }
    
    .quality-options {
        flex-direction: column;
    }
    
    .quality-btn {
        width: 100%;
    }
}
