/* Cosmic Gallery: Retro-Futurist Neon Theme */
body {
    background: linear-gradient(120deg, #10002b 0%, #240046 50%, #3c096c 100%);
    color: #e0aaff;
    font-family: 'Orbitron', 'Audiowide', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}
header {
    text-align: center;
    padding: 2.5rem 1rem 1rem 1rem;
    background: transparent;
}
header h1 {
    font-size: 2.8rem;
    color: #f72585;
    letter-spacing: 0.12em;
    text-shadow: 0 2px 16px #7209b7, 0 0px 4px #b5179e;
    margin: 0;
}
header p {
    color: #a0c4ff;
    font-size: 1.13rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin: 0.7rem auto 0 auto;
}
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem 1.1rem;
    padding: 3rem 3vw;
    max-width: 1280px;
    margin: auto;
}
.card {
    background: rgba(56,0,85, 0.86);
    border-radius: 22px;
    box-shadow: 0 2px 40px #560bad44, 0 0 2px #7209b766;
    overflow: hidden;
    transition: transform 0.26s cubic-bezier(.21,2,.32,.99), box-shadow 0.26s;
    border: 2.5px solid #f72585ee;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.card:hover {
    transform: scale(1.037) rotate(-0.5deg);
    box-shadow: 0 4px 60px #f72585ce, 0 0 8px #b5179en;
    border-color: #c77dff;
}
.card img {
    width: 100%;
    object-fit: cover;
    min-height: 200px;
    display: block;
    filter: contrast(1.16) drop-shadow(0 0 28px #b5179e77);
    transition: filter 0.19s;
}
.card:hover img {
    filter: contrast(1.3) brightness(1.09) drop-shadow(0 0 44px #7b2ff776);
}
.card .info {
    padding: 1.3rem 1rem 1rem 1rem;
}
.card .title {
    font-size: 1.35rem;
    font-family: 'Orbitron', 'Audiowide', 'Segoe UI', Arial, sans-serif;
    margin-bottom: 0.35rem;
    color: #c77dff;
    text-shadow: 0 2px 8px #560bad55;
}
.card .desc {
    font-size: 0.99rem;
    color: #a0c4ff;
    margin-bottom: 0.5rem;
    min-height: 2.8em;
    line-height: 1.35;
}
.card .date {
    font-size: 0.81rem;
    color: #f72585cc;
    opacity: 0.9;
}
#modal {
    display: none;
    position: fixed;
    z-index: 200;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(25,0,40,0.91);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background 0.13s;
}
#modal.active {
    display: flex;
    animation: modalIn 0.22s cubic-bezier(.21,2,.32,.99);
}
@keyframes modalIn {
    0% { opacity: 0; transform: translateY(60px) scale(0.95); }
    100% { opacity: 1; transform: none; }
}
.modal-content {
    background: radial-gradient(circle at 22% 33%, #7209b7 0%, #560bad 70%, #240046 100%);
    box-shadow: 0 10px 80px #f72585bb, 0 0 44px #c77dffaa;
    border-radius: 32px;
    padding: 2.5rem 2.5vw 2rem 2.5vw;
    max-width: 540px;
    color: #fff0fa;
    animation: contentIn 0.25s 0.045s cubic-bezier(.21,2,.32,.99) backwards;
    position: relative;
}
@keyframes contentIn {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: none; }
}
.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 2.1rem;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 2px 18px #f72585ee;
    transition: color 0.13s;
}
.close-btn:hover { color: #f72585; }
.loader {
    margin: 4rem auto 0 auto;
    width: 80px;
    height: 80px;
    border: 10px solid #7209b7aa;
    border-radius: 50%;
    border-top: 10px solid #fff;
    animation: spin 1.1s linear infinite;
    box-shadow: 0 0 26px #c77dff44;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 700px) {
    #gallery { padding: 1.8rem 1vw; gap: 1.1rem 0.3rem; }
    .modal-content { padding: 1.1rem 1vw 1rem 1vw; }
}
