/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #06b6d4);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.1;
    filter: blur(40px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 20%;
    animation-delay: -7s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Header */
.header {
    padding: 2rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo i {
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.time-display {
    text-align: center;
}

.current-time {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.current-date {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
}

.search-container {
    width: 100%;
    max-width: 700px;
}

.search-box {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

#search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 0.5rem;
    display: none;
    z-index: 10;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.suggestion:hover {
    background: var(--bg-glass);
}

.suggestion i {
    color: var(--text-muted);
}

.search-engines {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.engine-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.engine-btn:hover,
.engine-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Links Section */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    justify-content: center;
}

.section-title i {
    color: var(--accent-primary);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.link-category {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.link-category:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.category-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 1rem 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.link-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.link-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.link-item:hover .link-icon::before {
    opacity: 0.2;
}

.link-icon i {
    position: relative;
    z-index: 1;
}

/* Brand Colors */
.google { background: rgba(66, 133, 244, 0.1); }
.facebook { background: rgba(24, 119, 242, 0.1); }
.twitter { background: rgba(29, 161, 242, 0.1); }
.instagram { background: rgba(225, 48, 108, 0.1); }
.linkedin { background: rgba(10, 102, 194, 0.1); }
.discord { background: rgba(88, 101, 242, 0.1); }
.youtube { background: rgba(255, 0, 0, 0.1); }
.netflix { background: rgba(229, 9, 20, 0.1); }
.spotify { background: rgba(30, 215, 96, 0.1); }
.twitch { background: rgba(145, 70, 255, 0.1); }
.reddit { background: rgba(255, 69, 0, 0.1); }
.tiktok { background: rgba(255, 0, 80, 0.1); }
.github { background: rgba(255, 255, 255, 0.1); }
.notion { background: rgba(255, 255, 255, 0.1); }
.figma { background: rgba(162, 89, 255, 0.1); }
.slack { background: rgba(74, 21, 75, 0.1); }
.trello { background: rgba(0, 121, 191, 0.1); }
.stackoverflow { background: rgba(244, 128, 36, 0.1); }
.amazon { background: rgba(255, 153, 0, 0.1); }
.ebay { background: rgba(225, 216, 0, 0.1); }
.cnn { background: rgba(204, 0, 0, 0.1); }
.bbc { background: rgba(187, 18, 53, 0.1); }
.wikipedia { background: rgba(255, 255, 255, 0.1); }
.weather { background: rgba(0, 191, 255, 0.1); }

.link-item span {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

/* News Section */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.news-source {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-time {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 3rem 0 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .current-time {
        font-size: 2.2rem;
    }
    
    .current-date {
        font-size: 1rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-links {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-engines {
        gap: 0.5rem;
    }
    
    .engine-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        gap: 2rem;
    }
    
    .current-time {
        font-size: 1.8rem;
    }
    
    .category-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .link-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
    
    .search-box {
        padding: 1rem;
    }
    
    #search-input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
        font-size: 1rem;
    }
    
    .news-container {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-category {
    animation: fadeInUp 0.6s ease-out forwards;
}

.link-category:nth-child(1) { animation-delay: 0.1s; }
.link-category:nth-child(2) { animation-delay: 0.2s; }
.link-category:nth-child(3) { animation-delay: 0.3s; }
.link-category:nth-child(4) { animation-delay: 0.4s; }