/* ========================================
   偏好設定頁面樣式
   ======================================== */

.news-feed.preferences-page {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.preferences-container {
    max-width: 500px;
    margin: 60px auto 0;
}

.preferences-card {
    background-color: white;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    text-align: center;
}

.preferences-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.preferences-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.preferences-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 主題列表 */
.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.loading-text {
    color: #9ca3af;
    font-size: 14px;
}

.error-text {
    color: #ef4444;
    font-size: 14px;
}

/* 主題選項 */
.topic-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.topic-option:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.topic-option.selected {
    background-color: #ede9fe;
    border-color: #8b5cf6;
    color: #6d28d9;
}

.topic-option.disabled {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.topic-option.disabled:hover,
.topic-option.disabled:active,
.topic-option.disabled:focus {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    transform: none !important;
}

.topic-option.disabled.selected {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
}

/* 自訂主題 - 永久反灰 */
.topic-option.coming-soon {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.topic-option.coming-soon:hover,
.topic-option.coming-soon:active {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

.topic-option.coming-soon .topic-name {
    font-style: italic;
}

.topic-option input[type="checkbox"] {
    display: none;
}

.topic-emoji {
    font-size: 18px;
}

.topic-name {
    font-weight: 500;
}

/* 儲存按鈕 */
.save-preferences-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    width: 100%;
    max-width: 200px;
}

.save-preferences-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.save-preferences-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.save-preferences-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* 狀態訊息 */
.preferences-status {
    margin-top: 16px;
    font-size: 14px;
    min-height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .preferences-container {
        margin-top: 40px;
        padding: 0 10px;
    }
    
    .preferences-card {
        padding: 24px 16px;
    }
    
    .topic-option {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .save-preferences-btn {
        max-width: 100%;
    }
}
