/* console_styles.css */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap');

:root {
    --console-bg: #1a1f2b;
    --console-border: #00ffff;
    --console-border-glow: #00ffff80;
    --console-text: #00eaff;
    --console-header-text: #ffffff;
    --button-bg-start: #2a3040;
    --button-bg-end: #101520;
    --button-text: #c0d0ff;
    --button-border: #3a7f9e;
    --button-hover-bg-start: #3a4050;
    --button-hover-bg-end: #202530;
    --star-color: #ffffff;
    --pulsar-color: #be9eff;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

body#space_background {
    background-color: #000010;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#background_effects_wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    pointer-events: none;
}

[id$="_wrapper"] > div {
    position: absolute;
    width: 100%;
    height: 100%;
}


/* --- Background Effects --- */
#star_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background-color: var(--star-color);
    border-radius: 50%;
    opacity: 0;
    animation: star_twinkle_travel linear infinite;
}

@keyframes star_twinkle_travel {
    0% { opacity: 0; transform: translateX(var(--start-x)) translateY(var(--start-y)) scale(0.5); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(var(--end-x)) translateY(var(--end-y)) scale(1); }
}

#nebula_top_left_wrapper { position: absolute; top: -15vh; left: -15vw; width: 50vw; height: 50vh; }
#nebula_top_right_wrapper { position: absolute; top: 50%; right: -18vw; left: auto; width: 45vw; height: 45vh; transform: translateY(-50%); }
#nebula_top_left, #nebula_top_right {
    background-image: radial-gradient(ellipse at center, hsla(260, 70%, 50%, 0.6) 0%, hsla(220, 80%, 40%, 0.4) 30%, transparent 65%);
    opacity: 0.8;
    animation: shimmer_pulse 12s ease-in-out infinite alternate;
}
#nebula_top_right { animation-delay: -6s; }

@keyframes shimmer_pulse {
    0% { transform: scale(1.0) rotate(-10deg); opacity: 0.7; }
    100% { transform: scale(1.2) rotate(10deg); opacity: 0.9; }
}

/* === Central Pulsar Effect === */
#pulsar_wrapper { position: absolute; top: 50%; left: 50%; width: 250px; height: 250px; transform: translate(-50%, -50%); }
#pulsar {
    border-radius: 50%;
    background: 
        radial-gradient(ellipse at center, hsla(260,100%,90%,0.5) 0%, transparent 60%),
        radial-gradient(ellipse at center, hsla(240,100%,70%,0.7) 0%, hsla(280,80%,30%,0.4) 50%, transparent 70%),
        radial-gradient(ellipse at center, #1a0a5a 0%, #050337 100%);
    box-shadow: 
        inset 0 0 40px 20px #050337,
        0 0 20px 5px color-mix(in srgb, var(--pulsar-color) 70%, transparent),
        0 0 60px 20px color-mix(in srgb, var(--pulsar-color) 30%, transparent);
    animation: core_pulse 12s ease-in-out infinite alternate;
}

#pulsar_wrapper::before, #pulsar_wrapper::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 120%; 
    height: 150%;
    opacity: 0;
    background: radial-gradient(ellipse at 50% 0%, 
        hsla(250, 100%, 80%, 0.7) 0%,
        hsla(250, 100%, 70%, 0.2) 60%,
        transparent 80%);
    filter: blur(10px);
}
#pulsar_wrapper::before {
    bottom: 50%;
    transform-origin: 50% 100%;
    animation: polar_pulse 3s ease-out infinite;
}
#pulsar_wrapper::after {
    top: 50%;
    transform-origin: 50% 0%;
    transform: translateX(-50%) rotate(180deg);
    animation: polar_pulse 3s ease-out infinite;
}

@keyframes polar_pulse {
    0% { 
        transform: translateX(-50%) scale(0.1, 0.2); 
        opacity: 0; 
    }
    30% { 
        opacity: 1; 
    }
    100% { 
        transform: translateX(-50%) scale(2.0, 3.5); 
        opacity: 0; 
    }
}

@keyframes core_pulse {
    from { transform: scale(0.98); filter: brightness(1.0); }
    to { transform: scale(1.02); filter: brightness(1.2); }
}


