* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - White & Blue Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #0ea5e9;
    --danger-color: #ef4444;
    --success-color: #10b981;
    
    /* Background Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    
    /* Text Colors - Dark for Light Background */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Border & Shadow */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(37, 99, 235, 0.15);
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    z-index: 1000;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(37, 99, 235, 0.08);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.nav-list {
    list-style: none;
}

.nav-section-title {
    padding: 20px 20px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
}

.nav-item {
    margin: 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active .nav-link {
    background: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
}

/* Favorite Icon */
.favorite-icon {
    margin-left: auto;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 4px;
    z-index: 10;
}

.favorite-icon:hover {
    color: var(--text-secondary);
    transform: scale(1.1);
}

.favorite-icon.active {
    color: var(--text-secondary);
    font-weight: 900;
}

.favorite-icon.active::before {
    content: "\f005";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Active nav item with favorite */
.nav-item.active .favorite-icon {
    color: rgba(255, 255, 255, 0.6);
}

.nav-item.active .favorite-icon.active {
    color: white;
}

.nav-item.active .favorite-icon:hover {
    color: white;
    transform: scale(1.1);
}

.nav-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-item.active .nav-badge {
    background: white;
    color: var(--primary-color);
}

.nav-item:not(.active) .nav-badge {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-link:hover .nav-badge {
    background: white;
    color: var(--primary-color);
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .nav-badge {
    display: none;
}

.sidebar.collapsed .favorite-icon {
    display: none;
}

/* Tooltip for collapsed sidebar */
.nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
}

/* Sidebar Stats */
.sidebar-stats {
    margin-top: auto;
    padding: 12px 8px 16px 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-stats {
    display: none !important;
}

/* Stats Header - Visit Counter (2x2 grid) */
.sidebar-stats-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.visit-counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.visit-counter-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.visit-counter-value {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1;
}

/* Stats Grid Container (2x2 grid like visit counter) */
.sidebar-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sidebar-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    transition: var(--transition-fast);
    gap: 4px;
}

.sidebar-stat-card:hover .sidebar-stat-value {
    color: var(--primary-color);
}

.sidebar-stat-icon {
    display: none !important;
}

.sidebar-stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

.sidebar-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    line-height: 1;
    transition: var(--transition-fast);
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar.collapsed .user-info {
    display: none;
}

/* Main Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Header */
.top-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 30px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(10px);
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: start;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

.unread-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    cursor: default;
    transition: var(--transition-fast);
    min-width: 80px;
}

.unread-badge i {
    font-size: 1.1rem;
    animation: bellRing 2s ease-in-out infinite;
}

.unread-count {
    font-size: 1rem;
    font-weight: 700;
}

/* Unread badge empty state (0 unread) */
.unread-badge-empty {
    background: #94a3b8 !important; /* Gray color */
    box-shadow: 0 2px 4px rgba(148, 163, 184, 0.2) !important;
}

.unread-badge-empty i {
    animation: none !important; /* Remove bell animation */
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 400px;
    transition: var(--transition-fast);
    justify-self: center;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-container i {
    color: var(--text-secondary);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Main Content */
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1 0 auto; /* 콘텐츠가 남은 공간을 채우고 축소되지 않도록 */
    padding: 30px;
    display: flex;
    flex-direction: column;
    /* min-height 제거 - news-grid에서 처리 */
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

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

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    min-height: calc(100vh - 220px); /* 푸터가 올라오지 않도록 */
}

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

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

.loading p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Error Message */
.error-message {
    background: var(--card-bg);
    border: 2px solid var(--danger-color);
    color: var(--text-primary);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 40px 0;
    min-height: calc(100vh - 300px); /* 푸터가 올라오지 않도록 */
}

.error-message i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 15px;
}

/* News Grid - CSS Grid Layout (전체 너비 활용) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    width: 100%;
    padding: 24px; /* 상하좌우 여백 추가 (카드 간격과 동일) */
    min-height: calc(100vh - 220px); /* 헤더(80px) + 푸터(80px) + 여유(60px) */
    flex: 1; /* 남은 공간을 모두 차지 */
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    /* 렌더링 최적화 */
    contain: layout style paint;
    content-visibility: auto;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* 읽은 카드 스타일 */
.news-card.read {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.news-card.read:hover {
    opacity: 0.7;
}

/* 읽은 카드의 소스 배지 */
.news-card.read .news-source {
    background: #94a3b8;  /* 회색 배경 */
    color: white;
}

/* 이미지가 없는 카드는 컨텐츠만 */
.news-card.no-image {
    /* 이미지 영역 없이 바로 컨텐츠 시작 */
}

.news-card.no-image .news-content {
    /* 이미지가 없을 때 상단 패딩 추가 */
    padding-top: 24px;
}

.news-image-container {
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.placeholder-icon {
    font-size: 3rem;
    color: #2563eb;
    opacity: 0.3;
    margin: 0;
    line-height: 1;
}

.placeholder-text {
    margin: 10px 0 0 0;
    padding: 0;
    color: #64748b;
    font-size: 0.9rem;
    opacity: 0.6;
    line-height: 1.2;
}

/* 실제 이미지 */
.news-image {
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    /* 이미지 렌더링 최적화 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    will-change: transform;
    content-visibility: auto;
}

/* 이미지가 있을 때 배경 변경 */
.news-image-container.has-image {
    background: var(--bg-secondary);
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-source {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.news-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.news-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-link {
    display: none;
}

/* Load More - 무한 스크롤로 숨김 */
.load-more-container {
    text-align: center;
    padding: 20px 0;
    display: none !important;  /* 무한 스크롤 사용 시 숨김 */
}

.btn-load-more {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-load-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.infinite-scroll-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    margin-top: auto;
    flex-shrink: 0; /* 푸터가 축소되지 않도록 */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-ceo {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-container {
        min-width: 200px;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar-stats {
        padding: 10px 6px 14px 6px;
        gap: 8px;
    }
    
    .sidebar-stats-header {
        padding-bottom: 8px;
        gap: 6px;
    }
    
    .sidebar-stats-grid {
        gap: 6px;
    }
    
    .visit-counter-label {
        font-size: 0.65rem;
    }
    
    .visit-counter-value {
        font-size: 1.1rem;
    }
    
    .sidebar-stat-label {
        font-size: 0.65rem;
    }
    
    .sidebar-stat-value {
        font-size: 1.1rem;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar.collapsed ~ .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .search-container {
        display: none;
    }
    
    .top-header {
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
    }
    
    .header-left {
        justify-self: auto;
    }
    
    .header-right {
        justify-self: auto;
        margin-left: auto;
    }

    .unread-badge {
        padding: 8px 12px;
        min-width: 60px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .unread-badge i {
        font-size: 1rem;
    }

    .unread-count {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
}

/* CSS Grid Responsive - 전체 너비 활용 */
@media (min-width: 2560px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (min-width: 1920px) and (max-width: 2559px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .news-card {
        width: calc(33.333% - 16px);  /* 3열 */
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .news-card {
        width: calc(50% - 12px);  /* 2열 */
    }
}

@media (max-width: 479px) {
    .news-card {
        width: 100%;  /* 1열 */
    }
}

/* ====================================
   Ad Cards (Google AdSense)
   ==================================== */

.ad-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.ad-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    position: relative;
}

.ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;  /* 왼쪽 상단으로 변경 */
    background: var(--primary-color);  /* 뉴스 소스 배지와 동일한 파란색 */
    color: white;
    padding: 5px 12px;  /* 뉴스 소스 배지와 동일한 패딩 */
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.ad-badge i {
    font-size: 0.9rem;
}

/* AdSense 광고 컨테이너 */
.adsbygoogle {
    display: block;
    width: 100%;
    min-height: 250px;
    background: var(--bg-primary);
}

/* 광고 승인 전 플레이스홀더 - 깔끔한 회색 박스 */
.ad-card .ad-content {
    background: #f5f5f5;
    min-height: 250px;
}

/* 광고가 로드되면 배경 제거 */
.ad-card:has(.adsbygoogle[data-ad-status="filled"]) .ad-content {
    background: transparent;
}
