:root {
    --bg-color: #0b0f19;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.nasa-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -3;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.nasa-bg.loaded {
    opacity: 1;
}

.nasa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.7);
    z-index: -2;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.nasa-bg.loaded + .nasa-overlay {
    opacity: 1;
}

.ambient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: 20%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -15%;
    right: 5%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.blob-3 {
    top: 40%;
    left: -10%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 22s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 10%) scale(1.1);
    }

    100% {
        transform: translate(-5%, -10%) scale(0.9);
    }
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    z-index: 1;
}

.logo {
    position: absolute;
    top: 2rem;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(165, 180, 252, 0.2));
    user-select: none;
    z-index: 10;
}

.search-wrapper {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 56px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 0 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 0 25px rgba(99, 102, 241, 0.15), 
        0 8px 32px -8px rgba(0, 0, 0, 0.3);
}

.search-bar:hover,
.search-bar:focus-within {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 12px 40px -8px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

.engine-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 14px;
    cursor: pointer;
}

.engine-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.engine-dropdown:hover .engine-icon {
    transform: scale(1.1);
}

.engine-options {
    position: absolute;
    top: calc(100% + 15px);
    left: -10px;
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.engine-dropdown.active .engine-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.engine-option {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.engine-option:hover {
    transform: scale(1.25);
}

.search-input {
    flex-grow: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-family: inherit;
    font-weight: 300;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-bar:focus-within .search-input::placeholder {
    opacity: 0.4;
}

.actions {
    display: flex;
    gap: 14px;
    margin-left: 10px;
}

.action-icon {
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.action-icon:hover {
    color: var(--text-primary);
    transform: scale(1.15) translateY(-1px);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.buttons {
    margin-top: 36px;
    display: flex;
    gap: 16px;
}

.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 10px 24px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.primary-btn {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}

.datetime-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4rem;
    z-index: 10;
    user-select: none;
    cursor: default;
}

.time {
    font-family: 'Outfit', sans-serif;
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: -1px;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.date {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.quick-links {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 20;
}

.quick-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.75rem;
    text-decoration: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-link:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(6px);
    color: var(--accent);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4),
                0 0 16px rgba(99, 102, 241, 0.3);
}

.news-widget {
    width: 100%;
    max-width: 640px;
    margin-top: 4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.news-header {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.news-item:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.news-title {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
}

.news-date {
    color: var(--text-secondary);
}

.news-loading, .news-error {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .news-widget {
        margin-top: 2rem;
    }
}