@font-face {
    font-family: 'iAWriterQuattro';
    src: url('../assets/ia-writer-quattro/iAWriterQuattroS-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'iAWriterQuattro';
    src: url('../assets/ia-writer-quattro/iAWriterQuattroS-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'iAWriterQuattro';
    src: url('../assets/ia-writer-quattro/iAWriterQuattroS-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'iAWriterQuattro';
    src: url('../assets/ia-writer-quattro/iAWriterQuattroS-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'iAWriterQuattro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    height: 100vh;
}

#container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: #000;
    box-sizing: border-box;
}

#columns-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
}

.column {
    min-width: 320px;
    width: 320px;
    height: 100vh;
    background: #000;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateX(80px);
    animation: fadeInRight 0.2s ease-out forwards;
}


.placeholder-column {
    animation: fadeInRightPlaceholder 0.2s ease-out forwards;
}

.column-header {
    background: #000;
    color: white;
    padding: 10px 5px 10px 13px;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-link {
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    margin-right: 5px;
}

.header-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.header-link svg {
    width: 16px;
    height: 16px;
}

.header-link-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.header-link-dropdown .header-link {
    background: none;
    border: none;
    cursor: pointer;
    line-height: 0;
}

.header-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.header-dropdown-menu.open {
    display: block;
}

.header-dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #d4d4d8;
    text-decoration: none;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.header-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

#images-feed {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    padding-right: 5px;
    box-sizing: border-box;
}

#earth-live-feed {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Himawari-8 Card Styles */
.himawari8-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.himawari8-card:hover {
    border-color: #555;
    transform: translateY(-2px);
}

.sunspot-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sunspot-card:hover {
    border-color: #555;
    transform: translateY(-2px);
}

.sunspot-card .sunspot-svg-container {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.sunspot-card:hover .sunspot-svg-container {
    filter: grayscale(0%);
}

.himawari8-header {
    border-bottom: 1px solid #333;
}

.himawari8-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    gap: 8px;
    padding: 7px 10px;
    padding-bottom: 9px;
}

.himawari-time {
    border-top: 1px solid #333;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    color: #666;
    font-size: 11px;
}

.himawari8-icon {
    width: 12px;
    height: 12px;
    filter: brightness(0.8);
}

.himawari8-text {
    display: flex;
    flex-direction: column;
}

.himawari8-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.himawari8-link:hover {
    color: #ccc;
}

.himawari8-name {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

.himawari8-image-container {
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    background: #111;
    aspect-ratio: 1 / 1;
}

.himawari8-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.himawari8-card:hover .himawari8-image {
    filter: grayscale(0%);
}

.himawari8-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.himawari8-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    z-index: 3;
    font-style: italic;
}

.himawari8-info {
    padding: 10px 12px;
    background: #1a1a1a;
}

.himawari8-timestamp {
    text-align: center;
}

.himawari8-time {
    font-size: 11px;
    color: #999;
}

.image-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.15s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.2s ease-out forwards;
}

.image-card:hover {
    background: #333;
    border-color: #555;
}

.image-container {
    position: relative;
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    filter: grayscale(100%);
    transition: filter 0.2s ease;
}

.image-card:hover img {
    filter: grayscale(0%);
}

.image-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-style: italic;
}

.image-info {
    padding: 15px;
}

.image-header {
    margin-bottom: 8px;
}

.image-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-icon {
    width: 12px;
    height: 12px;
    /* Removed filter since satellite.svg is now white */
    flex-shrink: 0;
    margin-top: 3px;
}

.image-times {
    margin-bottom: 10px;
}

.time-row {
    margin-bottom: 8px;
}

.time-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
}

.time-value {
    font-size: 12px;
    color: #ccc;
}

.image-details {
    margin-top: 5px;
}

.camera-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
}

.camera-value {
    font-size: 12px;
    color: #ccc;
}

.loading-images {
    text-align: center;
    color: #999;
    padding: 20px;
}

.loading-more {
    text-align: center;
    color: #999;
    padding: 15px;
    font-size: 14px;
}

.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #333;
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.4s linear infinite;
    margin-right: 5px;
    margin-top: 10px;
}

.loading-spinner-small {
    width: 8px;
    height: 8px;
    margin: 7px 0 0 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }

    50% {
        opacity: 0.3;
        transform: translateX(40px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRightPlaceholder {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }

    50% {
        opacity: 0.2;
        transform: translateX(40px);
    }

    100% {
        opacity: 0.5;
        transform: translateX(0);
    }
}

button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #e55a2b;
}