/* --- Console Panel Styling --- */
#console_panel {
    position: relative; 
    z-index: 2;
    width: 85vw; max-width: 1200px; height: 75vh; max-height: 800px;
    background-color: var(--console-bg);
    border: 3px solid var(--console-border);
    border-radius: 15px;
    box-shadow: 0 0 30px var(--console-border-glow), 0 0 15px var(--console-border) inset;
    color: var(--console-text);
    display: flex; flex-direction: column;
    padding: 20px;
    font-family: 'Orbitron', sans-serif;
    overflow-y: auto;
}

#console_header { text-align: center; padding-bottom: 10px; flex-shrink: 0; }
#console_header #main_title { margin: 0; font-size: 4em; font-weight: 900; color: var(--console-header-text); text-shadow: 0 0 15px var(--console-border); letter-spacing: 5px; }
#console_header #sub_title { margin: -10px 0 10px 0; font-size: 1.5em; font-weight: 700; color: var(--console-text); text-shadow: 0 0 8px var(--console-border); }

/* --- Time Display & Copy Icon Styles --- */
#current_time_display { 
    font-size: 0.9em; 
    color: var(--button-text);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.time-separator {
    opacity: 0.6;
}
#copy_unix_time_icon {
    margin-left: 5px;
    cursor: pointer;
    color: var(--console-text);
    transition: color 0.2s ease, transform 0.2s ease;
}
#copy_unix_time_icon:hover {
    color: #ffffff;
    transform: scale(1.2);
}
#copy_unix_time_icon.copied {
    color: #4CAF50;
}

/* === Main Content & Logo Styles === */
#console_main_content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

#console_logo {
    display: block;
    width: auto;
    max-height: 55%; 
    max-width: 90%;
    margin: 10px 0;
}
/* === End Section === */

#console_footer { text-align: center; padding-top: 10px; flex-shrink: 0; border-top: 1px solid color-mix(in srgb, var(--console-border) 30%, transparent); }
#console_footer p { margin: 0; font-size: 0.9em; color: var(--button-text); }
.console_section { 
    width: 100%; 
    padding: 15px; 
    background-color: rgba(0,0,0,0.2); 
    border-radius: 8px; 
    border: 1px solid color-mix(in srgb, var(--console-border) 30%, transparent); 
    flex-shrink: 0;
}
.console_section h2 { font-size: 1.2em; margin-top: 0; margin-bottom: 20px; color: var(--console-header-text); border-bottom: 1px solid var(--console-border); padding-bottom: 5px; text-align: center; }

/* === UPDATED BUTTON LAYOUT === */
#service_links_panel ul { 
    list-style-type: none; padding: 0; margin: 0; 
    display: grid;
    /* Reduced button size constraints */
    grid-template-columns: repeat(auto-fit, minmax(120px, 150px)); 
    /* Reduced gap */
    gap: 15px; 
    justify-content: center; 
}

/* === UPDATED BUTTON STYLING === */
.console_button {
    display: block; width: 100%; 
    /* Reduced vertical padding */
    padding: 8px 10px; 
    text-align: center; text-decoration: none;
    color: var(--button-text);
    background-image: linear-gradient(to bottom, var(--button-bg-start), var(--button-bg-end));
    border: 1px solid var(--button-border);
    border-radius: 6px;
    font-family: 'Roboto', sans-serif; 
    /* Reduced font size to ensure text fits */
    font-size: 1em; 
    font-weight: bold; letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
/* === END UPDATED SECTIONS === */

.console_button span { display: block; }
.console_button:hover, .console_button:focus {
    color: var(--console-header-text);
    background-image: linear-gradient(to bottom, var(--button-hover-bg-start), var(--button-hover-bg-end));
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.2), 0 0 10px color-mix(in srgb, var(--console-border) 70%, transparent);
    transform: translateY(-2px);
}
.console_button:active, .console_button.button_pressed {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 1px 0 rgba(0,0,0,0.2);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    #console_panel { width: 95vw; height: 90vh; padding: 10px; }
    #console_header #main_title { font-size: 2.5em; }
    #console_header #sub_title { font-size: 1.1em; }
    
    #console_main_content { gap: 10px; }
    #console_logo { max-height: 35%; }

    .console_section h2 { font-size: 1em; }
    .console_button { font-size: 0.9em; }

    #service_links_panel ul { 
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}
