* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overflow: hidden; 
}

/* The vertical swipe track */
.feed-container {
    display: flex;
    flex-direction: column; /* Changed to column for vertical stacking */
    height: 100dvh;
    width: 100vw;
    overflow-y: scroll; /* Scroll up and down */
    overflow-x: hidden;
    scroll-snap-type: y mandatory; /* Locks the vertical swipe */
    scroll-behavior: smooth;
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.loading {
    width: 100vw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #888;
}

/* Full-screen TikTok style cards */
.article-card {
    flex: 0 0 100dvh; 
    width: 100vw;
    scroll-snap-align: start; 
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #111;
    display: flex;
    align-items: flex-end; /* Pushes the text to the bottom */
}

/* Dark gradient so the text pops against any image */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 40%, transparent 100%);
    z-index: 1;
}

.article-content {
    position: relative;
    z-index: 2;
    padding: 20px 80px 40px 20px; /* The 80px on the right leaves room for your buttons! */
    width: 100%;
}

.source {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: bold;
}

.title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.description {
    font-size: 1rem;
    line-height: 1.5;
    color: #ccc;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limits snippet to 4 lines so it doesn't clutter the screen */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

/* Smaller, stacked buttons on the bottom right */
.action-bar {
    position: absolute;
    bottom: 40px;
    right: 15px; /* Pinned to the right side */
    display: flex;
    flex-direction: column; /* Stacks them vertically */
    gap: 15px;
    z-index: 10;
}

.action-btn {
    pointer-events: auto; 
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 50px; /* Made smaller */
    height: 50px; /* Made smaller */
    color: white;
    font-size: 1.3rem; /* Scaled down icon */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.action-btn:active {
    transform: scale(0.9);
}

.btn-dislike { color: #e74c3c; }
.btn-like { color: #2ecc71; }
.btn-refresh { color: #3498db; }