/* Reset & Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #3498db;
}

/* Main Layout (Flexbox for Grid + Sidebar) */
.main-content {
    display: flex;
    gap: 30px;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.game-section {
    flex: 3;
}

.sidebar {
    flex: 1;
    min-width: 300px;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.13);
}

.game-thumbnail {
    height: 180px;
    background-color: #ddd;
    overflow: hidden;
    position: relative;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 플레이 오버레이 */
.game-thumbnail::after {
    content: '▶  지금 플레이';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    letter-spacing: 0.05em;
}

.game-card:hover .game-thumbnail::after {
    opacity: 1;
}

.empty-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    background: #e9ecef;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.game-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    color: #2c3e50;
    font-weight: 700;
}

.game-desc {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.game-category {
    font-size: 0.75rem;
    background: #eaf4fd;
    color: #3498db;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 700;
    border: 1px solid #c8e6f9;
}

.game-play-btn {
    font-size: 0.82rem;
    color: #3498db;
    font-weight: 700;
    letter-spacing: 0.02em;
}
/* Sidebar Styles */
.sidebar {
    flex: 0 0 280px; /* 고정 너비 할당 */
}

.sidebar-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.sidebar-list li {
    margin-bottom: 10px;
}

.sidebar-list a {
    color: #444;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-list a:hover:not(.disabled) {
    background: #e9ecef;
    color: #3498db;
    border-left: 3px solid #3498db;
    transform: translateX(5px);
}

.sidebar-list a.disabled {
    color: #aaa;
    cursor: not-allowed;
    background: #f1f1f1;
}

/* Sidebar Ad Container */
/* ───────── GOOGLE ADS PLACEHOLDERS ───────── */
/* Layout consideration for ads: 
   - Ensure proper margins/paddings to prevent layout shift.
   - Set minimum height for placeholders to simulate ad space.
*/

/* Header Top Ad Container */
.ad-top-container {
    margin-top: 1.5rem;
}

.top-ad {
    width: 100%;
    min-height: 90px; /* Standard Leaderboard height */
    background: #e1e4e8;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #adb5bd;
    border-radius: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Sidebar Ad Container */
.sidebar-ad {
    width: 100%;
    min-height: 250px; /* Standard Medium Rectangle (300x250) */
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ced4da;
    border-radius: 5px;
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 10px 0;
}

/* Hero Section */
.hero {
    padding: 2rem 20px 0;
}

.hero-text {
    background: linear-gradient(135deg, #1a2a3a, #2980b9);
    border-radius: 14px;
    padding: 2.5rem 3rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    line-height: 1.3;
}

.hero-desc {
    font-size: 0.98rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.4rem;
}

.hero-btn {
    display: inline-block;
    background: #fff;
    color: #2c3e50;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 1.6rem;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.hero-btn:hover {
    background: #eaf4fd;
    transform: scale(1.04);
}

.hero-badge {
    flex-shrink: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 1.2rem 1.8rem;
    text-align: center;
}

.hero-badge .num {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.hero-badge .label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.3rem;
}

/* Info Section */
.info-section {
    margin-top: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.info-item {
    background: #fff;
    border-radius: 10px;
    padding: 1.4rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.info-item h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.info-item p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* Feedback Section */
.feedback-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.feedback-container {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.feedback-intro {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #eee;
}

#disqus_thread {
    min-height: 200px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    .sidebar {
        min-width: 100%;
    }
}

@media (max-width: 700px) {
    .hero-text {
        flex-direction: column;
        padding: 1.8rem 1.5rem;
        gap: 1.2rem;
    }
    .hero-title {
        font-size: 1.4rem;
    }
    .hero-badge {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    .nav ul {
        gap: 1rem;
    }
    .game-grid {
        grid-template-columns: 1fr;
    }
}
