/* Beta 검색 스밍리스트 전용 스타일 */

.platform-selector-card {
    margin-bottom: 20px;
}

/* 플랫폼 선택 레이아웃: 상단 멜론/지니/플로 가로 1줄 + 하단 통합모드 전폭 1줄 */
.radio-group-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.platform-main-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.platform-unified-row {
    width: 100%;
}

.radio-group-container .radio-option {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.radio-group-container .radio-option label {
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    gap: 6px;
    margin: 0;
}

.radio-group-container .radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-group-container .radio-option.selected {
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 4px 14px rgba(15, 157, 133, 0.15);
}

.search-section {
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    outline: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--brand);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 157, 133, 0.12), 0 6px 16px rgba(15, 23, 42, 0.06);
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.5;
}

.btn-search {
    padding: 14px 22px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(15, 157, 133, 0.25);
    transition: var(--transition-smooth);
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 157, 133, 0.35);
}

/* 플랫폼별 테마 색상 */
body.platform-melon .btn-search { background: linear-gradient(135deg, #02c73c 0%, #029e30 100%); box-shadow: 0 6px 18px rgba(2, 199, 60, 0.25); }
body.platform-genie .btn-search { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); box-shadow: 0 6px 18px rgba(0, 123, 255, 0.25); }
body.platform-flo .btn-search { background: linear-gradient(135deg, #3f3fff 0%, #2929cc 100%); box-shadow: 0 6px 18px rgba(63, 63, 255, 0.25); }
body.platform-unified .btn-search { background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3); }

body.platform-unified {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
        radial-gradient(1000px 500px at 100% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
}

body.platform-unified .panel {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05), 0 0 30px rgba(139, 92, 246, 0.18);
}

/* 검색 결과 영역 */
.search-results-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    max-height: 420px;
    overflow-y: auto;
    padding: 12px;
    display: none;
    margin-top: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.search-results-panel.active {
    display: block;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 트랙 아이템 디자인 */
.track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.95);
    transition: var(--transition-smooth);
}

.track-item:hover {
    background: #ffffff;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.track-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.album-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.track-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.track-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.btn-add-track {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 157, 133, 0.3);
    background: rgba(15, 157, 133, 0.08);
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    margin-left: 8px;
}

body.platform-melon .btn-add-track { border-color: rgba(2, 199, 60, 0.3); background: rgba(2, 199, 60, 0.08); color: #029e30; }
body.platform-genie .btn-add-track { border-color: rgba(0, 123, 255, 0.3); background: rgba(0, 123, 255, 0.08); color: #0056b3; }
body.platform-flo .btn-add-track { border-color: rgba(63, 63, 255, 0.3); background: rgba(63, 63, 255, 0.08); color: #2929cc; }
body.platform-unified .btn-add-track { border-color: rgba(139, 92, 246, 0.3); background: rgba(139, 92, 246, 0.08); color: #7c3aed; }

.btn-add-track:hover { background: var(--brand); color: #ffffff; border-color: var(--brand); }
body.platform-melon .btn-add-track:hover { background: #02c73c; color: #ffffff; border-color: #02c73c; }
body.platform-genie .btn-add-track:hover { background: #007bff; color: #ffffff; border-color: #007bff; }
body.platform-flo .btn-add-track:hover { background: #3f3fff; color: #ffffff; border-color: #3f3fff; }
body.platform-unified .btn-add-track:hover { background: #8b5cf6; color: #ffffff; border-color: #8b5cf6; }

.btn-add-track.added {
    background: rgba(148, 163, 184, 0.15) !important;
    color: var(--muted) !important;
    border-color: transparent !important;
    cursor: default;
}

/* 중복 곡 쉬운 추가 버튼 (+1) */
.btn-duplicate-add {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #f8fafc;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-right: 6px;
}

.btn-duplicate-add:hover {
    background: #e2e8f0;
    color: var(--ink);
}

/* 아이콘 전용 동기화 뱃지 (스밍리스트 영역) */
.sync-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.sync-badge-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 4px;
}

/* 상태 표시 박스 */
.search-status-box {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(15, 157, 133, 0.2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

body.platform-melon .spinner { border-top-color: #02c73c; }
body.platform-genie .spinner { border-top-color: #007bff; }
body.platform-flo .spinner { border-top-color: #3f3fff; }
body.platform-unified .spinner { border-top-color: #8b5cf6; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 담은 곡 리스트 (Playlist Panel) */
.playlist-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.03);
}

.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.playlist-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-badge {
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

body.platform-melon .count-badge { background: #02c73c; }
body.platform-genie .count-badge { background: #007bff; }
body.platform-flo .count-badge { background: #3f3fff; }
body.platform-unified .count-badge { background: #8b5cf6; }

.btn-clear-all {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.btn-clear-all:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.selected-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.selected-track-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
    animation: rise-in 300ms ease-out both;
}

.track-actions {
    display: flex;
    align-items: center;
}

.track-index {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    width: 24px;
    flex-shrink: 0;
}

.btn-remove-track {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.btn-remove-track:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.playlist-empty-state {
    text-align: center;
    padding: 28px 16px;
    color: var(--muted);
    font-size: 14px;
    border: 2px dashed rgba(148, 163, 184, 0.25);
    border-radius: 16px;
}

.badge-duplicate {
    font-size: 11px;
    background: #fee2e2;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
}

/* 딥링크 생성 버튼 */
.btn-generate-main {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
    box-shadow: 0 10px 30px rgba(15, 157, 133, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: -0.01em;
}

.btn-generate-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(15, 157, 133, 0.4);
}

body.platform-melon .btn-generate-main { background: linear-gradient(135deg, #02c73c 0%, #029e30 100%); box-shadow: 0 10px 30px rgba(2, 199, 60, 0.3); }
body.platform-genie .btn-generate-main { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3); }
body.platform-flo .btn-generate-main { background: linear-gradient(135deg, #3f3fff 0%, #2929cc 100%); box-shadow: 0 10px 30px rgba(63, 63, 255, 0.3); }
body.platform-unified .btn-generate-main { background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35); }

/* 원클릭 공유 링크 카드 */
.share-preset-card {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 157, 133, 0.3);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

body.platform-unified .share-preset-card {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.share-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
}

.btn-generate-share {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #0f9d85 0%, #0a7c68 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 6px 18px rgba(15, 157, 133, 0.25);
    transition: var(--transition-smooth);
}

body.platform-unified .btn-generate-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3);
}

.btn-generate-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 157, 133, 0.35);
}

.share-result-container {
    margin-top: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    animation: rise-in 250ms ease-out both;
}

.share-result-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.share-result-url {
    font-size: 13.5px;
    color: #0284c7;
    font-weight: 800;
    word-break: break-all;
    margin-bottom: 10px;
}

.share-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-share-copy {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #94a3b8;
    background: #ffffff;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-share-copy:hover {
    background: #f1f5f9;
    border-color: #64748b;
}

/* 부드러운 아코디언 슬라이드 애니메이션 & 회전 화살표 표시 */
.collapsible-links-wrapper {
    margin-top: 20px;
    border-top: 1px dashed rgba(148, 163, 184, 0.25);
    padding-top: 16px;
}

.btn-toggle-collapsible {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.btn-toggle-collapsible:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.toggle-icon-arrow {
    display: inline-block;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 12px;
    margin-left: 8px;
    color: var(--muted);
}

.btn-toggle-collapsible.open .toggle-icon-arrow {
    transform: rotate(180deg);
}

.collapsible-links-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 350ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease, margin-top 300ms ease;
    margin-top: 0;
}

.collapsible-links-body.open {
    max-height: 3000px;
    opacity: 1;
    margin-top: 12px;
}

/* 무중단 Toast 피드백 팝업 */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
}

.toast-container.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
