* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    min-height: 100vh;
}

/* ========================================
   CLEAN AUTH SECTION
   ======================================== */

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background: #ffffff;
}

.auth-background {
    position: absolute;
    inset: 0;
    background: #f8fafc;
}

.gradient-orb {
    display: none;
}

.auth-card {
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 16px;
    padding: 60px 50px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 48px;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.form-container {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.form-container.active {
    display: block;
}

.form-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 32px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 1rem;
}

.input-group input {
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    font-family: inherit;
    color: #0f172a;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-hint {
    font-size: 0.8rem;
    color: #64748b;
}

.btn-primary {
    padding: 14px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.form-footer p {
    color: #64748b;
    font-size: 0.95rem;
}

.link-accent {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link-accent:hover {
    color: #2563eb;
    text-decoration: underline;
}

.auth-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ========================================
   NEWS SECTION
   ======================================== */

.header {
    background: #ffffff;
    color: #0f172a;
    padding: 32px;
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #0f172a;
}

.header-left p {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.btn-logout {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-logout:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #0f172a;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #94a3b8;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-article {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.news-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

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

.article-content {
    padding: 24px;
}

.article-category {
    display: inline-block;
    padding: 6px 12px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    gap: 16px;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.article-summary {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.engagement-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.engagement-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
}

.btn-like {
    color: #dc2626;
}

.btn-like:hover {
    background: #fef2f2;
    border-color: #fecaca;
    transform: translateY(-2px);
}

.btn-like.liked {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-share {
    color: #3b82f6;
}

.btn-share:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #fef2f2;
    color: #dc2626;
    padding: 20px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
    border: 1px solid #fecaca;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast.show {
    transform: translateX(0);
}

.floating-action {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
    z-index: 999;
}

.floating-action:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
    background: #2563eb;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 40px 30px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .header {
        padding: 24px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-left h1 {
        font-size: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
    }
}

/* Add this to your existing styles.css */

.article-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-like.liked {
    background: #dc2626 !important;
    color: white !important;
    border-color: #dc2626 !important;
}