/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Premium UI Styles — ラクノオト
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── プレミアムバッジ ── */
.premium-badge {
    display: inline-block;
    font-size: 0.55rem;
    padding: 1px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 200, 80, 0.25), rgba(255, 160, 40, 0.15));
    color: #f0c860;
    border: 1px solid rgba(255, 200, 80, 0.3);
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 5px;
}

/* ── 鍵マーク付きバリアントボタン ── */
.variant-btn.premium-locked {
    position: relative;
    color: rgba(255, 200, 80, 0.6);
    border-color: rgba(255, 200, 80, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.variant-btn.premium-locked:hover {
    color: rgba(255, 200, 80, 0.9);
    border-color: rgba(255, 200, 80, 0.4);
    background: rgba(255, 200, 80, 0.08);
}

.variant-btn.premium-locked svg {
    width: 11px;
    height: 11px;
}

/* 試聴中の鍵ボタン */
.variant-btn.premium-trial {
    color: var(--accent);
    border-color: var(--accent);
    animation: trialPulse 1s ease-in-out infinite;
}

@keyframes trialPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108, 180, 238, 0.3); }
    50% { box-shadow: 0 0 8px 2px rgba(108, 180, 238, 0.15); }
}

/* ── 試聴カウントダウン ── */
.trial-countdown {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.trial-countdown.visible {
    opacity: 1;
}

/* ── プレミアムチャンネルの区切り ── */
.premium-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 6px;
    margin-top: 4px;
}

.premium-divider::before,
.premium-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 200, 80, 0.2), transparent);
}

.premium-divider-text {
    font-size: 0.65rem;
    color: rgba(255, 200, 80, 0.6);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── プレミアムチャンネル行 ── */
/* プレミアムチャンネル行は通常チャンネルと同じレイアウト */

/* プレミアムチャンネルのアイコン色を統一 */
.channel.premium-channel .channel-icon svg {
    color: rgba(220, 185, 100, 0.55);
}

.channel.premium-channel.active .channel-icon svg {
    color: rgba(220, 185, 100, 0.85);
}

/* ── Premium クイックボタン（案C） ── */
.premium-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 14px;
    border: 1px solid rgba(220, 185, 100, 0.2);
    border-radius: 16px;
    background: transparent;
    color: rgba(220, 185, 100, 0.5);
    font-size: 0.68rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.premium-quick-btn:hover {
    color: rgba(220, 185, 100, 0.8);
    border-color: rgba(220, 185, 100, 0.35);
    background: rgba(220, 185, 100, 0.05);
}

.premium-quick-btn svg {
    width: 12px;
    height: 12px;
}

/* ── 課金モーダル ── */
.premium-modal .modal {
    max-width: 420px;
    text-align: center;
}

.premium-modal-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.premium-modal-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* プランカード */
.premium-plans {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.premium-plan-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    transition: all 0.3s ease;
}

.premium-plan-card.highlighted {
    border-color: rgba(255, 200, 80, 0.3);
    background: rgba(255, 200, 80, 0.05);
}

.plan-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-description {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.plan-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0c860;
    margin-bottom: 12px;
}

.plan-price-note {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 4px;
}

.plan-buy-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 200, 80, 0.2), rgba(255, 160, 40, 0.15));
    color: #f0c860;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-buy-btn:hover {
    background: linear-gradient(135deg, rgba(255, 200, 80, 0.3), rgba(255, 160, 40, 0.25));
    transform: translateY(-1px);
}

.plan-owned {
    text-align: center;
    color: var(--accent);
    font-size: 0.8rem;
    padding: 8px;
}

.premium-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.premium-restore-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}

.premium-restore-btn:hover {
    color: var(--text-primary);
}

.premium-legal-link {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

.premium-legal-link a {
    color: rgba(255, 255, 255, 0.4);
}

/* ── 試聴プレビューセクション ── */
.premium-preview-section {
    text-align: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.preview-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-play-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.preview-play-btn.previewing {
    background: rgba(100, 180, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

.preview-play-btn svg {
    width: 16px;
    height: 16px;
}

.preview-timer {
    font-size: 0.75rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.preview-loading {
    font-size: 0.72rem;
    opacity: 0.8;
    animation: previewBlink 1s ease-in-out infinite;
}

@keyframes previewBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ── 復元モーダル ── */
.restore-modal .modal {
    max-width: 380px;
    text-align: center;
}

.restore-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.restore-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.restore-input:focus {
    border-color: var(--accent);
}

.restore-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.restore-action-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(108, 180, 238, 0.15);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restore-action-btn:hover {
    background: rgba(108, 180, 238, 0.25);
}

.restore-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.restore-error {
    font-size: 0.75rem;
    color: #e88;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s;
}

.restore-error.visible {
    opacity: 1;
}

.restore-success {
    font-size: 0.75rem;
    color: var(--accent);
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s;
}

.restore-success.visible {
    opacity: 1;
}

/* ── 購入完了ページ ── */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.success-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.success-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.success-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-back-btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(108, 180, 238, 0.2), rgba(108, 180, 238, 0.1));
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.success-back-btn:hover {
    background: linear-gradient(135deg, rgba(108, 180, 238, 0.3), rgba(108, 180, 238, 0.2));
    transform: translateY(-2px);
}
