/* Reset & Futuristic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Share+Tech+Mono&display=swap');

:root {
    --main-color: #00ffcc;
    --border-glow: rgba(0, 255, 204, 0.3);
}

body.theme-ambient {
    --main-color: #00ffcc;
    --border-glow: rgba(0, 255, 204, 0.3);
}

body.theme-rock {
    --main-color: #ff3300;
    --border-glow: rgba(255, 51, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body {
    background-color: #020208;
    color: var(--main-color);
    font-family: 'Share Tech Mono', monospace;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow: hidden;
}

/* Layout Wrapper */
.interface-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 850px;
    height: 96vh;
    justify-content: space-between;
    gap: 12px;
}

/* Pulsante X */
#close-widget-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 99;
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid #ff0055;
    color: #ff0055;
    width: 38px;
    height: 38px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
#close-widget-btn:hover {
    background: #ff0055;
    color: #fff;
    box-shadow: 0 0 15px #ff0055;
}

/* Cyberpunk Box */
.cosmic-container {
    position: relative;
    z-index: 10;
    width: 100%;
    flex-grow: 1;
    background: rgba(5, 5, 15, 0.95);
    border: 2px solid var(--main-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    backdrop-filter: blur(6px);
    overflow: hidden;
    animation: containerGlow 6s ease-in-out infinite alternate;
}

@keyframes containerGlow {
    from { box-shadow: 0 0 15px var(--border-glow), inset 0 0 10px var(--border-glow); }
    to { box-shadow: 0 0 30px var(--border-glow), inset 0 0 15px var(--border-glow); }
}

/* Animated Stars Back */
.space-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
.stars, .stars2 {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(#ffffff 1px, transparent 1px),
        radial-gradient(var(--main-color) 2px, transparent 2px);
    background-size: 550px 550px, 350px 350px;
    background-position: 0 0, 40px 60px;
    animation: spaceTravel 90s linear infinite;
}
.stars2 { background-size: 250px 250px; animation: spaceTravel 45s linear infinite; opacity: 0.3; }
@keyframes spaceTravel { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.interface-header {
    font-size: 1rem;
    letter-spacing: 2px;
    border-bottom: 1px dashed var(--border-glow);
    padding-bottom: 8px;
    text-align: left;
    z-index: 5;
    padding-right: 45px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff0055;
    border-radius: 50%;
    animation: pulse 1s infinite alternate;
}
@keyframes pulse { from { opacity: 0.4; box-shadow: 0 0 2px #ff0055; } to { opacity: 1; box-shadow: 0 0 10px #ff0055; } }

/* Display Core */
.display-core {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    gap: 10px;
}

.planet-time-wrapper { text-align: center; }
#planet-name { font-family: 'Orbitron', sans-serif; font-size: 1.6rem; letter-spacing: 4px; text-shadow: 0 0 10px var(--border-glow); }
.neon-text { font-size: 2.6rem; font-weight: bold; font-family: 'Orbitron', sans-serif; color: #ffffff; text-shadow: 0 0 15px var(--main-color); margin: 2px 0; }
#planet-info { font-size: 0.85rem; letter-spacing: 1px; opacity: 0.8; }

/* Planet Sphere */
.planet-viewport {
    width: 120px;
    height: 120px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    border-radius: 50%;
}
.planet-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    background-size: 200% 100%;
    box-shadow: inset -20px -20px 40px #000, inset 8px 8px 20px rgba(255,255,255,0.15);
    animation: planetSpin 15s linear infinite;
}
@keyframes planetSpin { from { background-position: 0% 50%; } to { background-position: -200% 50%; } }

/* Textures */
.sun { background-image: linear-gradient(90deg, #ff3300, #ffaa00, #ffffcc, #ff3300); box-shadow: inset -10px -10px 30px #772200, 0 0 35px #ffaa00; }
.mercury { background-image: linear-gradient(90deg, #616161, #9e9e9e, #e0e0e0, #616161); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(158, 158, 158, 0.4); }
.venus { background-image: linear-gradient(90deg, #8a5a16, #e3bb7b, #f5e6cc, #8a5a16); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(227, 187, 123, 0.5); }
.earth { background-image: linear-gradient(90deg, #0d2b45, #203c56, var(--main-color), #0d2b45); box-shadow: inset -20px -20px 40px #000, 0 0 25px var(--border-glow); }
.moon { background-image: linear-gradient(90deg, #3a3a3a, #8c8c8c, #e0e0e0, #3a3a3a); box-shadow: inset -20px -20px 40px #000, 0 0 20px rgba(255, 255, 255, 0.4); }
.mars { background-image: linear-gradient(90deg, #5c1d00, #ff4500, #ff7a45, #5c1d00); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(255, 69, 0, 0.6); }
.jupiter { background-image: linear-gradient(90deg, #4a3319, #d4a373, #f4e1d2, #4a3319); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(212, 163, 115, 0.4); }
.saturn { background-image: linear-gradient(90deg, #6e5f37, #e9d8a6, #f7f1db, #6e5f37); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(233, 216, 166, 0.4); }
.uranus { background-image: linear-gradient(90deg, #275d5d, #afeeee, #e0ffff, #275d5d); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(175, 238, 238, 0.5); }
.neptune { background-image: linear-gradient(90deg, #0f1c3f, #4169e1, #a6bbf0, #0f1c3f); box-shadow: inset -20px -20px 40px #000, 0 0 25px rgba(65, 105, 225, 0.6); }

/* Selection Dock */
.planets-dock {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
}

.btn-planet {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 8px 2px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    text-align: center;
}
.btn-planet:hover, .btn-planet.active { background: var(--main-color); color: #020208; box-shadow: 0 0 10px var(--main-color); transform: scale(1.02); }

/* Custom Dropdowns */
.theme-select {
    background: #020208;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
}

.theme-select option {
    background-color: #020208;
    color: var(--main-color);
}

/* Desktop Responsiveness */
@media (min-width: 768px) {
    .planets-dock { grid-template-columns: repeat(10, 1fr); }
    .btn-planet { font-size: 0.72rem; padding: 12px 2px; }
    #planet-name { font-size: 2.4rem; }
    .neon-text { font-size: 4rem; }
    .planet-viewport { width: 160px; height: 160px; }
}

/* Fullscreen Engine */
.interface-wrapper:fullscreen {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    padding: 12px !important;
    background-color: #020208 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}