* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, 'Segoe UI', 'Tamil', 'Latha', sans-serif;
    background: #000;
    overflow: hidden;
    height: 100vh;
}

/* Floating Menu Button */
.menu-floating-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    color: #FF9933;
    border: 2px solid #FF9933;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.menu-floating-btn:active {
    transform: scale(0.95);
    background: #FF9933;
    color: #000;
}

/* Collapsible Header */
.tn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
    color: #000;
    padding: 12px 18px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.tn-header.expanded {
    transform: translateY(0);
}

.tn-header.collapsed {
    transform: translateY(-100%);
}

.header-content h1 {
    font-size: 18px;
    font-weight: bold;
}

.header-content h2 {
    font-size: 12px;
    opacity: 0.9;
}

.live-badge {
    display: inline-block;
    background: #ff0000;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-top: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-controls {
    display: flex;
    gap: 8px;
}

.filter-btn, .view-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

/* Active Filter Display */
.active-filter {
    position: fixed;
    top: 12px;
    left: 15px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 25px;
    z-index: 999;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #FF9933;
    pointer-events: auto;
}

.clear-filter-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

/* Reels Container - Strict Snap Scroll */
.reels-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scroll-snap-stop: always;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Disable momentum scrolling for strict control */
.reels-container {
    scroll-snap-type: y mandatory;
    scroll-snap-stop: always;
    scroll-snap-points-y: repeat(100vh);
}

/* Reel Card - Strict snap to viewport */
.reel-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
}

/* Image Container - Top 25% */
.reel-image-container {
    position: relative;
    height: 28%;
    min-height: 180px;
    max-height: 250px;
    overflow: hidden;
    background: #1a1a1a;
    flex-shrink: 0;
}

.reel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Container - Bottom 75% */
.reel-content-container {
    flex: 1;
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* News Titles - LARGER FONTS */
.tamil-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.35;
    color: #FF9933;
}

.english-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    color: white;
}

/* News Summary - 10 LINES with LARGER FONT */
.news-summary {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta Information - LARGER FONTS */
.news-meta {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    font-size: 13px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.location-badge {
    background: rgba(255,153,51,0.25);
    color: #FF9933;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
}

.source-badge {
    background: rgba(255,255,255,0.12);
    color: #ccc;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    overflow-y: auto;
}

.modal.show {
    display: block;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 25px;
    max-width: 500px;
    margin: 50px auto;
    color: white;
    position: relative;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.modal-header h3 {
    font-size: 22px;
    color: #FF9933;
}

.modal-header h4 {
    font-size: 14px;
    opacity: 0.8;
}

.modal-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ff0000;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin: 20px 0;
    max-height: 350px;
    overflow-y: auto;
}

.city-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    font-weight: 500;
}

.city-btn:active {
    background: #FF9933;
}

.close-bottom-btn {
    width: 100%;
    background: #ff0000;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

/* Loading Spinner */
.loading {
    text-align: center;
    color: white;
    padding: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #FF9933;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No News Message */
.no-news {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.no-news h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.retry-btn {
    background: #FF9933;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .reels-container {
        max-width: 450px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .tn-header {
        max-width: 450px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
    
    .tn-header.expanded {
        transform: translateX(-50%) translateY(0);
    }
    
    .tn-header.collapsed {
        transform: translateX(-50%) translateY(-100%);
    }
    
    .menu-floating-btn {
        right: calc(50% - 225px + 15px);
    }
    
    .active-filter {
        left: calc(50% - 225px + 15px);
    }
    
    /* Larger fonts for desktop */
    .tamil-title {
        font-size: 26px;
    }
    
    .english-title {
        font-size: 22px;
    }
    
    .news-summary {
        font-size: 17px;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .menu-floating-btn {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }
    
    .active-filter {
        top: 12px;
        left: 12px;
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .reel-image-container {
        height: 28%;
        min-height: 170px;
    }
    
    .reel-content-container {
        padding: 16px;
    }
    
    .tamil-title {
        font-size: 22px;
    }
    
    .english-title {
        font-size: 18px;
    }
    
    .news-summary {
        font-size: 15px;
        line-height: 1.55;
    }
    
    .news-meta {
        font-size: 12px;
        gap: 10px;
    }
    
    .location-badge, .source-badge {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Small phones (iPhone SE, etc.) */
@media (max-width: 380px) {
    .tamil-title {
        font-size: 20px;
    }
    
    .english-title {
        font-size: 16px;
    }
    
    .news-summary {
        font-size: 14px;
    }
    
    .reel-content-container {
        padding: 14px;
    }
}

/* Hide scrollbar but keep functionality */
.reels-container::-webkit-scrollbar {
    width: 3px;
}

.reels-container::-webkit-scrollbar-track {
    background: #222;
}

.reels-container::-webkit-scrollbar-thumb {
    background: #FF9933;
    border-radius: 3px;
}

/* Prevent any scroll leakage */
body {
    touch-action: pan-y pinch-zoom;
}