/* ===== SaaS-style Background ===== */
.aipg-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 50px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 30%, #e8e4fc 60%, #f0ecff 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
/* Animated floating orbs behind content */
.aipg-wrapper::before,
.aipg-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: aipg-float 8s ease-in-out infinite alternate;
}
.aipg-wrapper::before {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #a78bfa, transparent);
    top: -60px; left: -60px;
}
.aipg-wrapper::after {
    width: 250px; height: 250px;
    background: radial-gradient(circle, #c084fc, transparent);
    bottom: -50px; right: -50px;
    animation-delay: 4s;
}
@keyframes aipg-float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.1); }
}

.aipg-spacer { height: 30px; }

/* ===== CARD BASE ===== */
.aipg-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 190, 240, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(100, 80, 200, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}
.aipg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(100, 80, 200, 0.14);
    border-color: rgba(160, 140, 240, 0.4);
}

/* ===== FORM CARD ===== */
.aipg-form-card { padding: 36px; }
.aipg-header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    color: white;
    padding: 32px 20px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.aipg-header::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    animation: aipg-header-glow 6s ease-in-out infinite;
}
@keyframes aipg-header-glow {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    50%      { transform: translate(20px, 10px); opacity: 0.6; }
}
.aipg-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 800;
    color: white;
    position: relative; z-index: 1;
}
.aipg-header p { margin: 0; font-size: 16px; opacity: 0.9; position: relative; z-index: 1; }
.aipg-form-group { margin-bottom: 20px; flex: 1; }
.aipg-form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
}
.aipg-form-group .required { color: #fe4a4a; }
.aipg-form-group input[type="text"],
.aipg-form-group textarea,
.aipg-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.25s ease;
    background: rgba(248, 250, 252, 0.8);
    box-sizing: border-box;
    color: #2d3748;
}
.aipg-form-group input:focus,
.aipg-form-group textarea:focus,
.aipg-form-group select:focus {
    border-color: #8b5cf6;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.aipg-form-row { display: flex; flex-wrap: wrap; gap: 20px; }
.aipg-radio-group {
    display: flex; gap: 16px; align-items: center; margin-top: 6px; flex-wrap: wrap;
}
.aipg-radio-group label {
    display: flex; align-items: center; font-weight: 500; cursor: pointer;
    font-size: 14px; gap: 6px; color: #4a5568;
}
.aipg-submit-group { text-align: center; margin-top: 30px; }

/* ===== PRIMARY BUTTON (Purple Pill with ✨) ===== */
.aipg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 40px; border-radius: 50px; font-weight: 700; font-size: 17px;
    cursor: pointer; transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1); border: none;
}
.aipg-primary-btn {
    background: linear-gradient(135deg, #9333ea 0%, #a855f7 40%, #c084fc 100%);
    color: white;
    width: auto;
    min-width: 260px;
    padding: 16px 48px;
    box-shadow: 0 6px 24px rgba(147, 51, 234, 0.35), 0 2px 8px rgba(147, 51, 234, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.aipg-btn-icon { font-size: 20px; line-height: 1; }
.aipg-primary-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: 0.6s;
}
.aipg-primary-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 36px rgba(147, 51, 234, 0.45), 0 4px 12px rgba(147, 51, 234, 0.25);
}
.aipg-primary-btn:hover::before { left: 100%; }
.aipg-primary-btn:active { transform: translateY(-1px) scale(0.98); }
.aipg-primary-btn:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
}
@keyframes aipg-btn-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(147, 51, 234, 0.35), 0 0 0 0 rgba(147, 51, 234, 0.3); }
    50%      { box-shadow: 0 6px 24px rgba(147, 51, 234, 0.35), 0 0 0 12px rgba(147, 51, 234, 0); }
}
.aipg-primary-btn:not(:disabled):not(:hover) {
    animation: aipg-btn-pulse 2.5s ease-in-out infinite;
}
.aipg-spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 18px; height: 18px;
    animation: aipg-spin 0.7s linear infinite;
}
@keyframes aipg-spin { 100% { transform: rotate(360deg); } }
.aipg-error {
    background: #fff5f5; color: #c53030;
    padding: 14px; border-radius: 8px;
    border-left: 4px solid #f56565; margin-top: 20px; font-size: 14px;
}