/* Image popup styles */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
    cursor: pointer;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}

.popup-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid #fff;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #000;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

.popup-close:hover {
    background: #ddd;
}

.popup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    display: none;
}

.popup-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.4s linear infinite;
    margin: 0 auto 10px;
}

.popup-loading-text {
    color: #fff;
    font-size: 12px;
    text-align: center;
}

/* Weather column styles */
#weather-feed {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    /* padding-right: 5px; // will reduce if more data*/
    box-sizing: border-box;
}

.weather-location-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.15s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.2s ease-out forwards;
}

.weather-location-card:hover {
    background: #131313;
    border-color: #333333;
}

.weather-location-header {
    padding: 10px;
    border-bottom: 1px solid #333;
}

.weather-location-header .image-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.location-link:hover {
    text-decoration: underline;
    color: #ccc;
}

.location-name {
    font-weight: bold;
}

.site-name {
    font-weight: normal;
    color: #666;
    font-size: 11px;
    margin-left: 0;
}

.location-icon {
    width: 12px;
    height: 12px;
    /* Removed filter since satellite.svg is now white */
    flex-shrink: 0;
    margin-top: 3px;
}

.weather-location-content {
    padding: 10px;
    position: relative;
}

.scroll-wrapper {
    position: relative;
}

.gradient-overlay-left,
.gradient-overlay-right {
    position: absolute;
    top: 0;
    bottom: 10px;
    width: 20px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.gradient-overlay-left {
    left: 0;
    background: linear-gradient(to right, #111, transparent);
    opacity: 0;
}

.gradient-overlay-right {
    right: 0;
    background: linear-gradient(to left, #111, transparent);
    opacity: 0;
}

.weather-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
}

.weather-day-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 12px;
    min-width: 180px;
    flex-shrink: 0;
    transition: all 0.15s;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInRight 0.2s ease-out forwards;
}

.weather-day-card:hover {
    background: #333;
    border-color: #555;
}

.weather-day-card.current-day {
    border-color: #555;
    background: #2a2a2a;
}

.weather-date {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 8px;
    font-weight: bold;
}

.date-text {
    font-weight: bold;
}

.sol-text {
    font-weight: normal;
    margin-left: 4px;
}

.weather-temp {
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
    margin-bottom: 10px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11px;
}

.weather-item:last-child {
    margin-bottom: 0;
}

.weather-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.weather-item span:first-of-type {
    color: #999;
    min-width: 45px;
}

.weather-value {
    color: #eee;
    margin-left: auto;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar for weather scroll */
.weather-scroll-container::-webkit-scrollbar {
    height: 3px;
}

.weather-scroll-container::-webkit-scrollbar-track {
    background: #181818;
    border-radius: 2px;
}

.weather-scroll-container::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 2px;
}

/* LEO Constellation styles */
.leo-constellation-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.constellation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333;
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.constellation-item:last-child {
    border-bottom: none;
}

.constellation-item.constellation-item-hidden {
    display: none;
}

.constellation-item.show {
    display: flex;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.2s ease forwards;
}

.constellation-item.collapsing {
    opacity: 1;
    transform: translateY(0);
    animation: fadeOutUp 0.2s ease forwards;
}

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

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.constellation-name-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.constellation-name {
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.constellation-percentage {
    font-size: 12px;
    color: #aaa;
    font-weight: normal;
}

.constellation-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.skull-icon {
    width: 10px;
    height: 10px;
    filter: invert(1) brightness(0.7);
    flex-shrink: 0;
}

.dead-count {
    font-size: 12px;
    color: #aaa;
    font-family: monospace;
    font-weight: normal;
}

.total-count {
    font-size: 14px;
    color: #fff;
    font-family: monospace;
    font-weight: bold;
}

.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.show-more-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-1px);
}

/* Satellites feed specific styles */
#satellites-feed {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Sidebar styles */
.sidebar {
    width: 60px;
    height: 100vh;
    background: #000;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

.logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.sidebar-version {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 10px;
}

.sidebar-version:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gear-icon {
    width: 20px;
    height: 20px;
    filter: invert(1) brightness(0.8);
    transition: all 0.2s ease;
}

.gear-icon:hover {
    filter: invert(1) brightness(1);
    transform: rotate(15deg);
}

/* About modal styles */
.about-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.about-modal.show {
    display: flex;
}

.about-content {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: center;
}

.about-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.about-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.about-header {
    margin-bottom: 20px;
}

.about-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 15px;
}

