/* Ваши стили попапа с небольшими улучшениями */

/* MODAL STYLES */
.magnet-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    z-index: 2000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    visibility: hidden; 
    transition: 0.3s; 
    padding: 20px; 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
}

.magnet-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.magnet-card { 
    background: white; 
    width: 100%; 
    max-width: 850px; 
    border-radius: 24px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: row; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
    transform: scale(0.95) translateY(20px); 
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    position: relative; 
    max-height: 90vh;
    overflow-y: auto;
}

.magnet-overlay.active .magnet-card { 
    transform: scale(1) translateY(0); 
}

.magnet-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: rgba(0,0,0,0.05); 
    border: none; 
    cursor: pointer; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: 0.2s; 
    z-index: 10; 
    font-size: 1.2rem; 
}

.magnet-close:hover { 
    background: #fee2e2; 
    color: #ef4444; 
}

.magnet-visual { 
    width: 40%; 
    background: linear-gradient(135deg, #11B9DE 0%, #3B82F6 100%); 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 40px; 
    overflow: hidden; 
    min-height: 500px;
}

.magnet-visual::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-image: radial-gradient(rgba(255,255,255,0.2) 1px, transparent 1px); 
    background-size: 20px 20px; 
    opacity: 0.5; 
}

.magnet-book-icon { 
    font-size: 6rem; 
    color: white; 
    margin-bottom: 25px; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); 
    z-index: 2; 
    animation: float 6s ease-in-out infinite; 
}

@keyframes float { 
    0% { transform: translateY(0px); } 
    50% { transform: translateY(-10px); } 
    100% { transform: translateY(0px); } 
}

.magnet-stat { 
    background: rgba(255,255,255,0.15); 
    padding: 8px 16px; 
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: white; 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    display: flex; 
    align-items: center; 
    gap: 8px; 
    border: 1px solid rgba(255,255,255,0.3); 
    z-index: 2; 
}

.magnet-content { 
    padding: 50px; 
    width: 60%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.magnet-tag { 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-size: 0.75rem; 
    font-weight: 800; 
    color: #11B9DE; 
    margin-bottom: 10px; 
}

.magnet-title { 
    font-size: 1.8rem; 
    font-weight: 800; 
    line-height: 1.2; 
    margin-bottom: 15px; 
    color: #1f2937; 
}

.magnet-desc { 
    color: #6b7280; 
    font-size: 1.05rem; 
    margin-bottom: 30px; 
    line-height: 1.6; 
}

.magnet-list { 
    list-style: none; 
    margin-bottom: 35px; 
    padding: 0;
}

.magnet-list li { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 12px; 
    font-size: 1rem; 
    font-weight: 600; 
    color: #374151; 
}

.magnet-list i { 
    color: #11B9DE; 
    font-size: 1.1rem; 
    background: #f0f9ff; 
    padding: 6px; 
    border-radius: 50%; 
    width: 28px; 
    height: 28px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}

.magnet-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.magnet-or-divider { 
    text-align: center; 
    font-size: 0.85rem; 
    color: #9CA3AF; 
    margin: 5px 0; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.magnet-or-divider::before, 
.magnet-or-divider::after { 
    content: ''; 
    flex: 1; 
    height: 1px; 
    background: #E5E7EB; 
}

.magnet-extra-text { 
    font-size: 0.95rem; 
    color: #4B5563; 
    text-align: center; 
    font-weight: 600; 
    margin-bottom: 5px; 
}

.magnet-btn { 
    width: 100%; 
    padding: 16px; 
    font-size: 1.05rem; 
    background: #11B9DE; 
    color: white; 
    border: none; 
    border-radius: 14px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s; 
    box-shadow: 0 4px 6px rgba(17, 185, 222, 0.2); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
}

.magnet-btn:hover { 
    background: #0ea5c6; 
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px rgba(17, 185, 222, 0.3); 
}

.magnet-btn-secondary { 
    width: 100%; 
    padding: 14px; 
    font-size: 1rem; 
    background: transparent; 
    color: #0088cc; 
    border: 2px solid #E0F2FE; 
    border-radius: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
}

.magnet-btn-secondary:hover { 
    border-color: #0088cc; 
    background: #F0F9FF; 
}

.magnet-btn-secondary i { 
    font-size: 1.2rem; 
}

/* Кнопка ручного запуска */
.lmr-manual-trigger {
    background: #11B9DE;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lmr-manual-trigger:hover {
    background: #0ea5c6;
    transform: translateY(-2px);
}

.lmr-manual-trigger i {
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .magnet-card {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .magnet-visual,
    .magnet-content {
        width: 100%!important;
    }
    
    .magnet-visual {
        min-height: 300px;
        padding: 30px;
    }
    
    .magnet-content {
        padding: 30px;
    }
    
    .magnet-title {
        font-size: 1.5rem;
    }
    
    .magnet-book-icon {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .magnet-overlay {
        padding: 10px;
    }
    
    .magnet-visual {
        padding: 20px;
        min-height: 150px;
    }
    
    .magnet-content {
        padding: 20px;
        width: 100%!important;
    }
    
    .magnet-title {
        font-size: 1.3rem;
    }
    
    .magnet-list li {
        font-size: 0.95rem;
        align-items: flex-start;
    }
    
    .magnet-btn,
    .magnet-btn-secondary {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Новые стили для названия PDF */
.magnet-pdf-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 25px 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(17, 185, 222, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid #11B9DE;
}

.magnet-pdf-title i {
    color: #11B9DE;
    font-size: 1.2rem;
    background: rgba(17, 185, 222, 0.1);
    padding: 10px;
    border-radius: 50%;
}

.pdf-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2937;
    background: linear-gradient(135deg, #11B9DE 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(17, 185, 222, 0.1);
}

/* Обновляем стили списка */
.magnet-list {
    list-style: none;
    margin: 0 0 25px 0;
    padding: 0;
}

.magnet-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    padding: 12px 15px;
    border-radius: 10px;
    border-left: 3px solid #10B981;
}

.magnet-list i {
    color: #10B981;
    font-size: 1.1rem;
    background: #d1fae5;
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Обновляем заголовок */
.magnet-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #1f2937;
    text-align: center;
}

.magnet-tag {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #11B9DE;
    margin-bottom: 10px;
    text-align: center;
    background: rgba(17, 185, 222, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.magnet-content {
    padding: 50px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .magnet-pdf-title {
        padding: 12px;
        margin: 10px 0 20px 0;
    }
    
    .pdf-name {
        font-size: 1.1rem;
    }
    
    .magnet-title {
        font-size: 1.5rem;
    }
    
    .magnet-content {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .magnet-pdf-title {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .pdf-name {
        font-size: 1rem;
    }
    
    .magnet-title {
        font-size: 1.3rem;
    }
    
    .magnet-list li {
        font-size: 0.95rem;
        padding: 10px;
    }
}