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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #e74c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: visible;
    z-index: 1000;
    gap: 2rem;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: breaking-news-container 2s infinite;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.source-label {
    font-size: 0.9rem;
    color: #ecf0f1;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.source-label:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

@keyframes breaking-news-container {
    0%, 100% {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        border-color: #e74c3c;
        transform: scale(1);
    }
    50% {
        background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
        border-color: #c0392b;
        transform: scale(1.01);
    }
}

.dropdown-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1001;
    margin-left: auto;
    flex-shrink: 0;
}

.dropdown-label {
    font-weight: 600;
    color: white;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.category-dropdown {
    min-width: 200px;
    background: white;
    border-radius: 6px;
    border: 2px solid #3498db;
    color: #2c3e50;
    font-weight: 500;
    z-index: 1002;
    position: relative;
}

.category-dropdown .Select-control {
    background: white;
    border: 2px solid #3498db;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1002;
}

.category-dropdown .Select-control:hover {
    border-color: #2980b9;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.2);
}

.category-dropdown .Select-value-label {
    color: #2c3e50;
    font-weight: 500;
}

.category-dropdown .Select-placeholder {
    color: #7f8c8d;
}

.category-dropdown .Select-menu-outer {
    background: white;
    border: 2px solid #3498db;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.category-dropdown .Select-option {
    background: white;
    color: #2c3e50;
    padding: 0.8rem 1rem;
}

.Select-menu-outer {
    z-index: 9999 !important;
    position: absolute !important;
}

.newsapi-credit {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 2px solid #ecf0f1;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsapi-credit:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.credit-text {
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.newsapi-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.newsapi-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    text-decoration: none;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.content-wrapper {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
    z-index: 1;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.news-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-link:hover {
    text-decoration: none;
    color: inherit;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #ecf0f1;
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9, #2c3e50);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.02);
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: #3498db;
}

.news-description-container {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 0.8rem;
    background: #f8f9fa;
    flex: 1;
}

.news-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-author {
    font-weight: 500;
    color: #3498db;
    background: #ecf0f1;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.news-date {
    color: #95a5a6;
    font-size: 0.8rem;
}

.news-source {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    margin: 0;
    padding: 0.3rem 0.8rem;
    background: #ecf0f1;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    margin-top: auto;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.pagination-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

.pagination-btn:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
}

.error-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 600;
}

