/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 140px 20px 40px;
}

#hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
    overflow: hidden;
}

#hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 2s;
    filter: brightness(0.5) saturate(1.2);
}

.hero-content {
    z-index: 10;
    max-width: 800px;
}

.hero-controls {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0 auto;
}

.input-pill {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 6px;
    border-radius: 40px;
    display: flex;
    backdrop-filter: blur(15px);
}

.input-pill input {
    background: none;
    border: none;
    padding: 10px 20px;
    color: white;
    flex: 1;
    outline: none;
    font-size: 0.9rem;
}

.btn-pill {
    background: var(--accent-gradient);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    animation: gradientShift 3s ease infinite;
}

.btn-pill:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.4);
}

/* --- Gallery Grid --- */
.gallery-section {
    padding: 80px 8%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-item-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: 0.5s;
    cursor: pointer;
    position: relative;
}

.card-img-wrapper {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #000;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: 1.2s ease;
}

.grid-item-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.grid-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(167, 139, 250, 0.3);
    border-color: var(--accent);
}

.source-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.6rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.source-tag.spacex { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.source-tag.unsplash { color: #00d1ff; border-color: rgba(0, 209, 255, 0.4); }
.source-tag.pexels { color: #05a081; border-color: rgba(5, 160, 129, 0.4); }
.source-tag.nasa { color: #ff3d00; border-color: rgba(255, 61, 0, 0.4); }

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    display: none;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(25px);
}

.modal-content {
    background: #0a0a0a;
    width: 100%;
    max-width: 1100px;
    display: flex;
    border: 1px solid var(--glass-border);
    position: relative;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-img-side {
    flex: 1.4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-img-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-text-side {
    flex: 1;
    padding: 50px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f0f 100%);
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #020204;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: drift var(--duration) linear infinite;
}

@keyframes drift {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

.loader-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.singularity-core {
    position: relative;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 50px 20px rgba(167, 139, 250, 0.9),
                0 0 120px 40px rgba(167, 139, 250, 0.5),
                0 0 200px 80px rgba(167, 139, 250, 0.2);
    animation: singularity-pulse 2.5s ease-in-out infinite;
}

@keyframes singularity-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.4); filter: brightness(1.5); }
}

.orbital-ring {
    position: absolute;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.ring-1 { width: 100px; height: 100px; animation: orbit1 5s linear infinite; border-width: 1.5px; }
.ring-2 { width: 160px; height: 160px; animation: orbit2 8s linear infinite reverse; border-color: rgba(236, 72, 153, 0.2); }
.ring-3 { width: 220px; height: 220px; animation: orbit1 12s linear infinite; }
.ring-4 { width: 280px; height: 280px; animation: orbit2 15s linear infinite reverse; border-color: rgba(236, 72, 153, 0.15); }

@keyframes orbit1 {
    0% { transform: rotateX(70deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes orbit2 {
    0% { transform: rotateX(-60deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(-60deg) rotateY(-360deg) rotateZ(360deg); }
}

/* --- Misc --- */
.support-us-footer {
    max-width: 700px;
    margin: 0 auto 60px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 50px 30px;
    border-radius: 32px;
    backdrop-filter: blur(15px);
}

.support-us-footer h2 {
    font-family: 'Playfair Display';
    font-style: italic;
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-section { padding: 130px 16px 50px; min-height: auto; }
    .grid-container { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .modal-content { flex-direction: column; max-height: 100dvh; border-radius: 0; height: 100dvh; width: 100%; }
    .modal-img-side { height: 250px; flex: none; }
    .modal-text-side { padding: 24px 20px; flex: 1; }
}

@media (max-width: 480px) {
    .grid-container { grid-template-columns: 1fr; gap: 14px; }
}

/* --- Utility Classes for Refactored Inline Styles --- */
.hero-h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 25px;
    line-height: 1.1;
    animation: float 6s ease-in-out infinite;
}

.hero-p {
    margin-bottom: 40px;
    color: #aaa;
    letter-spacing: 1px;
    font-weight: 300;
}

.date-input-container {
    max-width: 350px;
    margin: 0 auto;
}

.load-more-container {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn-style {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.support-us-desc {
    color: #888;
    margin-bottom: 30px;
}

.support-kofi-btn {
    padding: 15px 35px;
    font-size: 1rem;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    z-index: 100;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-date-style {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.m-title-style {
    font-family: 'Playfair Display', serif;
    margin: 15px 0;
    font-size: 2rem;
}

.m-desc-style {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.m-dl-btn {
    width: 100%;
    padding: 18px;
    background: white;
    color: black;
    border: none;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 1px;
}

.legal-close-span {
    position: fixed;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}
