/* Space Info app styles */
#background {
    position: relative;
}

#background canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    pointer-events: none;
    object-fit: cover;
}

#background .container {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #404040;
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
}

.button-section {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 12px 20px;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: clamp(14px, 2.5vw, 16px);
    margin: 5px;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, #c0392b, #a93226);
}

.loading {
    font-size: 20px;
    margin: 20px 0;
    color: #b0b0b0;
}

/* Astronaut styles */
.astronauts-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.astronaut-compact {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ffd700;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease;
    position: relative;
}

.astronaut-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,215,0,0.2);
}

.astronaut-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    padding: 4px;
    animation: fadeIn 1s ease-in forwards;
}

.astronaut-icon.spinning {
    animation: spinSlow 10s linear infinite;
}

.astronaut-icon.scale-out {
    animation: scaleOutContinueRotation 1.2s ease-out forwards;
}

.astronaut-icon.scale-in {
    animation: fadeInOnly 0.8s ease-out forwards;
    transform: scale(1);
}

/* Astronaut animations handled by DaisyUI classes */

.astronaut-info {
    flex: 1;
    min-width: 0;
}

.astronaut-name {
    font-weight: bold;
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.astronaut-craft {
    font-size: 12px;
    color: #b0b0b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.astronaut-flag {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    position: absolute;
    top: 8px;
    right: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.astronaut-flag:hover {
    transform: scale(1.1);
}

/* Simple animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scaleOutContinueRotation {
    0% { transform: scale(1) rotate(var(--current-rotation, 0deg)); }
    100% { transform: scale(0) rotate(calc(var(--current-rotation, 0deg) + 120deg)); }
}

@keyframes fadeInOnly {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Common text styles */
.total, .section-title {
    font-size: clamp(18px, 3.5vw, 24px);
    color: #ffd700;
    margin: 20px 0;
    font-weight: bold;
}

.section-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Event styles */
.events-container {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.event-item {
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #404040;
    color: #e0e0e0;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.12);
    border-color: #3498db;
}

.event-item.best-season {
    background: rgba(255,215,0,0.2);
    border: 2px solid #ffd700;
    box-shadow: 0 8px 20px rgba(255,215,0,0.4);
    transform: scale(1.02);
    z-index: 10;
    transition: all 0.3s ease;
}

.event-item.best-season:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 30px rgba(255,215,0,0.6);
    background: rgba(255,215,0,0.3);
    border-color: #ff6b35;
}

.event-item.best-season::before {
    content: "⭐ BEST SEASON ⭐";
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, #ffd700, #ff6b35);
    color: #000;
    padding: 0.5em 1.2em;
    border-radius: 0 12px 0 0;
    font-size: 0.7em;
    font-weight: bold;
    transform: translate(20%, -20%) rotate(45deg);
    transform-origin: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    z-index: 20;
    white-space: nowrap;
    min-width: 5em;
    text-align: center;
    line-height: 1.2;
    overflow: visible;
}

.event-type {
    font-size: clamp(16px, 3vw, 18px);
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 8px;
}

.event-date {
    font-size: clamp(14px, 2.5vw, 16px);
    color: #3498db;
    margin-bottom: 8px;
}

.event-description {
    font-size: clamp(13px, 2.2vw, 15px);
    color: #b0b0b0;
    line-height: 1.5;
}

/* Planet styles */
.planets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.planet-item {
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #9b59b6;
    color: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.planet-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.planet-item.pluto {
    border: 2px solid #666666;
}

.planet-name {
    font-size: clamp(16px, 3vw, 18px);
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
}

.planet-gif {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    margin: 10px auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: block;
}

.planet-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.planet-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.planet-symbol {
    font-size: 48px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.planet-fact {
    font-size: clamp(12px, 2vw, 14px);
    color: #b0b0b0;
    line-height: 1.4;
    margin-top: 10px;
}

.planet-comparison {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid #3498db;
}

.comparison-item {
    font-size: clamp(11px, 1.8vw, 13px);
    color: #d0d0d0;
    margin: 5px 0;
    line-height: 1.3;
}

.comparison-label {
    color: #ffd700;
    font-weight: bold;
    margin-right: 8px;
}

/* NASA APOD styles */
.apod-container {
    margin: 20px 0;
}

.apod-item {
    background: rgba(255,255,255,0.08);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #3498db;
    color: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: left;
}

.apod-title {
    font-size: clamp(18px, 3.5vw, 22px);
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.apod-date {
    font-size: clamp(14px, 2.5vw, 16px);
    color: #3498db;
    margin-bottom: 15px;
}

.apod-media-container {
    margin: 20px 0;
    text-align: center;
}

.apod-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.apod-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.apod-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.apod-video {
    width: 100%;
    height: 315px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.apod-explanation {
    font-size: clamp(14px, 2.2vw, 16px);
    color: #d0d0d0;
    line-height: 1.6;
    margin: 20px 0;
    text-align: justify;
}

.apod-credit {
    font-size: clamp(12px, 2vw, 14px);
    color: #b0b0b0;
    font-style: italic;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #404040;
}

/* Image fullscreen modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.image-modal img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

/* Responsive design */

/* Tablet and small desktop */
@media (max-width: 1024px) {
    .astronauts-compact {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
    }
}

/* Small tablet */
@media (max-width: 768px) {
    body { padding: 20px; }
    .container { padding: 20px; }
    .button-section { flex-direction: column; align-items: center; }
    button { width: 100%; max-width: 300px; }
    .planets-container { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .astronauts-compact { 
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
        gap: 10px; 
    }
    .astronaut-compact { padding: 10px; }
    .astronaut-icon { width: 35px; height: 35px; }
    .astronaut-name { font-size: 13px; }
    .astronaut-craft { font-size: 11px; }
    .apod-item { padding: 20px; }
    .apod-video { height: 250px; }
}

/* Mobile phones */
@media (max-width: 480px) {
    .container { padding: 15px; }
    .astronauts-compact { 
        grid-template-columns: 1fr; 
        gap: 8px; 
    }
    .astronaut-compact { 
        padding: 8px; 
        gap: 8px;
    }
    .astronaut-icon { width: 32px; height: 32px; }
    .astronaut-name { font-size: 12px; }
    .astronaut-craft { font-size: 10px; }
    .astronaut-flag { width: 20px; height: 20px; }
}