/* ============================================
   RESULTS CARD — UNIQUE DESIGN
   ============================================ */
.aipg-results-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(180, 160, 240, 0.25);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(100, 60, 200, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: aipg-results-enter 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@keyframes aipg-results-enter {
    from { opacity: 0; transform: translateY(50px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Results Header (Tabs + Stats) --- */
.aipg-res-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    flex-wrap: wrap;
    gap: 12px;
}
.aipg-res-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.aipg-res-title {
    font-size: 18px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.3px;
}
.aipg-tabs { display: flex; gap: 8px; }
.aipg-tab-btn {
    padding: 6px 18px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}
.aipg-tab-btn:hover {
    border-color: rgba(255,255,255,0.6);
    color: white;
    background: rgba(255,255,255,0.2);
}
.aipg-tab-btn.active {
    background: white;
    border-color: white;
    color: #7c3aed;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.aipg-poem-stats {
    display: flex; gap: 10px;
}
.aipg-stat-badge {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --- Poem Frame (Centered with decorative quotes) --- */
.aipg-poem-frame {
    padding: 40px 50px;
    position: relative;
    text-align: center;
    min-height: 250px;
    background: linear-gradient(180deg, rgba(250,248,255,1) 0%, rgba(245,243,255,1) 100%);
    border-top: none;
}
.aipg-poem-deco-top,
.aipg-poem-deco-bottom {
    font-family: 'Georgia', serif;
    font-size: 80px;
    line-height: 1;
    color: rgba(139, 92, 246, 0.12);
    user-select: none;
    pointer-events: none;
}
.aipg-poem-deco-top {
    text-align: left;
    margin-bottom: -20px;
    animation: aipg-deco-fade 1s ease 0.3s both;
}
.aipg-poem-deco-bottom {
    text-align: right;
    margin-top: -20px;
    animation: aipg-deco-fade 1s ease 0.5s both;
}
@keyframes aipg-deco-fade {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
.aipg-active-poem {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 2;
    color: #2d2040;
    white-space: pre-wrap;
    text-align: center;
    padding: 10px 0;
    animation: aipg-poem-reveal 0.6s ease;
}
@keyframes aipg-poem-reveal {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aipg-regen-loading {
    padding: 40px 0;
    font-size: 18px;
    font-weight: 700;
    color: #8b5cf6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: aipg-fade-in 0.5s ease;
}
.aipg-regen-loading span {
    font-size: 14px;
    opacity: 0.7;
    font-weight: 400;
}
.aipg-regen-loading::before {
    content: '✨';
    animation: aipg-spin 2s linear infinite;
}

/* --- Action Button Bar --- */
.aipg-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 28px;
    background: rgba(248, 246, 255, 0.8);
    border-top: 1px solid rgba(200, 190, 240, 0.2);
    border-bottom: 1px solid rgba(200, 190, 240, 0.2);
    flex-wrap: wrap;
}
.aipg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1.5px solid rgba(200, 190, 240, 0.4);
    background: white;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(100, 80, 200, 0.06);
}
.aipg-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(100, 80, 200, 0.12);
    border-color: #a78bfa;
    color: #7c3aed;
}
.aipg-action-btn-play {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-color: #8b5cf6;
}
.aipg-action-btn-play:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
}
.aipg-action-btn-play.playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
}
.aipg-action-btn-play.playing:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}
.aipg-action-btn-danger:hover {
    border-color: #fca5a5;
    color: #f87171;
    background: #fef2f2;
}

/* --- Regenerate Chips Bar --- */
.aipg-regen-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    background: rgba(252, 250, 255, 0.6);
    flex-wrap: wrap;
}
.aipg-regen-label {
    font-size: 13px;
    font-weight: 700;
    color: #7c3aed;
    white-space: nowrap;
}
.aipg-regen-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.aipg-chip {
    padding: 6px 16px;
    border-radius: 50px;
    background: white;
    border: 1.5px solid rgba(200, 190, 240, 0.35);
    color: #666;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(100, 80, 200, 0.05);
}
.aipg-chip:hover {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    border-color: #a78bfa;
    color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}
