:root {
    --primary-color: #003366; /* Dark Blue */
    --secondary-color: #f4f4f4; /* Light Gray/White */
    --accent-color: #cccccc; /* Light Gray for buttons */
    --text-color: #333333;
    --white: #ffffff;
    --border-color: #dddddd;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav ul li a:hover {
    opacity: 0.8;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

.search-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 2rem;
}

.search-container h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.search-form {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-form input {
    padding: 10px 15px;
    width: 300px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-form button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    border: 1px solid #bbbbbb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #bbbbbb;
}

.error-message {
    margin-top: 1rem;
    color: #d9534f;
    background-color: #f9d6d5;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ebccd1;
}

.results-container {
    margin-bottom: 3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 1rem;
}

.user-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-avatar {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #eee;
}

.user-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.user-info .email {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.user-info .bio {
    font-style: italic;
    color: #444;
}

.news-feed {
    margin-top: 3rem;
}

.news-feed h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.news-item {
    display: flex;
    background-color: var(--white);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.news-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

footer {
    background-color: #333;
    color: #aaa;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: center;
    }
    
    .search-form input {
        width: 100%;
    }
    
    .search-form button {
        width: 100%;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}
