/* ========================================
   VIEW PAGE UNIQUE STYLES - GameBoy.kr
   게시글 보기 페이지 전용 스타일
   ======================================== */

/* 기본 리셋 및 격리 */
.view-layout-container * {
    box-sizing: border-box;
}

/* 메인 레이아웃 컨테이너 */
.view-layout-container {
    display: grid !important;
    grid-template-columns: 280px 1fr 320px !important;
    grid-template-areas: "sidebar main actions" !important;
    gap: 1.5rem !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding: 1.5rem !important;
    align-items: start !important;
    width: 100% !important;
    background: #f8f9fa;
    min-height: 100vh;
}

/* 왼쪽 사이드바 */
.view-layout-container .sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    grid-area: sidebar !important;
    border: 1px solid #e9ecef;
}

.view-layout-container .sidebar-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 1rem;
}

.view-layout-container .sidebar h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 게시판 그룹 스타일 */
.view-layout-container .board-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.view-layout-container .board-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.view-layout-container .group-header {
    margin-bottom: 1rem;
}

.view-layout-container .group-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-layout-container .group-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.view-layout-container .group-info h4::before {
    content: '📁';
    font-size: 0.9rem;
}

.view-layout-container .group-count {
    font-size: 0.8rem;
    color: #6c757d;
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.view-layout-container .group-boards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.view-layout-container .board-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
    background: white;
    position: relative;
    overflow: hidden;
}

.view-layout-container .board-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.view-layout-container .board-link:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #667eea;
    border-color: #e9ecef;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.view-layout-container .board-link:hover::before {
    transform: scaleY(1);
}

.view-layout-container .board-link.current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.view-layout-container .board-link.current::before {
    transform: scaleY(1);
    background: rgba(255,255,255,0.3);
}

.view-layout-container .board-icon {
    margin-right: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.view-layout-container .board-icon i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.view-layout-container .board-link:hover .board-icon i,
.view-layout-container .board-link.current .board-icon i {
    opacity: 1;
}

.view-layout-container .board-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.view-layout-container .board-name {
    font-weight: 500;
    line-height: 1.2;
}

.view-layout-container .board-stats {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
}

/* 메인 컨텐츠 */
.view-layout-container .main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    grid-area: main !important;
    align-self: start !important;
    border: 1px solid #e9ecef;
}

/* 게시글 컨테이너 */
.view-layout-container .view-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* 게시글 헤더 */
.view-layout-container .view-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 2px solid #f8f9fa;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.view-layout-container .view-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
    word-break: keep-all;
}

/* 게시글 정보 */
.view-layout-container .post-info {
    padding: 1.5rem 2rem;
    background: white;
    border-bottom: 1px solid #f8f9fa;
}

.view-layout-container .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    align-items: center;
}

