/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 1rem;
}

.time-display {
    margin-bottom: 2rem;
}

.time {
    font-size: 4rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.date {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 400;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-container {
    width: 100%;
    max-width: 600px;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.search-box:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    color: #bdc3c7;
    font-size: 1.2rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #333;
    font-weight: 400;
    background: transparent;
}

#search-input::placeholder {
    color: #bdc3c7;
}

.search-engines {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.engine-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.engine-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.engine-btn.active {
    background: #007bff;
    color: white;
}

/* Bookmarks Section */
.bookmarks-section {
    flex: 1;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.bookmark-category {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.bookmark-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.bookmark-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.bookmark-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bookmark-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
}

.bookmark-link:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    color: #2c3e50;
}

.bookmark-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.bookmark-link span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* News Section */
.news-section {
    margin-top: 2rem;
}

.news-widget {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.news-item {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.news-image {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 0.8rem;
    background-color: #f0f0f0;
}

.news-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    flex-grow: 1;
}

.news-source {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
    margin-top: auto;
}

.news-time {
    font-size: 0.75rem;
    color: #bdc3c7;
    margin-top: 0.2rem;
}

.news-loading {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* Weather Section */
.weather-section {
    margin-top: 1rem;
}

.weather-widget {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.weather-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.weather-icon {
    font-size: 2.5rem;
    color: #f39c12;
}

.weather-details {
    text-align: left;
}

.temperature {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
}

.location {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .time {
        font-size: 2.5rem;
    }
    
    .date {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 0.8rem 1rem;
    }
    
    #search-input {
        font-size: 1rem;
    }
    
    .bookmarks-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .bookmark-category {
        padding: 1rem;
    }
    
    .bookmark-links {
        gap: 0.6rem;
    }
    
    .bookmark-link {
        padding: 0.6rem 0.8rem;
    }
    
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .weather-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .weather-details {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .time {
        font-size: 2rem;
    }
    
    .search-engines {
        display: none;
    }
    
    .engine-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bookmark-category,
.news-widget,
.weather-widget {
    animation: fadeInUp 0.6s ease forwards;
}

.bookmark-category:nth-child(1) { animation-delay: 0.1s; }
.bookmark-category:nth-child(2) { animation-delay: 0.2s; }
.bookmark-category:nth-child(3) { animation-delay: 0.3s; }
.bookmark-category:nth-child(4) { animation-delay: 0.4s; }