.about-header h2 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.about-version {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.about-description {
    color: #ccc;
    line-height: 1.5;
}

.about-description p {
    margin: 0;
    font-size: 14px;
    margin-bottom: 20px;
}

.about-description p.small-text {
    font-size: 0.7rem;
    color: #444;
}

/* Column animation classes */
.column-ready {
    opacity: 1;
    transform: translateX(0);
    animation: none;
}

.column-delay-1 {
    animation-delay: 0.05s;
}

.column-delay-2 {
    animation-delay: 0.1s;
}

.column-delay-3 {
    animation-delay: 0.15s;
}

.placeholder-content {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* McMurdo Station weather styles */
.mcmurdo-weather-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
}

.mcmurdo-current-day {
    border-color: #555;
    background: #2a2a2a;
    min-width: 180px;
    flex-shrink: 0;
    border-radius: 5px;
    padding: 12px;
}

/* Location text layout for McMurdo */
.location-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-location-header .image-title {
    align-items: flex-start;
}

/* McMurdo Camera section */
.weather-location-cam {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-bottom: 1px solid #333;
    position: relative;
    cursor: pointer;
}

.mcmurdo-cam-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.2s ease;
}

.weather-location-cam:hover .mcmurdo-cam-image {
    filter: grayscale(0%);
}

/* McMurdo Camera Loading */
.mcmurdo-cam-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Coming Soon Cards */
.coming-soon-card {
    background: #1a1a1a;
    border: 1px solid #333;
    opacity: 0.4;
}

.coming-soon-card:hover {
    background: #222;
    border-color: #555;
    opacity: 0.6;
}

.coming-soon-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
}

.coming-soon-text {
    color: #555;
    font-size: 14px;
    text-align: center;
    font-style: italic;
    font-weight: normal;
}

/* Custom scrollbar for Antarctic weather containers */
.mcmurdo-weather-container::-webkit-scrollbar {
    height: 3px;
}

.mcmurdo-weather-container::-webkit-scrollbar-track {
    background: #181818;
    border-radius: 2px;
}

.mcmurdo-weather-container::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 2px;
}

/* DSN Station Card Styles */
.dsn-station-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.15s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.2s ease-out forwards;
}

.dsn-station-card:hover {
    background: #131313;
    border-color: #444;
}

.dsn-station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #333;
    background: #0f0f0f;
}

.station-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.station-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.station-details {
    font-size: 11px;
    color: #999;
}

.station-signals {
    display: flex;
    align-items: center;
}

.station-signals .signal-indicator {
    background: #222;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    font-family: monospace;
}

.station-signals .signal-indicator.active {
    background: #1a4a1a;
    border-color: #4a7c59;
    color: #8fbc8f;
}

.station-signals .signal-indicator.inactive {
    background: #2a1a1a;
    border-color: #4a3333;
    color: #bc8f8f;
}

.dsn-dishes-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dish-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    transition: all 0.15s;
}

.dish-card:hover {
    background: #222;
    border-color: #444;
}

.dish-card.active {
    border-color: #4a7c59;
    background: #1a2a1a;
}

.dish-card.inactive {
    opacity: 0.6;
}

.dish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dish-name {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    font-family: monospace;
}

.dish-status {
    font-size: 14px;
}

.dish-status.active {
    color: #8fbc8f;
}

.dish-status.inactive {
    color: #bc8f8f;
}

.dish-activity {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    line-height: 1.3;
}

.dish-spacecraft {
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
    padding: 3px 6px;
    background: #333;
    border-radius: 3px;
    display: inline-block;
    font-family: monospace;
}

.signals-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.signals-container .signal-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #222;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 4px 6px;
    font-size: 10px;
    font-family: monospace;
    transition: all 0.15s;
}

.signals-container .signal-indicator.active {
    background: #1a3a1a;
    border-color: #4a7c59;
}

.signals-container .signal-indicator.inactive {
    background: #2a1a1a;
    border-color: #4a3333;
    opacity: 0.7;
}

.signals-container .signal-indicator.up {
    border-left: 3px solid #4a7c59;
}

.signals-container .signal-indicator.down {
    border-left: 3px solid #7c59a9;
}

