/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* Ensure html and body take full viewport height */
    margin: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Stack header, main content, footer vertically */
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    background-attachment: fixed;
    overflow-y: auto;
    color: white;
}

/* --- The Glassmorphism Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px); /* This creates the frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 3rem; /* Reduced padding for more space */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 100%; /* Ensure it fills container width */
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow card to grow within container */
    justify-content: flex-start; /* Push content to the top of the card */
    align-items: center; /* Center content horizontally inside card */
    text-align: center; /* Default text centering */
}
.container {
    flex: 1; /* Allow container to take available vertical space */
    display: flex;
    flex-direction: column; /* Align items in a column */
    align-items: center; /* Center items horizontally within container */
    justify-content: center; /* Center items vertically within container */
    width: 100%;
    max-width: 1200px; /* Optional: Constrain max width on large screens */
    margin: 0 auto; /* Center the container horizontally */
    padding: 1rem;
    padding-top: 80px; /* Add padding to account for the top-left nav */
}

/* Specific adjustments for the homepage container to perfectly center its content */
.container.homepage {
    padding-top: 25px; /* Adjust top padding for homepage */
    padding-bottom: 25px; /* Adjust bottom padding for homepage (approx footer height) */
    min-height: 100vh; /* Ensure homepage container takes full height */
    justify-content: center; /* Center content vertically, or use space-around/between if other elements exist */
}

/* Specific adjustments for the homepage glass-card if needed */
.glass-card.homepage {
    max-width: 600px; /* Restore original max-width for homepage card */
    margin-top: 0;
    margin-bottom: 0;
    flex-grow: 0; /* Homepage card should not grow and fill space */
    justify-content: center; /* Re-center content vertically for homepage card */
}

/* --- Typography --- */
h1 {
    font-size: 4rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: #a0a0a0;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Navigation Buttons --- */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.btn {
    text-decoration: none;
    color: #fff;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    letter-spacing: 1px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5); /* Glow effect */
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
}

/* --- Footer Styles --- */
footer {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    
    /* Glassmorphism strip at the bottom */
    background: rgba(97, 94, 94, 0.3); 
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    z-index: 10;
}

.footer-content p {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Flexbox is perfect for aligning a row of logos */
.logos {
    display: flex;
    gap: 2rem; /* Space between logos */
    justify-content: center;
    align-items: center;
}

.logos img {
    height: 40px; /* Force all logos to the same height */
    width: auto;  /* Width adjusts automatically */
    opacity: 0.7; /* Make them slightly faint */
    transition: opacity 0.3s;
}

.logos img:hover {
    opacity: 1; /* Light up when you mouse over them */
}

/* --- Wide Card for Tables --- */
.wide-card {
    max-width: 1000px; /* Wider than the home page card */
    width: 95%;
}

/* --- Controls Section --- */
.list-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    color: white;
    font-family: 'Montserrat', sans-serif;
}

/* --- Table Styles --- */
.table-wrapper {
    overflow-x: auto; /* Allows scrolling if table is too wide on mobile */
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    min-width: 600px; /* Ensures it doesn't get too squashed */
}

.styled-table thead tr {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-align: left;
}

.styled-table th, 
.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.styled-table tbody tr {
    transition: background 0.3s ease;
}

.styled-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05); /* Highlight row on hover */
}

/* Monospace font for coordinates/tracking strings makes them easier to read */
.mono {
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* --- Small Buttons (Controls) --- */
.btn-small {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.add { background-color: rgba(0, 255, 128, 0.2); border-color: rgba(0, 255, 128, 0.4); }
.delete { background-color: rgba(255, 80, 80, 0.2); border-color: rgba(255, 80, 80, 0.4); }

/* --- The Mission Patch Logo --- */
.mission-patch {
    width: 270px;       /* Adjust size as needed */
    height: 270px;
    object-fit: cover;  /* Ensures the image doesn't stretch if it's not perfectly square */
    
    /* 3. The Atmosphere Glow */
    /* First shadow is dark (depth), second is light (glow) */
    box-shadow: 
        0 10px 30px rgba(0,0,0, 0.5),    /* Depth shadow */
        0 0 20px rgba(255, 255, 255, 0.1); /* Faint outer glow */

    /* Spacing */
    margin-bottom: 1.5rem;
    
    /* smooth transition for hover effects */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Optional: Make it pop slightly when you hover over it */
.mission-patch:hover {
    transform: scale(1.05); /* Grow slightly */
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 15px 35px rgba(0,0,0, 0.6),
        0 0 30px rgba(255, 255, 255, 0.2);
}

/* Form Column Layout */
.form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Space between form elements */
    margin-top: 2rem;
    align-items: stretch; /* Stretch inputs to full width */
}

.form-column input[type="text"],
.form-column input[type="datetime-local"],
.form-column input[list],
.form-column textarea,
.form-column button {
    width: 100%; /* Make inputs take full width of the form */
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

/* Specific styling for datetime-local to ensure visibility */
.form-column input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Makes the calendar icon white */
}

/* Placeholder color for inputs */
.form-column input::placeholder,
.form-column textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-column button {
    align-self: center;
    max-width: 200px; /* Limit button width */
}

/* Observatory Section */
.observatory-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.observatory-section h3 {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #a0a0a0;
}

/* Top-Left Navigation */
.top-left-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100; /* Ensure it's above other content */
}

.top-left-nav .btn-small {
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.top-left-nav .btn-small:hover {

    background: rgba(255, 255, 255, 0.3);

    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);

}




/* --- Tabbed Interface --- */
.tab-container {
    width: 100%;
    margin-top: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
}

.tab-content {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {

    .container {

        padding: 0.5rem;

        padding-top: 100px; /* Adjust for nav buttons */

    }



    .glass-card {

        padding: 1.5rem;

    }



    h1 {

        font-size: 2.5rem;

    }



    .top-left-nav {

        flex-direction: row;

        flex-wrap: wrap;

        top: 10px;

        left: 10px;

        right: 10px;

        justify-content: center;

    }

}
