/* ============================================
   원브레인 라디오 스타일
   작성일: 2026-04-08
   ============================================ */

:root {
    --radio-primary: #2196F3;
    --radio-secondary: #1976D2;
    --radio-success: #50C878;
    --radio-danger: #FF6B6B;
    --radio-warning: #FFB84D;
    --radio-bg: #F8F9FA;
    --radio-card-bg: #FFFFFF;
    --radio-text: #2C3E50;
    --radio-text-secondary: #6C757D;
    --radio-border: #DEE2E6;
}

/* ===== 메인 컨테이너 ===== */
.radio-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--radio-bg);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* ===== 헤더 ===== */
.radio-header {
    background: linear-gradient(135deg, var(--radio-primary), var(--radio-secondary));
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.radio-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.radio-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ===== 카테고리 탭 ===== */
.radio-tabs {
    display: flex;
    background: white;
    padding: 10px 15px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--radio-border);
    -webkit-overflow-scrolling: touch;
}

.radio-tab {
    padding: 10px 20px;
    margin-right: 5px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--radio-text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.radio-tab.active {
    color: var(--radio-primary);
    border-bottom-color: var(--radio-primary);
}

.radio-tab:hover {
    color: var(--radio-primary);
}

/* ===== 콘텐츠 리스트 ===== */
.radio-list {
    padding: 15px;
}

.radio-item {
    background: var(--radio-card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.radio-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.radio-item-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--radio-primary), var(--radio-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.radio-item-info {
    flex: 1;
    min-width: 0;
}

.radio-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--radio-text);
    margin: 0 0 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.radio-item-meta {
    font-size: 13px;
    color: var(--radio-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-item-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.radio-item-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--radio-primary);
    border: none;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.radio-item-play:hover {
    background: var(--radio-secondary);
    transform: scale(1.1);
}

/* ===== 플로팅 플레이어 ===== */
.radio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    max-width: 600px;
    margin: 0 auto;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.radio-player.active {
    transform: translateY(0);
}

.radio-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.radio-player-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--radio-primary), var(--radio-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.radio-player-info {
    flex: 1;
    min-width: 0;
}

.radio-player-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--radio-text);
    margin: 0 0 3px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.radio-player-category {
    font-size: 13px;
    color: var(--radio-text-secondary);
}

.radio-player-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--radio-bg);
    border: none;
    color: var(--radio-text-secondary);
    font-size: 18px;
    cursor: pointer;
}

.radio-player-progress {
    width: 100%;
    height: 4px;
    background: var(--radio-border);
    border-radius: 2px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.radio-player-progress-bar {
    height: 100%;
    background: var(--radio-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.radio-player-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--radio-text-secondary);
    margin-bottom: 10px;
}

.radio-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.radio-player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--radio-bg);
    border: none;
    color: var(--radio-text);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-player-btn:hover {
    background: var(--radio-border);
}

.radio-player-btn.play-pause {
    width: 56px;
    height: 56px;
    background: var(--radio-primary);
    color: white;
    font-size: 24px;
}

.radio-player-btn.play-pause:hover {
    background: var(--radio-secondary);
    transform: scale(1.05);
}

/* ===== 상세 페이지 ===== */
.radio-detail {
    padding: 20px;
}

.radio-detail-cover {
    width: 100%;
    aspect-ratio: 1;
    max-width: 300px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--radio-primary), var(--radio-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.radio-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--radio-text);
    margin: 0 0 10px 0;
    text-align: center;
}

.radio-detail-meta {
    text-align: center;
    color: var(--radio-text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.radio-detail-description {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--radio-text);
}

/* ===== 댓글 섹션 ===== */
.radio-comments {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.radio-comments-header {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: var(--radio-text);
}

.radio-comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.radio-comment-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--radio-border);
    border-radius: 8px;
    font-size: 14px;
    resize: none;
}

.radio-comment-submit {
    padding: 12px 20px;
    background: var(--radio-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-comment-submit:hover {
    background: var(--radio-secondary);
}

.radio-comment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-comment {
    padding: 12px;
    background: var(--radio-bg);
    border-radius: 8px;
}

.radio-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.radio-comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--radio-text);
}

