/* ===== AI PICKUP LINE GENERATOR ===== */

.apl-header { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 30%, #f368e0 70%, #ff6b6b 100%) !important; background-size: 200% 200% !important; animation: apl-bg 4s ease infinite !important; }
@keyframes apl-bg { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.apl-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; margin-bottom: 28px; }

/* Controls */
.apl-controls { background: #fff; border: 2px solid #e5e7eb; border-radius: 20px; padding: 20px; position: sticky; top: 80px; max-height: 92vh; overflow-y: auto; scrollbar-width: thin; }
.apl-section { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 2px solid #f3f4f6; }
.apl-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.apl-section-title { font-size: 12px; font-weight: 800; color: #1f2937; margin-bottom: 10px; }

/* Style Grid */
.apl-style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.apl-style-btn { background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 9px; padding: 9px 6px; font-size: 11px; font-weight: 700; color: #991b1b; cursor: pointer; transition: all .2s; text-align: center; }
.apl-style-btn:hover { border-color: #f368e0; background: #fdf4ff; color: #7e22ce; }
.apl-style-btn.active { background: linear-gradient(135deg, #ee5a24, #f368e0); border-color: #f368e0; color: #fff; }

/* Target Grid */
.apl-target-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.apl-target-btn { background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 9px; padding: 8px 5px; font-size: 11px; font-weight: 700; color: #991b1b; cursor: pointer; transition: all .2s; text-align: center; }
.apl-target-btn:hover { border-color: #f368e0; }
.apl-target-btn.active { background: linear-gradient(135deg, #ee5a24, #f368e0); border-color: #f368e0; color: #fff; }

/* Lang */
.apl-lang-btns { display: flex; gap: 6px; }
.apl-lang-btn { flex: 1; background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 9px; padding: 9px 5px; font-size: 12px; font-weight: 700; color: #991b1b; cursor: pointer; transition: all .2s; text-align: center; }
.apl-lang-btn.active { background: linear-gradient(135deg, #ee5a24, #f368e0); border-color: #f368e0; color: #fff; }

/* Count */
.apl-count-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #374151; }
.apl-count-row input[type="range"] { flex: 1; accent-color: #f368e0; }
.apl-count-val { font-size: 20px; font-weight: 900; color: #ee5a24; min-width: 24px; text-align: center; }

/* Generate */
.apl-generate-btn { width: 100%; background: linear-gradient(135deg, #ff6b6b, #ee5a24, #f368e0); color: #fff; border: none; border-radius: 14px; padding: 16px; font-size: 17px; font-weight: 900; cursor: pointer; transition: all .3s; box-shadow: 0 4px 20px rgba(243,104,224,.4); display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.apl-generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(243,104,224,.5); }
.apl-generate-btn:disabled { opacity: .7; cursor: not-allowed; }

/* Fun fact */
.apl-funfact { background: #fff5f5; border: 2px solid #fecaca; border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.apl-ff-icon { font-size: 20px; flex-shrink: 0; }
.apl-ff-text { font-size: 12px; color: #991b1b; line-height: 1.5; }

/* Output */
.apl-output { display: flex; flex-direction: column; gap: 14px; min-height: 500px; }

/* Placeholder */
.apl-placeholder { background: linear-gradient(135deg, #fff5f5, #fdf4ff); border: 3px dashed #fecaca; border-radius: 20px; padding: 40px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; justify-content: center; min-height: 400px; }
.apl-ph-icon { font-size: 64px; animation: apl-heart 1s ease-in-out infinite alternate; }
@keyframes apl-heart { from { transform: scale(1); } to { transform: scale(1.15); } }
.apl-placeholder h3 { font-size: 22px; font-weight: 800; color: #991b1b; margin: 0; }
.apl-placeholder p { font-size: 14px; color: #7e22ce; max-width: 380px; margin: 0; line-height: 1.6; }
.apl-ph-previews { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 460px; }
.apl-preview { background: #fff; border: 2px solid #fecaca; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #374151; line-height: 1.5; text-align: left; font-style: italic; }

/* Loading */
.apl-loading { background: linear-gradient(135deg, #fff5f5, #fdf4ff); border-radius: 20px; padding: 60px 30px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; min-height: 300px; justify-content: center; border: 2px solid #fecaca; }
.apl-loading-icon { font-size: 52px; animation: apl-heart 0.6s ease-in-out infinite alternate; }
.apl-loading-title { font-size: 18px; font-weight: 800; color: #991b1b; }
.apl-loading p { font-size: 13px; color: #7e22ce; margin: 0; }
.apl-loading-dots { display: flex; gap: 8px; }
.apl-loading-dots span { width: 10px; height: 10px; background: #f368e0; border-radius: 50%; animation: apl-dot 1s ease-in-out infinite; }
.apl-loading-dots span:nth-child(2) { animation-delay: .2s; }
.apl-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes apl-dot { 0%,100% { transform: scale(.6); opacity: .4; } 50% { transform: scale(1.2); opacity: 1; } }

/* Error */
.apl-error { display: flex; align-items: center; gap: 10px; padding: 20px; background: #fef2f2; border: 2px solid #fecaca; border-radius: 14px; color: #dc2626; font-size: 14px; font-weight: 600; }

/* Results */
.apl-results { display: flex; flex-direction: column; gap: 14px; }
.apl-results-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.apl-results-header h3 { font-size: 18px; font-weight: 800; color: #1f2937; margin: 0; }
.apl-header-actions { display: flex; gap: 8px; }
.apl-copy-all-btn { background: linear-gradient(135deg, #ee5a24, #f368e0); color: #fff; border: none; border-radius: 9px; padding: 8px 16px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; }
.apl-copy-all-btn:hover { opacity: .85; }
.apl-regen-btn { background: #fff; border: 2px solid #fecaca; border-radius: 9px; padding: 8px 14px; font-size: 12px; font-weight: 700; color: #ee5a24; cursor: pointer; transition: all .2s; }
.apl-regen-btn:hover { border-color: #ee5a24; background: #fff5f5; }

/* Line cards */
.apl-lines-list { display: flex; flex-direction: column; gap: 10px; }
.apl-line-card { background: #fff; border: 2px solid #fde8ea; border-radius: 14px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; transition: all .2s; position: relative; overflow: hidden; }
.apl-line-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(135deg, #ee5a24, #f368e0); }
.apl-line-card:hover { border-color: #f368e0; box-shadow: 0 4px 16px rgba(243,104,224,.12); transform: translateX(2px); }
.apl-line-num { background: linear-gradient(135deg, #ee5a24, #f368e0); color: #fff; font-weight: 900; font-size: 12px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apl-line-text { flex: 1; font-size: 14px; color: #1f2937; line-height: 1.6; font-weight: 500; }
.apl-line-copy { background: none; border: 1.5px solid #fde8ea; border-radius: 8px; padding: 5px 10px; font-size: 11px; font-weight: 700; color: #ee5a24; cursor: pointer; flex-shrink: 0; transition: all .2s; white-space: nowrap; }
.apl-line-copy:hover { background: linear-gradient(135deg, #ee5a24, #f368e0); color: #fff; border-color: transparent; }

/* Favourite — heart toggle */
.apl-line-fav { background: none; border: none; font-size: 18px; cursor: pointer; flex-shrink: 0; transition: transform .2s; padding: 0; }
.apl-line-fav:hover { transform: scale(1.3); }

.apl-results-footer { background: #fff5f5; border: 2px solid #fecaca; border-radius: 12px; padding: 12px 16px; }
.apl-results-footer p { font-size: 13px; color: #991b1b; margin: 0; }

/* Responsive */
@media (max-width: 900px) { .apl-wrap { grid-template-columns: 1fr; } .apl-controls { position: static; max-height: none; } }
@media (max-width: 500px) { .apl-style-grid { grid-template-columns: repeat(2, 1fr); } .apl-target-grid { grid-template-columns: repeat(3, 1fr); } .apl-results-header { flex-direction: column; align-items: flex-start; } }
@media (max-width: 380px) { .apl-lang-btns { flex-direction: column; } .apl-line-card { flex-wrap: wrap; } }
