
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.history-actions {
    display: flex;
    gap: 12px;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.history-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}
.history-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.history-thumbnail {
    width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-input);
    flex-shrink: 0;
    position: relative;
}
.history-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.history-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16213e, #1a1a2e);
}
.history-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.history-info {
    flex: 1;
    min-width: 0;
}
.history-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.history-title a {
    color: inherit;
    text-decoration: none;
}
.history-title a:hover {
    color: var(--primary);
}
.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.history-broadcaster {
    display: flex;
    align-items: center;
    gap: 8px;
}
.history-broadcaster-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-input);
    overflow: hidden;
}
.history-broadcaster a {
    color: var(--primary);
    text-decoration: none;
}
.history-broadcaster a:hover {
    text-decoration: underline;
}
.history-date {
    color: var(--text-muted);
}
.history-delete {
    flex-shrink: 0;
    padding: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition-fast);
}
.history-delete:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--primary);
}
.empty-history {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-history svg {
    opacity: 0.3;
    margin-bottom: 16px;
}
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.confirm-modal.show {
    opacity: 1;
    visibility: visible;
}
.confirm-dialog {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}
.confirm-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.confirm-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
    }
    .history-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}
    


/* Tier 1-D: 購入履歴セクション */
.purchase-history-header {
    margin-top: 32px;
}
.purchase-item {
    align-items: center;
}
.purchase-price {
    color: var(--pink, #ff3ea0);
    font-weight: 600;
    margin-left: 8px;
}
.purchase-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Tier 1-E: 購入履歴のダウンロード動線 + 永続性表示 */
.purchase-help {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.purchase-help strong { color: #4caf50; }
.purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.purchase-download-btn,
.purchase-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .purchase-actions { flex-direction: row; flex-wrap: wrap; }
}