.radio-comment-date {
    font-size: 12px;
    color: var(--radio-text-secondary);
}

.radio-comment-content {
    font-size: 14px;
    color: var(--radio-text);
    line-height: 1.5;
}

/* ===== 질문하기 버튼 ===== */
.radio-fab {
    position: fixed;
    bottom: 110px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--radio-success);
    color: white;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 999;
}

.radio-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* ===== 상단바 시청자 참여 버튼 ===== */
.radio-header-participate-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 6px 12px;
    margin-left: auto;
    background: white;
    border: none;
    border-radius: 14px;
    color: #ea580c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.radio-header-participate-btn:hover {
    background: #fff7ed;
    box-shadow: 0 2px 6px rgba(234,88,12,0.15);
}

.radio-header-participate-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(234,88,12,0.2);
}

/* ===== 질문 모달 ===== */
.radio-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.radio-modal.active {
    display: flex;
}

.radio-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.radio-modal-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--radio-text);
    margin: 0 0 20px 0;
}

.radio-form-group {
    margin-bottom: 15px;
}

.radio-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--radio-text);
    margin-bottom: 8px;
}

.radio-form-input,
.radio-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--radio-border);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.radio-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--radio-text-secondary);
}

.radio-form-checkbox input {
    width: 18px;
    height: 18px;
}

.radio-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.radio-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-btn-primary {
    background: var(--radio-primary);
    color: white;
}

.radio-btn-primary:hover {
    background: var(--radio-secondary);
}

.radio-btn-secondary {
    background: var(--radio-bg);
    color: var(--radio-text);
}

.radio-btn-secondary:hover {
    background: var(--radio-border);
}

/* ===== 로딩 & 빈 상태 ===== */
.radio-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--radio-text-secondary);
}

.radio-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--radio-border);
    border-top-color: var(--radio-primary);
    border-radius: 50%;
    animation: radio-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

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

.radio-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--radio-text-secondary);
}

.radio-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.radio-empty-text {
    font-size: 16px;
}

/* ===== 관리자 패널 (admin.html) ===== */
.admin-radio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-radio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-radio-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-radio-stat-label {
    font-size: 13px;
    color: var(--radio-text-secondary);
    margin-bottom: 8px;
}

.admin-radio-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--radio-text);
}

.admin-radio-categories {
    margin-bottom: 30px;
}

.admin-radio-category-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-radio-category-icon {
    font-size: 32px;
}

.admin-radio-category-info {
    flex: 1;
}

.admin-radio-category-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.admin-radio-category-count {
    font-size: 13px;
    color: var(--radio-text-secondary);
}

.admin-radio-category-actions {
    display: flex;
    gap: 8px;
}

/* ===== 더보기 버튼 ===== */
.load-more-container {
    padding: 10px 0 20px;
}

.load-more-btn {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--radio-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.load-more-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: var(--radio-primary);
}

.load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.load-more-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.load-more-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--radio-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-more-icon {
    font-size: 14px;
    color: var(--radio-primary);
    transition: transform 0.3s ease;
}

.load-more-btn:hover .load-more-icon {
    transform: translateY(2px);
}

.load-more-count {
    font-size: 13px;
    color: var(--radio-text-secondary);
}

/* 로딩 상태 */
.load-more-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--radio-text-secondary);
}

.load-more-spinner {
    font-size: 16px;
    animation: radio-spin 1s linear infinite;
}

/* 완료 상태 */
.load-more-complete {
    width: 100%;
    padding: 16px;
    background: var(--radio-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.load-more-complete-icon {
    font-size: 16px;
    color: var(--radio-success);
    font-weight: bold;
}

.load-more-complete-text {
    font-size: 14px;
    color: var(--radio-text-secondary);
}

/* ===== 반응형 ===== */
@media (max-width: 600px) {
    .radio-header h1 {
        font-size: 20px;
    }
    
    .radio-detail-cover {
        font-size: 60px;
    }
    
    .radio-fab {
        bottom: 90px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .load-more-btn {
        padding: 14px 16px;
    }
    
    .load-more-text {
        font-size: 14px;
    }
    
    .load-more-count {
        font-size: 12px;
    }
}
