:root {
    /* Colors - News Reader Theme */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    
    /* Dimensions */
    --header-height: 60px;
    --nav-height: 60px;
    --border-radius: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    overflow: hidden; /* Prevent body scroll, handle in #main-content */
    height: 100vh;
    width: 100vw;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px; /* Constrain width on desktop to look like mobile */
    margin: 0 auto;
    background-color: var(--background);
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.logo-container {
    height: 32px;
    display: flex;
    align-items: center;
}

.app-logo {
    height: 100%;
    width: auto;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:active {
    background-color: var(--background);
}

/* Main Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding-top: var(--header-height); /* Space for header */
    padding-bottom: calc(var(--nav-height) + 20px); /* Space for nav + extra */
    padding-left: 16px;
    padding-right: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.app-content::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.app-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Feed Section */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px 0 16px;
}

/* News Cards */
.news-card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.1s;
}

.news-card:active {
    transform: scale(0.98);
}

.card-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 16px;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: inline-block;
}

.category-tag.blue { color: #3b82f6; }
.category-tag.green { color: #10b981; }
.category-tag.red { color: #ef4444; }
.category-tag.purple { color: #a855f7; }

.news-card h2 {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* News Items (List) */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100px;
}

.item-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-content h3 {
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-image {
    width: 100px;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Gradients for placeholders since we don't have real images yet */
.placeholder-gradient { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.placeholder-gradient-2 { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); }
.placeholder-gradient-3 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.placeholder-gradient-4 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.placeholder-gradient-5 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

/* Bottom Navigation */
.bottom-nav {
    height: var(--nav-height);
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom); /* iOS iPhone X+ safe area */
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    gap: 4px;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item .material-icons-round {
    font-size: 24px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary-color);
}