.aipg-chip.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
    .aipg-wrapper { padding: 12px 0; border-radius: 0; box-shadow: none; background: #f8f7ff; }
    .aipg-form-card { padding: 24px 16px; border-radius: 16px; border: none; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
    .aipg-header { padding: 24px 15px; margin-bottom: 24px; border-radius: 12px; }
    .aipg-header h2 { font-size: 22px; }
    .aipg-header p { font-size: 14px; }
    .aipg-form-row { flex-direction: column; gap: 0; }
    .aipg-form-group { margin-bottom: 18px; }
    .aipg-form-group textarea { min-height: 80px; padding: 10px 12px; font-size: 14px; }
    .aipg-radio-group { gap: 12px; margin-top: 4px; }
    .aipg-radio-group label { font-size: 13px; }
    .aipg-primary-btn { width: 100%; min-width: auto; padding: 15px 24px; font-size: 16px; }
    .aipg-res-header { padding: 16px 16px; flex-direction: column; align-items: flex-start; gap: 14px; }
    .aipg-res-title { font-size: 16px; }
    .aipg-tabs { width: 100%; overflow-x: auto; padding-bottom: 5px; }
    .aipg-tab-btn { white-space: nowrap; padding: 6px 14px; }
    .aipg-poem-frame { padding: 30px 20px; }
    .aipg-poem-deco-top, .aipg-poem-deco-bottom { font-size: 40px; }
    .aipg-active-poem { font-size: 16px; line-height: 1.8; }
    .aipg-action-bar { padding: 16px 16px; gap: 8px; justify-content: space-between; }
    .aipg-action-btn { flex: 1; padding: 10px 8px; font-size: 12px; justify-content: center; }
    .aipg-action-btn span { display: none; } /* Hide text on very small screens? No, just the label maybe */
    .aipg-regen-bar { padding: 15px 16px; }
}

/* ============================================
   LYRICS TO MUSIC MODAL & WIZARD
   ============================================ */
.aipg-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.aipg-modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(8px);
}
.aipg-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    position: relative;
    z-index: 2;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: aipg-modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes aipg-modal-pop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.aipg-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aipg-modal-close:hover { background: #fee2e2; color: #ef4444; }

/* Steps and Results Layout */
.aipg-wizard-step { display: none; }
.aipg-wizard-step.active { display: block; animation: aipg-fade-in 0.4s ease-in-out; }
@keyframes aipg-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Composing Loader */
.aipg-composing-view { text-align: center; padding: 40px 0; }
.aipg-music-loader {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-bottom: 20px;
}
.aipg-music-loader span {
    width: 6px;
    background: linear-gradient(180deg, #8b5cf6, #c084fc);
    border-radius: 3px;
    animation: aipg-bar-bounce 1s ease-in-out infinite;
}
.aipg-music-loader span:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.aipg-music-loader span:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.aipg-music-loader span:nth-child(4) { animation-delay: 0.3s; height: 75%; }
.aipg-music-loader span:nth-child(5) { animation-delay: 0.4s; height: 50%; }
@keyframes aipg-bar-bounce {
    0%, 100% { height: 30%; filter: brightness(1); }
    50%      { height: 100%; filter: brightness(1.3) drop-shadow(0 0 8px rgba(192, 132, 252, 0.6)); }
}

/* New Musical Note Animation */
.aipg-composer-animation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    height: 60px;
    align-items: center;
}
.aipg-note {
    font-size: 32px;
    color: #8b5cf6;
    animation: aipg-note-float 2.1s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}
.aipg-note.n1 { animation-delay: 0s; }
.aipg-note.n2 { animation-delay: 0.4s; }
.aipg-note.n3 { animation-delay: 0.8s; }

@keyframes aipg-note-float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50%      { transform: translateY(-20px) rotate(15deg); opacity: 1; }
}

#aipg-composer-status {
    font-size: 16px;
    font-weight: 600;
    color: #6d28d9;
    letter-spacing: 0.5px;
}

/* New Musical Note Animation */
.aipg-composer-animation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    height: 60px;
    align-items: center;
}
.aipg-note {
    font-size: 32px;
    color: #8b5cf6;
    animation: aipg-note-float 2s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}
.aipg-note.n1 { animation-delay: 0s; }
.aipg-note.n2 { animation-delay: 0.4s; }
.aipg-note.n3 { animation-delay: 0.8s; }

