body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #1c1c1c;
    color: #ffffff;
}

header {
    background-color: #252525;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #333;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(255, 107, 107, 0.5),
        0 0 20px rgba(255, 107, 107, 0.3),
        0 0 30px rgba(255, 107, 107, 0.1);
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(45deg, #ff6b6b, #ff8585);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

#directory-menu {
    background-color: #252525;
    padding: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow-x: auto;
    border-bottom: 1px solid #333;
}

#directory-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    background-color: #333;
}

#directory-menu a:hover {
    background-color: #444;
}

#image-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(167px, 1fr)); /* Changed from 250px to 167px */
    gap: 1rem;
    padding: 1.5rem;
}

#image-container img {
    width: 100%;
    height: 167px; /* Changed from 250px to 167px */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
    border: 1px solid #333;
}

#image-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 30px;  /* Reduced from 50px */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto;  /* Allow scrolling if content is too tall */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid #333;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

#modal-caption {
    margin: 15px auto 30px;  /* Added bottom margin */
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    min-height: 50px;
    font-size: 16px;
    line-height: 1.5;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

.modal-content:hover {
    opacity: 0.95;
}

.close {
    position: absolute;
    right: 35px;
    top: 15px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ff6b6b;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #252525;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.special-link {
    background-color: #ff6b6b !important;
    margin-right: 20px !important;
}

.special-link:hover {
    background-color: #ff8585 !important;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.satellite-content {
    width: 45%;
    height: 45vh;
    border: none;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#satellite-modal {
    padding-top: 150px;  /* Adjusted to center the smaller content */
}

#satellite-modal .close {
    right: 28%;  /* Adjusted to align with the smaller content */
    top: 130px;  /* Adjusted to align with the smaller content */
}
    z-index: 1000;