.signals-container .signal-indicator.inactive.up {
    border-left: 3px solid #4a5933;
}

.signals-container .signal-indicator.inactive.down {
    border-left: 3px solid #5a4a7c;
}

.signal-arrow {
    font-size: 12px;
    font-weight: bold;
}

.signal-band {
    font-weight: bold;
    color: #fff;
}

.signal-rate {
    color: #aaa;
}

.signal-power {
    color: #888;
}

.station-timestamp {
    padding: 8px 12px;
    border-top: 1px solid #333;
    background: #0a0a0a;
    font-size: 10px;
    color: #666;
    text-align: center;
}

#transmissions-feed {
    padding: 10px;
}

/* Simple Dish Card Styles */
.simple-dish-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    transition: all 0.15s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.2s ease-out forwards;
}

.simple-dish-card:hover {
    background: #131313;
    border-color: #444;
}

.simple-dish-card .card-content {
    flex: 1;
    padding: 12px;
}

#transmissions-feed .simple-dish-card .card-content {
    padding: 0;
}

/* 5-segment signal bar at top of card */
.signal-bar {
    position: relative;
    display: flex;
    height: 3px;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    gap: 1px;
}

.signal-segment {
    flex: 1;
    background: #222;
}

/* Single white dot traveling via pseudo-element — step-end = instant jumps, no gray */
.simple-dish-card.active .signal-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    height: 100%;
    background: #fff;
    opacity: 0.25;
    transition: opacity 0.2s;
}

.simple-dish-card.active:hover .signal-bar::before {
    opacity: 1;
}

.simple-dish-card.active.uplink .signal-bar::before {
    animation: dotRight 2s step-end var(--signal-delay, 0s) infinite;
}

.simple-dish-card.active.downlink .signal-bar::before {
    animation: dotLeft 2s step-end var(--signal-delay, 0s) infinite;
}

.simple-dish-card.active.bidirectional .signal-bar::before {
    animation: dotBounce 3.2s step-end var(--signal-delay, 0s) infinite;
}

/* Uplink: left → right, reappears from left */
@keyframes dotRight {
    0%   { transform: translateX(0%); }
    20%  { transform: translateX(100%); }
    40%  { transform: translateX(200%); }
    60%  { transform: translateX(300%); }
    80%  { transform: translateX(400%); }
    100% { transform: translateX(0%); }
}

/* Downlink: right → left, reappears from right */
@keyframes dotLeft {
    0%   { transform: translateX(400%); }
    20%  { transform: translateX(300%); }
    40%  { transform: translateX(200%); }
    60%  { transform: translateX(100%); }
    80%  { transform: translateX(0%); }
    100% { transform: translateX(400%); }
}

/* Bidirectional: bounce 1→2→3→4→5→4→3→2→(repeat) */
@keyframes dotBounce {
    0%    { transform: translateX(0%); }
    12.5% { transform: translateX(100%); }
    25%   { transform: translateX(200%); }
    37.5% { transform: translateX(300%); }
    50%   { transform: translateX(400%); }
    62.5% { transform: translateX(300%); }
    75%   { transform: translateX(200%); }
    87.5% { transform: translateX(100%); }
    100%  { transform: translateX(0%); }
}

.dish-connection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    font-family: monospace;
    font-size: 13px;
    border-bottom: 1px solid #333;
    padding: 10px 12px;
}

.connection-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ground-icon {
    /* No filter needed - SVG is already white */
}

.satellite-icon {
    /* No filter needed - SVG is already white */
}

.dish-connection .dish-name {
    color: #fff;
    font-weight: bold;
}

.connection-col-1,
.connection-col-3 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.connection-col-1 {
    justify-content: flex-start;
}

.connection-col-3 {
    justify-content: flex-end;
    text-align: right;
}

.dish-connection .target-name {
    color: #fff;
    font-weight: bold;
}