.view-layout-container .post-meta span {
    padding: 0.4rem 0.8rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.view-layout-container .post-meta .author {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    color: #495057;
    border-color: #bbdefb;
}

.view-layout-container .post-meta .date {
    background: linear-gradient(135deg, #fff3e0, #fce4ec);
    color: #e65100;
    border-color: #ffcc02;
}

.view-layout-container .post-meta .views {
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
    color: #2e7d32;
    border-color: #c8e6c9;
}

.view-layout-container .post-meta .secret {
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    color: #f57f17;
    border-color: #ffeb3b;
}

.view-layout-container .post-meta .notice {
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
    color: #c2185b;
    border-color: #e91e63;
}

/* 게시글 내용 */
.view-layout-container .post-content {
    background: white;
    padding: 2.5rem 2rem;
    line-height: 1.8;
    color: #2c3e50;
    font-size: 1rem;
    min-height: 200px;
    border-bottom: 1px solid #f8f9fa;
}

/* 첨부 파일 */
.view-layout-container .attached-files {
    margin: 0;
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.view-layout-container .attached-files h4 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-layout-container .files-list {
    display: grid;
    gap: 1rem;
}

.view-layout-container .attached-files .file-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.view-layout-container .attached-files .file-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.view-layout-container .image-file {
    text-align: center;
}

.view-layout-container .attached-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.view-layout-container .attached-image:hover {
    transform: scale(1.02);
}

.view-layout-container .image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.view-layout-container .regular-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-layout-container .regular-file .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-layout-container .file-icon {
    font-size: 2rem;
}

.view-layout-container .file-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.view-layout-container .file-name {
    font-weight: 600;
    color: #2c3e50;
}

.view-layout-container .file-size {
    font-size: 0.9rem;
    color: #6c757d;
}

.view-layout-container .download-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-layout-container .download-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 이전/다음 글 */
.view-layout-container .post-navigation {
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.view-layout-container .nav-item {
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    background: white;
    transition: all 0.3s ease;
}

.view-layout-container .nav-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.view-layout-container .nav-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.view-layout-container .nav-item a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
}

.view-layout-container .nav-item a:hover {
    color: #667eea;
}

/* 댓글 섹션 */
.view-layout-container .comments-section {
    background: white;
    padding: 2.5rem;
    border-bottom: 1px solid #e9ecef;
}

.view-layout-container .comments-section h3 {
    margin: 0 0 2rem 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-layout-container .comments-section h3::before {
    content: "💬";
    font-size: 1.2rem;
}

/* 댓글 작성 폼 */
.view-layout-container .comment-form {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.view-layout-container .comment-author {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.view-layout-container .comment-author:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.view-layout-container .comment-author-info {
    padding: 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-layout-container .comment-author-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.view-layout-container .comment-login-status {
    font-size: 0.8rem;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.view-layout-container .comment-form textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: white;
}

.view-layout-container .comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.view-layout-container .comment-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.view-layout-container .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6c757d;
    transition: color 0.3s ease;
}

.view-layout-container .checkbox-label:hover {
    color: #2c3e50;
}

.view-layout-container .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.view-layout-container .btn-comment {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-layout-container .btn-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 댓글 목록 */
.view-layout-container .comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.view-layout-container .comment-item {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.view-layout-container .comment-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.view-layout-container .comment-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 0 0 12px;
}

.view-layout-container .comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.view-layout-container .comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-layout-container .comment-author::before {
    content: "👤";
    font-size: 0.9rem;
    opacity: 0.7;
}

.view-layout-container .comment-date {
    color: #6c757d;
    font-size: 0.85rem;
    margin-left: auto;
}

.view-layout-container .comment-secret {
    background: #fff3cd;
    color: #856404;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-layout-container .comment-content {
    line-height: 1.6;
    color: #444;
    font-size: 0.95rem;
    padding-left: 1.5rem;
    position: relative;
}

.view-layout-container .comment-content::before {
    content: "💭";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* 비밀 댓글 플레이스홀더 스타일 */
.view-layout-container .secret-comment-placeholder {
    display: inline-block;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.view-layout-container .secret-comment-placeholder::before {
    content: "🔒";
    margin-right: 8px;
    font-size: 1rem;
}

/* 오른쪽 액션 사이드바 */
.view-layout-container .action-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    grid-area: actions !important;
    border: 1px solid #e9ecef;
}

.view-layout-container .action-sidebar h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 1rem;
}

/* 액션 버튼들 */
.view-layout-container .view-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.view-layout-container .btn-back,
.view-layout-container .btn-write,
.view-layout-container .btn-edit,
.view-layout-container .btn-delete {
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-layout-container .btn-back {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.view-layout-container .btn-write {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.view-layout-container .btn-edit {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #212529;
}

.view-layout-container .btn-delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.view-layout-container .btn-back:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.view-layout-container .btn-write:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.view-layout-container .btn-edit:hover {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.view-layout-container .btn-delete:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* 관리자 액션 */
.view-layout-container .admin-actions {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.view-layout-container .admin-actions h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-layout-container .admin-actions .notice-btn {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    padding: 0.7rem 1rem !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    width: 100% !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2) !important;
}

.view-layout-container .admin-actions .notice-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3) !important;
}

/* 인기글 토글 */
.view-layout-container .popular-toggle-container {
    display: flex;
    align-items: center;
}

.view-layout-container .popular-toggle-view {
    display: none;
}

.view-layout-container .popular-label-view {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    width: 100%;
    justify-content: center;
}

.view-layout-container .popular-label-view:hover {
    border-color: #ffd700;
    background: #fff9e6;
    color: #2c3e50;
}

.view-layout-container .popular-toggle-view:checked + .popular-label-view {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.view-layout-container .popular-icon {
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.view-layout-container .popular-toggle-view:checked + .popular-label-view .popular-icon {
    opacity: 1;
}

/* 인기글 사이드바 */
.view-layout-container .popular-sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.view-layout-container .popular-sidebar h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-layout-container .popular-posts {
    display: flex;
    flex-direction: column;
        gap: 1rem;
}

.view-layout-container .popular-post-item {
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(238, 90, 36, 0.05));
    border-radius: 8px;
    border: 2px solid #ff6b6b;
    border-left: 4px solid #ff6b6b;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.1);
    position: relative;
    overflow: hidden;
}

.view-layout-container .popular-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.view-layout-container .popular-post-item:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(238, 90, 36, 0.1));
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    border-color: #ee5a24;
}

.view-layout-container .popular-post-title {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.view-layout-container .popular-post-title:hover {
    color: #667eea;
}

.view-layout-container .popular-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.view-layout-container .popular-post-author {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.view-layout-container .popular-post-board {
    font-size: 0.7rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.view-layout-container .popular-post-date {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: right;
}

.view-layout-container .no-popular-posts {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.view-layout-container .no-popular-posts p {
    margin-bottom: 0.5rem;
}

.view-layout-container .admin-note {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 알림 메시지 */
.view-layout-container .alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.view-layout-container .alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .view-layout-container {
        grid-template-columns: 250px 1fr 280px !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
}

@media (max-width: 768px) {
    .view-layout-container {
        grid-template-columns: 1fr !important;
        grid-template-areas: "main" "sidebar" "actions" !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }

    .view-layout-container .sidebar {
        order: 2;
    }

    .view-layout-container .action-sidebar {
        order: 3;
    }

    .view-layout-container .main-content {
        order: 1;
    }

    .view-layout-container .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .view-layout-container .comment-options {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .view-layout-container .popular-label-view .popular-text {
        display: none;
    }

    .view-layout-container .popular-label-view {
        padding: 0.6rem 0.8rem;
    }
}

/* 스크롤바 스타일 */
.view-layout-container ::-webkit-scrollbar {
    width: 6px;
}

.view-layout-container ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.view-layout-container ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.view-layout-container ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   미디어 링크 섹션 스타일
   ======================================== */

.media-links {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.media-links h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 유튜브 플레이어 */
.youtube-player {
    margin-bottom: 32px;
}

.youtube-player:last-child {
    margin-bottom: 0;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 비율 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 인스타그램 포스트 */
.instagram-post {
    margin-bottom: 32px;
}

.instagram-post:last-child {
    margin-bottom: 0;
}

.instagram-container {
    display: flex;
    justify-content: center;
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    min-height: 400px;
}

.instagram-container iframe {
    max-width: 540px;
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
}

/* 인스타그램 oEmbed 스타일 */
.instagram-oembed {
    max-width: 540px;
    margin: 0 auto;
}

.instagram-oembed blockquote {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 인스타그램 iframe 컨테이너 */
.instagram-iframe-container {
    position: relative;
    min-height: 480px;
    max-width: 400px;
    margin: 0 auto;
}

.instagram-iframe-container iframe {
    width: 100%;
    height: 480px;
    border: none;
    border-radius: 8px;
}

/* 인스타그램 로딩 및 Fallback 스타일 */
.instagram-embed-wrapper {
    position: relative;
    min-height: 400px;
}

.instagram-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.instagram-fallback {
    display: none;
}

.instagram-preview {
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.instagram-preview h5 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.instagram-preview p {
    margin: 0 0 20px 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.instagram-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.instagram-link-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

/* 새로운 인스타그램 프리뷰 스타일 */
.instagram-enhanced-viewer {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.instagram-custom-preview {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.instagram-header {
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    padding: 16px;
    color: white;
}

.instagram-type-badge {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instagram-thumbnail-container {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.instagram-thumbnail {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.instagram-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.instagram-play-overlay:hover {
    background: rgba(0,0,0,0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

.instagram-description {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.instagram-description p {
    margin: 0;
    color: #4a5568;
    line-height: 1.5;
    font-size: 0.95rem;
}

.instagram-actions {
    padding: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.instagram-view-btn, .instagram-direct-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.instagram-view-btn {
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
}

.instagram-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240,148,51,0.4);
    color: white;
    text-decoration: none;
}

.instagram-direct-btn {
    background: #667eea;
    color: white;
}

.instagram-direct-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* 인스타그램 모달 스타일 */
.instagram-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
}

.instagram-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.instagram-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
}

.instagram-modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #4a5568;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.instagram-modal-body {
    padding: 0;
    min-height: 400px;
}

.instagram-modal-body iframe {
    width: 100%;
    min-height: 600px;
    border: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .instagram-actions {
        flex-direction: column;
    }
    
    .instagram-view-btn, .instagram-direct-btn {
        min-width: auto;
    }
    
    .instagram-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .instagram-modal-body iframe {
        min-height: 500px;
    }
}

/* 오류 메시지 */
.media-links p {
    color: #e53e3e;
    font-size: 0.9rem;
    background: #fed7d7;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #e53e3e;
    margin: 8px 0;
}

.media-links a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}

.media-links a:hover {
    text-decoration: underline;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .media-links {
        margin: 16px 0;
        padding: 16px;
        border-radius: 8px;
    }
    
    .video-container {
        border-radius: 6px;
    }
    
    .instagram-container {
        padding: 12px;
        min-height: 300px;
    }
    
    .instagram-container iframe {
        height: 500px;
    }
}