/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 宽屏优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1800px;
    }
    
    .content-wrapper {
        gap: 40px;
    }
    
    .sidebar {
        width: 350px;
    }
    
    .news-grid {
        grid-template-columns: 2.5fr repeat(3, 1fr);
        gap: 25px;
    }
    
    .categories-grid,
    .tools-grid {
        gap: 30px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 1.5rem;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-bar button {
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: #45a049;
    transform: translateX(-2px);
}

.user-info {
    display: flex;
    gap: 15px;
}

.login-btn, .register-btn {
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-btn {
    background: white;
    color: #667eea;
}

.login-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.register-btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.main-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    margin-top: 10px;
}

.main-nav {
    position: relative;
}

.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 子菜单样式 */
.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    list-style: none;
    padding: 15px 0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-nav li:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .submenu li {
    width: 100%;
}

.main-nav .submenu a {
    display: block;
    padding: 10px 20px;
    border-radius: 0;
    transform: none;
}

.main-nav .submenu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.main-nav .submenu .submenu {
    top: 0;
    left: 100%;
    margin-left: 5px;
}

.main-nav .submenu a i {
    margin-right: 10px;
}

.main-nav > ul > li > a i:last-child {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.main-nav > ul > li:hover > a i:last-child {
    transform: rotate(180deg);
}

/* 轮播图 */
.carousel {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 40px;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: slideUp 0.5s ease-out;
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease-out 0.2s both;
}

.read-more {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out 0.4s both;
}

.read-more:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover, .carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicators span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators span.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
}

.content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 侧边栏样式 */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: #667eea;
}

/* 天气卡片样式 */
.weather-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.weather-icon {
    font-size: 3rem;
    color: #fdb813;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.weather-details {
    text-align: center;
    color: #666;
    line-height: 1.6;
}

/* 时钟样式 */
.clock-display {
    text-align: center;
    padding: 10px 0;
}

#current-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    font-family: 'Courier New', monospace;
}

#current-date {
    font-size: 1.1rem;
    color: #666;
    margin-top: 10px;
}

/* 热门搜索样式 */
.hot-searches ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-searches li a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8f9fa;
}

.hot-searches li a:hover {
    color: #667eea;
    background: #e8eeff;
    transform: translateX(5px);
}

/* 快捷工具样式 */
.quick-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quick-tool-item:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.quick-tool-item i {
    width: 20px;
    text-align: center;
}

/* 网站统计样式 */
.site-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* 主内容区域 */
.main-area {
    flex: 1;
    min-width: 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #333;
}

.section-title i {
    color: #667eea;
    margin-right: 10px;
}

.more-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.more-link:hover {
    color: #5a6fd8;
    transform: translateX(5px);
}

/* 新闻板块 */
.news-section {
    margin-bottom: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    grid-template-areas: 
        "featured news2 news3 news4"
        "featured news5 news5 news5";
}

.news-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item.featured {
    grid-area: featured;
    display: flex;
    flex-direction: column;
}

.news-item:nth-child(2) {
    grid-area: news2;
}

.news-item:nth-child(3) {
    grid-area: news3;
}

.news-item:nth-child(4) {
    grid-area: news4;
}

.news-item:nth-child(5) {
    grid-area: news5;
    display: flex;
    flex-direction: row;
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item.featured img {
    height: 300px;
}

.news-item:nth-child(5) img {
    width: 300px;
    height: 100%;
}

.news-item:hover img {
    transform: scale(1.05);
}

/* 更多新闻样式 */
.news-more {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.news-content {
    padding: 20px;
    flex: 1;
}

.news-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

.news-item:hover h3 {
    color: #667eea;
}

.news-item.featured h3 {
    font-size: 1.5rem;
}

.news-item p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分类板块 */
.categories-section {
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-item {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-icon.tech {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-icon.finance {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-icon.sports {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.category-icon.entertainment {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.category-icon.health {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.category-icon.education {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.category-icon.travel {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.category-icon.lifestyle {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.category-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.category-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 工具板块 */
.tools-section {
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.tool-item {
    background: white;
    padding: 30px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transition: left 0.5s ease;
}

.tool-item:hover::before {
    left: 100%;
}

.tool-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.tool-item:hover .tool-icon {
    transform: scale(1.1) rotate(10deg);
}

.tool-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.tool-item p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tool-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tool-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 热门推荐 */
.recommendations-section {
    margin-bottom: 40px;
}

.recommendations-grid {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recommendation-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recommendation-item:last-child {
    border-bottom: none;
}

.recommendation-item:hover {
    transform: translateX(10px);
}

.recommendation-rank {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.recommendation-item:nth-child(2) .recommendation-rank {
    background: #764ba2;
}

.recommendation-item:nth-child(3) .recommendation-rank {
    background: #f093fb;
}

.recommendation-item:nth-child(4) .recommendation-rank {
    background: #4facfe;
}

.recommendation-item:nth-child(5) .recommendation-rank {
    background: #43e97b;
}

.recommendation-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
    transition: color 0.3s ease;
}

.recommendation-item:hover h3 {
    color: #667eea;
}

.recommendation-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

.recommendation-meta span:first-child {
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 50px 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.footer-column p {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-column ul a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    color: #667eea;
    margin-top: 5px;
    flex-shrink: 0;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
}

.subscribe-form button {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.subscribe-form button:hover {
    background: #5a6fd8;
    transform: translateX(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #5a6fd8;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 动画效果 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .news-grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "featured news2 news3"
            "featured news4 news5";
    }
    
    .news-item:nth-child(5) {
        flex-direction: column;
    }
    
    .news-item:nth-child(5) img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .sidebar-card {
        flex: 1;
        min-width: 250px;
    }
    
    .news-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 
            "featured featured"
            "news2 news3"
            "news4 news5";
    }
    
    .news-item.featured {
        flex-direction: row;
    }
    
    .news-item.featured img {
        width: 400px;
        height: 100%;
    }
}

@media (max-width: 992px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        max-width: none;
    }
    
    .main-nav {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .main-nav ul {
        justify-content: flex-start;
    }
    
    .main-nav li {
        flex-shrink: 0;
    }
    
    .carousel-content h2 {
        font-size: 2rem;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .sidebar-card {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 10px 0;
    }
    
    .main-nav ul {
        gap: 5px;
    }
    
    .main-nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .carousel {
        height: 300px;
    }
    
    .carousel-content {
        padding: 20px;
    }
    
    .carousel-content h2 {
        font-size: 1.5rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas: 
            "featured"
            "news2"
            "news3"
            "news4"
            "news5";
    }
    
    .news-item.featured,
    .news-item:nth-child(5) {
        flex-direction: column;
    }
    
    .news-item.featured img {
        width: 100%;
        height: 250px;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .categories-grid,
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links,
    .contact-info li {
        justify-content: center;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .search-bar input {
        padding: 10px 15px;
    }
    
    .search-bar button {
        padding: 10px 20px;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .carousel {
        height: 250px;
    }
    
    .carousel-content h2 {
        font-size: 1.2rem;
    }
    
    .carousel-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .read-more {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .news-content,
    .tool-item,
    .category-item {
        padding: 15px;
    }
    
    .news-item h3 {
        font-size: 1.1rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}