@keyframes aipg-note-float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50%      { transform: translateY(-20px) rotate(15deg); opacity: 1; }
}

#aipg-composer-status {
    font-size: 16px;
    font-weight: 600;
    color: #6d28d9;
    letter-spacing: 0.5px;
}

/* Song Result Area */
.aipg-lyrics-result {
    background: #ffffff;
    border-radius: 24px;
    padding: 35px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 45px rgba(0,0,0,0.04);
}

.aipg-song-meta {
    text-align: center;
    margin-bottom: 25px;
}

.aipg-song-divider {
    color: #cbd5e1;
    letter-spacing: 2px;
    font-size: 12px;
    height: 14px;
}

.aipg-song-label {
    text-transform: uppercase;
    font-weight: 800;
    color: #8b5cf6;
    letter-spacing: 3px;
    font-size: 14px;
    margin: 5px 0;
}

.aipg-song-title-row {
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
    margin-top: 10px;
}

#aipg-song-title {
    color: #7c3aed;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.aipg-lyrics-actions-top {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.aipg-mini-btn {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: #475569;
}
.aipg-mini-btn:hover { background: #ffffff; border-color: #cbd5e1; color: #8b5cf6; transform: translateY(-1px); }

.aipg-lyrics-content {
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    line-height: 2;
    color: #1e293b;
    padding: 25px;
    background: #fdfdfd;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    font-size: 15px;
    text-align: center; /* Songs often centered */
    white-space: pre-line;
    transition: all 0.3s ease;
}

.aipg-lyrics-line {
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
    display: block;
    margin: 5px 0;
}

.aipg-lyrics-line.highlight {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    font-weight: 700;
    transform: scale(1.05);
}

.aipg-lyrics-label {
    display: block;
    color: #a78bfa;
    font-weight: 800;
    margin: 30px 0 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.aipg-lyrics-label:first-child { margin-top: 0; }

/* Audio Controls */
.aipg-audio-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed #f1f5f9;
}

.aipg-play-song-btn { background: #8b5cf6; color: white; min-width: 160px; font-weight: 700; height: 50px; }
.aipg-play-song-btn:hover { background: #a78bfa; box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3); }

.aipg-stop-song-btn { background: #f1f5f9; color: #475569; min-width: 100px; height: 50px; font-weight: 600; }
.aipg-stop-song-btn:hover { background: #ffffff; color: #8b5cf6; }

.aipg-play-song-btn.playing {
    background: #10b981;
    animation: aipg-pulse-green 2s infinite;
}

@keyframes aipg-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Custom Action Pills */
.aipg-extra-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 25px; justify-content: center; }
.aipg-tag-btn {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 50px;
    border: none;
    background: #f5f3ff;
    color: #7c3aed;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aipg-tag-btn:hover { background: #8b5cf6; color: white; transform: translateY(-2px); }

.aipg-action-btn-success { background: #10b981; color: white; border-color: #10b981; }
.aipg-action-btn-success:hover { background: #34d399; color: white; box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3); }

@media (max-width: 480px) {
    .aipg-song-header-nav { flex-direction: column; gap: 15px; align-items: flex-start; }
    .aipg-lyrics-actions-top { width: 100%; display: flex; gap: 5px; }
    .aipg-mini-btn { flex: 1; text-align: center; font-size: 11px; padding: 8px 5px; }
}

/* In-page View Switching */
.aipg-view-panel {
    display: none;
    animation: aipg-view-transition 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.aipg-view-panel.active { display: block; }

@keyframes aipg-view-transition {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.aipg-song-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.aipg-song-style-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aipg-song-style-picker label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}
.aipg-mini-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: white;
}

/* Audio Visualizer */
.aipg-music-player-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}
.aipg-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 50px;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.aipg-visualizer.active {
    opacity: 1;
}
.aipg-vis-bar {
    width: 4px;
    height: 8px;
    background: #8b5cf6;
    border-radius: 2px;
}
@keyframes aipg-vis-bounce {
    0%, 100% { height: 8px; }
    50% { height: 28px; }
}

/* Fixes for existing elements */
.aipg-lyrics-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed #f1f5f9;
}
.aipg-action-btn-play {
    background: #8b5cf6;
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}
.aipg-action-btn-play.playing {
    background: #ef4444;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}
