/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498db;
}

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

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.site-title a {
    color: inherit;
}

/* Navigation - CRITICAL MOBILE REQUIREMENT */
.main-nav {
    display: flex;
    gap: 5px;
}

.main-nav a {
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 15px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #3498db;
    color: #fff;
}

/* Mobile Navigation - MUST stay in single line, NO wrapping */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 10px;
    }

    .site-title {
        font-size: 20px;
    }

    .main-nav {
        width: 100%;
        display: flex;
        flex-wrap: nowrap; /* NO line wrapping */
        overflow-x: hidden; /* NO horizontal scrolling */
        gap: 2px;
    }

    .main-nav a {
        flex: 1 1 0; /* Equal width distribution */
        min-width: 0; /* Allow shrinking below content size */
        padding: 8px 5px;
        font-size: 13px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis; /* Show ... if text too long */
    }
}

/* Main Content */
main {
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

.section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.page-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-desc {
    font-size: 16px;
    color: #666;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.thumb-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

.video-meta {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.video-meta span {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-genre {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.video-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

@media (max-width: 768px) {
    .entrance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.entrance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    color: #fff;
    transition: transform 0.3s ease;
}

.entrance-card:hover {
    transform: scale(1.05);
}

.entrance-card a {
    color: #fff;
}

.entrance-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.entrance-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* Detail Page */
.detail-page {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        gap: 20px;
    }
}

.detail-poster {
    flex-shrink: 0;
    width: 280px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .detail-poster {
        width: 100%;
        height: 300px;
    }
}

.poster-placeholder {
    font-size: 72px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 28px;
    }
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.meta-item {
    font-size: 15px;
    color: #555;
}

.meta-item strong {
    color: #333;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.detail-oneline {
    padding: 15px;
    background: #fff9c4;
    border-left: 4px solid #fbc02d;
    border-radius: 4px;
}

.detail-oneline p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.detail-section {
    margin-bottom: 35px;
}

.detail-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.detail-summary,
.detail-review {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 20px;
    margin-top: 50px;
}

footer .container {
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-keywords {
    font-size: 12px;
    color: #95a5a6;
}
