/* ========================================
   JAVZONE - MOBILE FIRST CSS (320px-767px)
   Clean, Fast, Professional
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.5;
    font-size: 14px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.logo img {
    height: 32px;
    width: auto;
    margin-right: 8px;
}

.logo span {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Search */
.search-container {
    margin: 16px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255,107,53,0.2);
}

.search-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    padding: 0 16px 20px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.video-item {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
    min-height: 160px;
}

.video-item:hover {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.video-info {
    padding: 8px;
}

.video-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
}

.video-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-views {
    color: #ff6b35;
    font-weight: 600;
}

/* Trending Carousel */
.trending-section {
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.section-title .icon {
    margin-right: 8px;
    font-size: 18px;
}

.trending-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.trending-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.trending-list::-webkit-scrollbar {
    height: 4px;
}

.trending-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 2px;
}

.trending-list::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 2px;
}

.trending-item {
    flex: 0 0 140px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.trending-item:hover {
    transform: translateY(-2px);
}

.trending-thumbnail {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.trending-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-info {
    padding: 8px;
}

.trending-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
}

.trending-meta {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

/* Categories */
.categories-section {
    margin-bottom: 24px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    background: #222;
}

.category-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.category-count {
    font-size: 10px;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination a {
    background: #1a1a1a;
    color: #ccc;
    border: 1px solid #333;
}

.pagination a:hover {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

.pagination .current {
    background: #ff6b35;
    color: #fff;
}

/* Footer */
.footer {
    background: #1a1a1a;
    padding: 20px 16px;
    margin-top: 40px;
    border-top: 1px solid #333;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ff6b35;
}

.footer-text {
    font-size: 11px;
    color: #666;
}

/* Ad Slots */
.ad-slot {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ad-slot-mobile {
    min-height: 50px;
}

.ad-slot-banner {
    min-height: 100px;
}

.ad-placeholder {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sidebar Video List */
.sidebar-video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-video-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.sidebar-video-item:hover {
    background: #222;
}

.sidebar-video-thumbnail {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-video-info {
    flex: 1;
    min-width: 0;
}

.sidebar-video-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    margin-bottom: 4px;
}

.sidebar-video-meta {
    font-size: 11px;
    color: #999;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .ad-slot {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}