/* Estilos base */
.ig-downloader-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ig-downloader-header {
    text-align: center;
    margin-bottom: 25px;
}

.ig-downloader-header h2 {
    color: #262626;
    margin: 0 0 8px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ig-downloader-header p {
    color: #737373;
    margin: 0;
    font-size: 15px;
}

/* Formulário */
.ig-downloader-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#ig-downloader-url {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

#ig-downloader-url:focus {
    border-color: #0095f6;
    outline: none;
}

#ig-downloader-submit {
    padding: 0 24px;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    position: relative;
}

#ig-downloader-submit:hover {
    background: #0077cc;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.2s;
}

.loading-spinner.active {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Resultados */
#ig-downloader-results {
    margin-top: 25px;
    min-height: 50px;
}

.ig-downloader-error {
    padding: 15px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-downloader-error i {
    font-size: 20px;
}

.ig-downloader-results-container h3 {
    color: #262626;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.ig-media-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.ig-media-item {
    background: #fafafa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ig-media-preview {
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.ig-media-preview img,
.ig-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ig-media-actions {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ig-download-button {
    padding: 8px 12px;
    background: #0095f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ig-download-button:hover {
    background: #0077cc;
}

.ig-media-type {
    font-size: 12px;
    color: #737373;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Disclaimer */
.ig-downloader-disclaimer {
    margin-top: 25px;
    font-size: 12px;
    color: #737373;
    text-align: center;
    line-height: 1.5;
}

/* Ícones (usando pseudo-elementos) */
.icon-instagram::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23262626" d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>');
}

.icon-error::before {
    content: '⚠️';
}

.icon-download::before {
    content: '↓';
    font-size: 14px;
}