/* ClipMaster Pro - Diseño Enterprise */
.clipmaster-pro-widget {
    --cm-primary: #3b82f6;
    --cm-accent: #2ea043;
    --cm-bg: #0f1419;
    --cm-surface: #1a2332;
    --cm-surface-2: #243447;
    --cm-border: #2d3e52;
    --cm-text: #ffffff;
    --cm-text-muted: #8899a6;
    --cm-success: #2ea043;
    --cm-error: #ef4444;
    --cm-warning: #f59e0b;
    
    background: linear-gradient(135deg, var(--cm-bg) 0%, #1a1f2e 100%);
    color: var(--cm-text);
    padding: 32px;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 640px;
    margin: 20px auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.clipmaster-pro-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cm-primary), var(--cm-accent), var(--cm-primary));
    background-size: 200% 100%;
    animation: cm-gradient 3s ease infinite;
}

@keyframes cm-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cm-widget-header { text-align: center; margin-bottom: 24px; }
.cm-logo {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 8px;
}
.cm-logo svg { color: var(--cm-primary); }
.cm-logo h2 {
    margin: 0; font-size: 28px; font-weight: 700;
    background: linear-gradient(135deg, var(--cm-primary), var(--cm-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cm-tagline { margin: 0; color: var(--cm-text-muted); font-size: 14px; }

.cm-platforms {
    display: flex; justify-content: center; gap: 12px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.cm-platform {
    width: 40px; height: 40px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.cm-platform svg { width: 20px; height: 20px; color: var(--cm-text-muted); }
.cm-platform:hover {
    background: var(--cm-surface-2);
    border-color: var(--cm-primary);
    transform: translateY(-3px);
}
.cm-platform:hover svg { color: var(--cm-primary); }

.cm-input-section { margin-bottom: 20px; }
.cm-input-wrapper {
    position: relative;
    display: flex; align-items: center;
    background: var(--cm-surface);
    border: 2px solid var(--cm-border);
    border-radius: 12px;
    padding: 0 12px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}
.cm-input-wrapper:focus-within {
    border-color: var(--cm-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.cm-link-icon {
    width: 20px; height: 20px; color: var(--cm-text-muted);
    flex-shrink: 0;
}
.cm-input-wrapper input {
    flex: 1; border: none; background: transparent;
    color: var(--cm-text); padding: 14px 8px;
    font-size: 15px; outline: none;
}
.cm-input-wrapper input::placeholder { color: var(--cm-text-muted); }
.cm-paste-btn {
    background: transparent; border: none; cursor: pointer;
    color: var(--cm-text-muted); padding: 8px;
    border-radius: 6px; transition: all 0.2s;
}
.cm-paste-btn:hover { background: var(--cm-surface-2); color: var(--cm-primary); }
.cm-paste-btn svg { width: 18px; height: 18px; }

.cm-options-row { display: flex; gap: 10px; }
.cm-options-row select {
    flex: 1; padding: 14px; border-radius: 10px;
    border: 2px solid var(--cm-border);
    background: var(--cm-surface); color: var(--cm-text);
    font-size: 14px; cursor: pointer; outline: none;
    transition: all 0.2s;
}
.cm-options-row select:focus { border-color: var(--cm-primary); }
.cm-download-btn {
    flex: 1.5; padding: 14px 24px; border-radius: 10px;
    background: linear-gradient(135deg, var(--cm-accent), #238636);
    color: white; border: none; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(46,160,67,0.3);
}
.cm-download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46,160,67,0.5);
}
.cm-download-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cm-spinner {
    width: 18px; height: 18px;
    animation: cm-spin 1s linear infinite;
}
.cm-spinner circle {
    stroke: white; stroke-linecap: round;
    stroke-dasharray: 90, 150; stroke-dashoffset: 0;
}
@keyframes cm-spin { 100% { transform: rotate(360deg); } }

.cm-info-panel {
    display: flex; gap: 16px; padding: 16px;
    background: var(--cm-surface); border-radius: 12px;
    margin-bottom: 16px; border: 1px solid var(--cm-border);
}
.cm-video-thumb {
    width: 120px; height: 68px; flex-shrink: 0;
    background: var(--cm-surface-2); border-radius: 8px;
    background-size: cover; background-position: center;
}
.cm-video-info h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.cm-video-info p { margin: 0; color: var(--cm-text-muted); font-size: 13px; }

.cm-status {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px; text-align: center;
    font-size: 14px; color: var(--cm-text-muted);
}
.cm-status.success { color: var(--cm-success); }
.cm-status.error { color: var(--cm-error); }
.cm-status.processing { color: var(--cm-primary); }

.cm-progress-container { margin-top: 16px; }
.cm-progress-bar {
    height: 8px; background: var(--cm-surface);
    border-radius: 4px; overflow: hidden;
}
.cm-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--cm-primary), var(--cm-accent));
    transition: width 0.3s ease;
    border-radius: 4px;
}
.cm-progress-text {
    text-align: center; margin-top: 8px;
    font-size: 13px; color: var(--cm-text-muted);
}

.cm-ad-container {
    margin: 20px 0; padding: 12px;
    background: var(--cm-surface);
    border-radius: 12px; border: 1px dashed var(--cm-border);
    min-height: 90px;
    display: flex; align-items: center; justify-content: center;
}

.cm-branding {
    text-align: center; margin-top: 20px;
    font-size: 12px; color: var(--cm-text-muted);
    opacity: 0.7;
}
.cm-branding strong { color: var(--cm-primary); }

/* Responsive */
@media (max-width: 600px) {
    .clipmaster-pro-widget { padding: 20px; margin: 10px; }
    .cm-logo h2 { font-size: 22px; }
    .cm-options-row { flex-direction: column; }
    .cm-info-panel { flex-direction: column; }
    .cm-video-thumb { width: 100%; height: 180px; }
}

/* Admin styles */
.clipmaster-admin { max-width: 1200px; margin: 20px auto; }
.cm-admin-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.cm-admin-card {
    background: white; padding: 24px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.cm-admin-card h2 { margin-top: 0; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.cm-admin-sidebar h3 { margin-top: 20px; font-size: 14px; color: #666; }
.cm-admin-sidebar h3:first-child { margin-top: 0; }
.cm-shortcode-box {
    background: #f6f7f7; padding: 10px 12px; border-radius: 4px;
    margin: 8px 0; border-left: 3px solid #3b82f6;
}
.cm-shortcode-box code { font-size: 13px; color: #d63638; }
.cm-shortcode-box p { margin: 4px 0 0; font-size: 12px; color: #666; }
.cm-status-list { list-style: none; padding: 0; margin: 10px 0; }
.cm-status-list li { padding: 6px 0; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.cm-admin-sidebar ol { padding-left: 20px; font-size: 13px; color: #555; }
.cm-admin-sidebar ol li { margin: 6px 0; }

@media (max-width: 782px) {
    .cm-admin-grid { grid-template-columns: 1fr; }
}