/* 
 * Estilos específicos para la página de descarga 
 * Limpios, estructurados y libres de inline styles
 */

 /* Reset y Variables Base */
 .saico-premium-download-page {
     --box-bg: #ffffff;
     --border-color: #e5e7eb;
     --text-main: #1f2937;
     --text-muted: #6b7280;
     --brand-color: var(--saico-primario, #10b981);
     --brand-hover: var(--saico-primario-hover, #059669);
     --radius-md: 12px;
     --radius-lg: 16px;
     --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
     --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
     --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
     
     background-color: #ffffff;
     background-image: radial-gradient(circle, #f5f5f5 1px, transparent 0);
     background-size: 8px 8px;
     padding: 30px 0 60px 0;
     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
     width: 100%;
     box-sizing: border-box !important;
 }
 .saico-premium-download-page * {
     box-sizing: border-box !important;
 }
 .saico-premium-download-page p, 
 .saico-premium-download-page h1, 
 .saico-premium-download-page h2, 
 .saico-premium-download-page h3 {
     overflow-wrap: break-word;
     word-break: break-word;
 }
 
 .saico-container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 20px;
     width: 100%;
     box-sizing: border-box !important;
 }
 
 @media (max-width: 768px) {
     .saico-premium-download-page,
     .saico-container {
         max-width: 100vw !important;
         overflow-x: hidden !important;
     }
 }
 
 .saico-box {
     background: var(--box-bg);
     border: 1px solid var(--border-color);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-sm);
     padding: 24px;
     margin-bottom: 24px;
 }
 
 /* Elementos con estilos extraídos del HTML */
 .saico-download-status-banner {
     margin-bottom: 24px;
     padding: 20px;
     background: #e0e7ff;
     border-left: 4px solid #4f46e5;
     border-radius: 8px;
     transition: opacity 0.5s ease, transform 0.5s ease, margin 0.5s ease, padding 0.5s ease, height 0.5s ease;
     overflow: hidden;
 }
 .saico-download-status-banner h2 {
     font-size: 20px;
     font-weight: 700;
     color: #3730a3;
     margin: 0 0 6px 0;
 }
 .saico-download-status-banner p {
     color: #4338ca;
     font-size: 15px;
     margin: 0;
 }
 
 .saico-master-card {
     padding: 0;
     overflow: hidden;
 }
 
 .saico-app-header {
     padding: 20px 24px;
     border-bottom: 1px solid var(--border-color);
     background: var(--bg-card, #ffffff);
     display: flex;
     align-items: center;
     gap: 16px;
 }
 .saico-app-thumb {
     flex-shrink: 0;
 }
 .saico-app-thumb img {
     width: 72px;
     height: 72px;
     object-fit: cover;
     border-radius: 14px;
     box-shadow: 0 4px 10px rgba(0,0,0,0.08);
 }
 .saico-app-info {
     flex-grow: 1;
     text-align: left;
     min-width: 0;
 }
 .saico-app-badge {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-bottom: 6px;
 }
 .saico-app-badge span {
     font-size: 11px;
     font-weight: 700;
     color: #fff;
     background: #6366f1;
     padding: 2px 8px;
     border-radius: 6px;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
 }
 .saico-app-title {
     margin: 0 0 8px 0;
     font-size: 20px;
     font-weight: 800;
     color: var(--text-main, #1f2937);
     line-height: 1.2;
     letter-spacing: -0.5px;
 }
 
 .badge-price {
     font-size: 13px;
     font-weight: 700;
     color: #10b981;
     background: rgba(16,185,129,0.1);
     padding: 4px 10px;
     border-radius: 8px;
     display: flex;
     align-items: center;
     gap: 4px;
 }
 .saico-app-author, .saico-app-views, .saico-app-downloads {
     font-size: 14px;
     font-weight: 600;
     color: var(--text-muted, #4b5563);
     display: flex;
     align-items: center;
     gap: 4px;
 }
 
 /* Breadcrumbs */
 .saico-download-breadcrumbs {
     font-size: 14px;
     color: var(--text-muted);
     margin-bottom: 20px;
     word-break: break-all;
     overflow-wrap: break-word;
 }
 .saico-download-breadcrumbs a {
     color: var(--brand-color);
     text-decoration: none;
 }
 .saico-download-breadcrumbs a:hover {
     text-decoration: underline;
 }
 
 /* Grid Layout */
 .saico-download-grid {
     display: grid;
     grid-template-columns: 1fr 320px;
     gap: 24px;
 }
 .saico-download-content,
 .saico-download-sidebar {
     min-width: 0;
 }
 
 /* Ad Boxes Extracted */
 .saico-ad-box-top {
     margin: 0;
     border-radius: 0;
     border-left: none;
     border-right: none;
     background: #f9fafb;
     min-height: 90px;
 }
 .saico-ad-box-bottom {
     margin-top: 24px;
     min-height: 90px;
 }
 
 .saico-app-meta {
     display: flex;
     gap: 16px;
     flex-wrap: wrap;
 }
 .saico-app-meta .meta-item svg,
 .saico-app-author svg,
 .saico-app-views svg,
 .saico-app-downloads svg {
     width: 15px;
     height: 15px;
     color: var(--text-muted);
 }
 .badge-price svg {
     width: 14px;
     height: 14px;
 }
 
 /* Security Badges */
 .saico-security-badges {
     display: flex;
     gap: 16px;
     margin: 0;
     padding: 20px 30px;
     background: #ffffff;
     border-top: 1px solid var(--border-color);
     justify-content: center;
     flex-wrap: wrap;
 }
 .badge-item {
     display: flex;
     align-items: center;
     gap: 8px;
     background: #e5e7eb;
     padding: 8px 16px;
     border-radius: 30px;
     font-size: 13px;
     font-weight: 600;
     color: var(--text-main);
 }
 .badge-item svg {
     width: 18px;
     height: 18px;
 }
 
 /* Ad Boxes Base */
 .saico-ad-box, .saico-ad-sidebar-slot {
     background: #f9fafb;
     border: 1px dashed #d1d5db;
     border-radius: var(--radius-md);
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
     overflow: hidden;
     width: 100%;
 }
 .saico-ad-box::before, .saico-ad-sidebar-slot::before {
     content: "Anuncio";
     position: absolute;
     top: 5px;
     font-size: 10px;
     color: #9ca3af;
     text-transform: uppercase;
 }
 .saico-ad-sidebar-slot {
     min-height: 250px;
 }
 
 /* Dashboard */
 .saico-download-dashboard {
     text-align: center;
     padding: 40px 30px;
     background-color: #f8fafc;
     border-top: 1px solid var(--border-color);
 }
 .dashboard-header h2 {
     font-size: 26px;
     font-weight: 700;
     color: var(--brand-color);
     margin: 0 0 8px 0;
 }
 .dashboard-header p {
     color: var(--text-muted);
     font-size: 15px;
     margin: 0 0 30px 0;
 }
 
 /* Temporizador */
 .dashboard-timer-wrapper {
     display: flex;
     justify-content: center;
     margin: 20px 0;
 }
 .countdown-circle {
     position: relative;
     width: 120px;
     height: 120px;
 }
 .countdown-circle svg {
     width: 120px;
     height: 120px;
     transform: rotate(-90deg);
 }
 .countdown-circle circle {
     fill: none;
     stroke-width: 6;
     stroke-linecap: round;
 }
 .countdown-circle circle.bg {
     stroke: #f3f4f6;
 }
 .countdown-circle circle.progress {
     stroke: var(--brand-color);
     stroke-dasharray: 339.292;
     stroke-dashoffset: 0;
     transition: stroke-dashoffset 1s linear;
 }
 .countdown-number {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     display: flex;
     justify-content: center;
     align-items: center;
     font-size: 38px;
     font-weight: 800;
     color: var(--text-main);
 }
 
 /* Paso 2: Listo */
 #saico-step-ready {
     display: none;
 }
 .success-icon-large {
     width: 64px;
     height: 64px;
     background: #d1fae5;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 20px;
     color: var(--brand-color);
 }
 .success-icon-large svg {
     width: 32px;
     height: 32px;
 }
 .ready-text {
     margin-bottom: 24px !important;
 }
 .saico-final-buttons {
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 16px;
     flex-wrap: wrap;
 }
 .saico-final-buttons a, .saico-final-buttons .button {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     padding: 14px 32px;
     background: var(--brand-color);
     color: white;
     text-decoration: none;
     border-radius: var(--radius-md);
     font-weight: 700;
     font-size: 16px;
     transition: all 0.2s ease;
     border: none;
     box-shadow: var(--shadow-md);
     cursor: pointer;
     max-width: 100%;
     text-align: center;
 }
 .saico-final-buttons .somdn-download-wrap {
     width: auto !important;
     max-width: 100%;
     display: inline-flex;
 }
 .saico-final-buttons a:hover, .saico-final-buttons .button:hover {
     background: var(--brand-hover);
     transform: translateY(-2px);
     box-shadow: var(--shadow-lg);
 }
 .saico-final-buttons a.saico-btn-secondary {
     background: var(--text-main);
     color: #ffffff;
     border: none;
     box-shadow: var(--shadow-sm);
 }
 .saico-final-buttons a.saico-btn-secondary:hover {
     background: #374151;
     color: #ffffff;
 }
 .saico-btn-secondary svg {
     width: 18px;
     height: 18px;
     margin-right: 6px;
 }
 .saico-error-msg {
     color: #ef4444;
     font-weight: 500;
     padding: 10px 15px;
     background: #fee2e2;
     border-radius: 8px;
 }
 
 /* Donation Banner (Wikipedia Style) */
 .saico-donation-banner {
     background: #fef9c3; /* pale yellow like wikipedia */
     border-left: 4px solid #eab308;
     border-radius: var(--radius-md);
     padding: 20px;
     margin-top: 30px;
     display: flex;
     flex-direction: column;
     gap: 15px;
     box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.2);
 }
 @media (min-width: 768px) {
     .saico-donation-banner {
         flex-direction: row;
         align-items: center;
         justify-content: space-between;
     }
 }
 .saico-donation-banner .donation-icon {
     flex-shrink: 0;
     display: flex;
     align-items: center;
     justify-content: center;
     width: 48px;
     height: 48px;
     background: rgba(239, 68, 68, 0.1);
     border-radius: 50%;
 }
 .saico-donation-banner .donation-icon svg {
     width: 28px;
     height: 28px;
 }
 .saico-donation-banner .donation-content {
     flex-grow: 1;
     text-align: left;
 }
 .saico-donation-banner .donation-content h3 {
     margin: 0 0 8px 0;
     font-size: 18px;
     font-weight: 800;
     color: #854d0e;
 }
 .saico-donation-banner .donation-content p {
     margin: 0;
     font-size: 14px;
     line-height: 1.5;
     color: #713f12;
 }
 .saico-donation-banner .donation-action {
     flex-shrink: 0;
     display: flex;
     align-items: center;
     justify-content: center;
 }
 .saico-btn-donate {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: #eab308;
     color: #ffffff;
     padding: 12px 24px;
     border-radius: var(--radius-md);
     font-weight: 700;
     text-decoration: none;
     transition: all 0.2s ease;
     box-shadow: 0 4px 6px -1px rgba(234, 179, 8, 0.3);
 }
 .saico-btn-donate:hover {
     background: #ca8a04;
     transform: translateY(-2px);
     box-shadow: 0 10px 15px -3px rgba(234, 179, 8, 0.4);
     color: #ffffff;
 }
 .saico-btn-donate svg {
     width: 20px;
     height: 20px;
 }

 /* Plugin Download Area List Fix */
 .saico-plugin-download-area {
     width: 100%;
     margin-bottom: 24px;
     overflow-x: auto;
 }
 .saico-plugin-download-area .somdn-download-wrap {
     width: 100% !important;
     display: block !important;
 }
 
 /* Donate Modal */
 .saico-donate-overlay {
     position: fixed;
     top: 0; left: 0; width: 100%; height: 100%;
     background: rgba(0, 0, 0, 0.6);
     z-index: 99999;
     display: flex;
     align-items: center;
     justify-content: center;
     backdrop-filter: blur(4px);
 }
 .saico-donate-modal-content {
     background: white;
     padding: 30px;
     border-radius: var(--radius-lg);
     max-width: 400px;
     width: 90%;
     text-align: center;
     position: relative;
     box-shadow: var(--shadow-lg);
     animation: popIn 0.3s ease-out;
 }
 @keyframes popIn {
     from { transform: scale(0.9); opacity: 0; }
     to { transform: scale(1); opacity: 1; }
 }
 .saico-donate-close {
     position: absolute;
     top: 10px; right: 15px;
     font-size: 24px;
     font-weight: bold;
     color: #9ca3af;
     cursor: pointer;
 }
 .saico-donate-modal-content .modal-icon {
     width: 60px; height: 60px;
     background: #fee2e2;
     border-radius: 50%;
     display: flex; align-items: center; justify-content: center;
     margin: 0 auto 15px;
 }
 .saico-donate-modal-content .modal-icon svg { width: 32px; height: 32px; }
 .saico-donate-modal-content h3 { margin: 0 0 10px; color: #1f2937; font-size: 20px; font-weight: 800; }
 .saico-donate-modal-content p { color: #4b5563; font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
 .modal-buttons { display: flex; flex-direction: column; gap: 10px; }
 .modal-buttons .saico-btn-donate, .modal-buttons .saico-btn-secondary {
     width: 100%; justify-content: center;
 }
 
 /* Sidebar */
 .widget-title {
     font-size: 16px;
     font-weight: 700;
     margin: 0 0 16px 0;
     color: var(--text-main);
     border-bottom: 1px solid var(--border-color);
     padding-bottom: 12px;
 }
 .saico-download-sidebar { 
     position: sticky; 
     top: 85px; /* Reducido de 120px a 85px para evitar espacio vacío arriba */
     align-self: start; 
 }
 .saico-download-related {
     margin-top: 40px;
 }
 
 /* Responsive */
 @media (max-width: 992px) {
     .saico-download-grid {
         grid-template-columns: 1fr;
     }
     .saico-download-sidebar {
         order: 2; /* Sidebar abajo en móvil */
     }
 }
 @media (max-width: 576px) {
     .saico-app-header {
         flex-direction: column;
         text-align: center;
         padding: 20px 15px;
     }
     .saico-app-info {
         text-align: center;
         width: 100%;
     }
     .saico-app-badge {
         justify-content: center;
     }
     .saico-app-meta {
         justify-content: center;
     }
     .saico-security-badges {
         justify-content: center;
         padding: 15px;
     }
     .saico-download-dashboard {
         padding: 24px 15px;
     }
     .dashboard-header h2 {
         font-size: 20px;
         line-height: 1.3;
     }
     .dashboard-header p {
         font-size: 14px;
         margin-bottom: 20px;
     }
     .countdown-circle {
         transform: scale(0.85);
         margin: -10px 0;
     }
 }