.dish-timestamp {
    padding: 12px;
    border-bottom: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.station-location {
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-marker-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.timestamp-text {
    font-size: 11px;
    color: #666;
}

.dish-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 12px;
    color: #ccc;
}

/* DSN Toggle Styles */
.dsn-dish-hidden {
    display: none;
}

.dsn-show {
    display: flex;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.2s ease forwards;
}

.dsn-collapsing {
    opacity: 1;
    transform: translateY(0);
    animation: fadeOutUp 0.2s ease forwards;
}

.dsn-show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.dsn-show-more-btn {
    background: #222;
    border: 1px solid #444;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-family: 'iAWriterQuattro', monospace;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dsn-show-more-btn:hover {
    background: #333;
    border-color: #555;
    color: #fff;
}

/* Time icon styles */
.time-icon {
    vertical-align: middle;
    filter: brightness(0) invert(1);
    /* Makes any SVG white */
}

.time-icon-station {
    width: 12px;
    height: 12px;
    margin-left: 4px;
}

.time-icon-dish {
    width: 10px;
    height: 10px;
    margin: 0;
    flex-shrink: 0;
}

/* Prevent animation on DSN refresh */
#transmissions-feed.dsn-updating .dsn-station-card,
#transmissions-feed.dsn-updating .simple-dish-card {
    animation: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}

#transmissions-feed.dsn-updating .dsn-station-card *,
#transmissions-feed.dsn-updating .simple-dish-card * {
    animation: none !important;
    transition: none !important;
}

/* Alternative approach - prevent fade-in animation only on cards with no-animation class */
.dsn-station-card.no-animation,
.simple-dish-card.no-animation {
    animation: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Allow signal bar dot animation to work on no-animation cards */
.simple-dish-card.no-animation.active.uplink .signal-bar::before     { animation: dotRight  2s   step-end infinite !important; }
.simple-dish-card.no-animation.active.downlink .signal-bar::before   { animation: dotLeft   2s   step-end infinite !important; }
.simple-dish-card.no-animation.active.bidirectional .signal-bar::before { animation: dotBounce 3.2s step-end infinite !important; }

.sunspot-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.sunspot-count-item {
    display: flex;
    align-items: stretch;
    font-size: 11px;
    border-radius: 4px;
    overflow: visible;
    border: 1px solid #3f3f46;
    cursor: help;
    position: relative;
    overflow: clip;
}

.himawari8-image-container {
    overflow: hidden;
}

.sunspot-svg-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
}

.sunspot-svg-container svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.06);
}

#body-tooltip {
    display: none;
    position: absolute;
    background-color: #18181b;
    color: #d4d4d8;
    font-size: 11px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #3f3f46;
    width: 220px;
    white-space: normal;
    pointer-events: none;
    z-index: 9999;
}

.sunspot-count-label {
    background-color: #151515;
    color: #a1a1aa;
    padding: 1px 7px;
    white-space: nowrap;
    line-height: 1.8;
}

.sunspot-count-badge {
    background-color: #171717;
    border-left: 1px solid #555;
    color: #e4e4e7;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
    line-height: 1.8;
}

/* Wikipedia popup */
.wiki-popup {
    position: fixed;
    z-index: 1000;
    width: 280px;
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: visible;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wiki-popup.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Arrow — border layer */
.wiki-popup::before {
    content: '';
    position: absolute;
    top: var(--arrow-top, 16px);
    left: -9px;
    border: 9px solid transparent;
    border-right-color: #333;
    border-left-width: 0;
}

/* Arrow — fill layer */
.wiki-popup::after {
    content: '';
    position: absolute;
    top: calc(var(--arrow-top, 16px) + 1px);
    left: -8px;
    border: 8px solid transparent;
    border-right-color: #111;
    border-left-width: 0;
}

/* Flipped: popup is to the left, arrow points right */
.wiki-popup.flipped::before {
    left: auto;
    right: -9px;
    border-right-color: transparent;
    border-left-color: #333;
    border-left-width: 9px;
    border-right-width: 0;
}

.wiki-popup.flipped::after {
    left: auto;
    right: -8px;
    border-right-color: transparent;
    border-left-color: #111;
    border-left-width: 8px;
    border-right-width: 0;
}

.wiki-popup-inner {
    border-radius: 5px;
    overflow: hidden;
}

.wiki-popup-loading {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.wiki-popup-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: #1a1a1a;
}

.wiki-popup-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wiki-popup-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

.wiki-popup-desc {
    font-size: 11px;
    color: #999;
    line-height: 1.5;
}

.wiki-popup-link {
    font-size: 11px;
    color: #666;
    text-decoration: none;
    margin-top: 2px;
}

.wiki-popup-link:hover {
    color: #aaa;
}

.connection-col-3,
.constellation-name,
#himawari8-card .himawari8-title,
#himawari8-card .himawari8-title * {
    cursor: help;
}
