/* UPlanet Optimized Styles - Extracted from index.html */

/* Base styles */
body {
    padding: 0;
    margin: 0;
    font-family: sans-serif;
}

.slidecontainer {
    width: 80%;
    margin: 0 auto;
    text-align: center;
}

.gif-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.gif-container img {
    margin: 10px;
    max-width: 200px;
}

.slider {
    width: 100%;
    text-align: center;
}

.slider #prev {
    float: left;
    font-size: 40px;
}

.slider #next {
    float: right;
    font-size: 40px;
}

#glow-shadows.earth {
    background: url(maps/earth-glow-shadows.png);
}

#glow-shadows.mars {
    background: url(maps/mars-glow-shadows.png);
}

.flight {
    position: absolute;
    width: 32px;
    height: 32px;
    left: 10px;
    top: 10px;
    background: url(maps/plain.png);
    background-size: 100% 100%;
    margin-left: -16px;
    margin-top: -16px;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    transition: all 0.3s ease;
}

.flight:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

.button {
    background-color: #3498db;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

/* Console styles */
#console {
    visibility: hidden;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 100%;
    height: 80%;
    position: absolute;
    bottom: 50px;
    left: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    margin: 0;
    z-index: 999;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

#aframe {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#addressForm {
    text-align: center;
    margin-top: 20px;
}

#address {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #3498db;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease-in-out;
}

#address:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

/* Enhanced button styles */
button {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    font-size: 16px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.4);
}

/* Flyover modal styles */
#flyover-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 40, 0.95));
    backdrop-filter: blur(10px);
    z-index: 99999;
    overflow: auto;
    cursor: zoom-out;
    pointer-events: auto;
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(10px); }
}

#flyover-modal.hidden {
    pointer-events: none;
}

#flyover-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#flyover-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    cursor: zoom-in;
    transition: all 0.3s ease;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1) contrast(1.05);
}

#flyover-image.zoomed {
    cursor: move;
    transform-origin: top left;
}

#flyover-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#flyover-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Floating action button */
.floating-action-button {
    position: absolute;
    z-index: 100001;
    padding: 15px 25px;
    font-size: 24px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: floatIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

@keyframes floatIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3) translateY(100px) rotateX(-90deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0) rotateX(0deg); 
    }
}

.floating-action-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.floating-action-button:active {
    transform: translateY(-2px) scale(1.02);
}

.floating-action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    pointer-events: none;
}

/* Flyover trigger styles */
.flyover-trigger {
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.flyover-trigger-active {
    z-index: 10002 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.flyover-trigger:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.flyover-trigger::after {
    content: "ℹ️";
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.flyover-trigger:hover::after {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.6);
}

/* Button hierarchy management */
.flyover-hidden {
    opacity: 0.1 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    transition: opacity 0.3s ease !important;
}

/* Ensure main navigation buttons don't interfere */
h1 button {
    z-index: 1000;
    transition: all 0.3s ease;
}

h1 button.flyover-hidden {
    opacity: 0.05 !important;
    transform: scale(0.9) !important;
}

/* Special handling for geo-message button */
button[onclick*="nostr"] {
    z-index: 1000;
}

button[onclick*="nostr"].flyover-hidden {
    opacity: 0.05 !important;
    transform: translateY(10px) scale(0.8) !important;
}

/* Console toggle button special treatment */
button[onclick*="toggleConsole"] {
    z-index: 1001;
}

button[onclick*="toggleConsole"].flyover-trigger-active {
    z-index: 10002 !important;
    box-shadow: 0 0 20px rgba(142, 68, 173, 0.8) !important;
    transform: scale(1.1) !important;
}

/* Enhanced modal overlay */
#flyover-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Enhanced button animations for console buttons */
#console button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    margin: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#console button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

#console button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#console button:hover::before {
    left: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #flyover-content {
        padding: 10px;
    }
    
    #flyover-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 50px;
        height: 50px;
    }
    
    #flyover-image {
        max-width: 95%;
        max-height: 85%;
    }
    
    .floating-action-button {
        position: fixed !important;
        left: 50% !important;
        bottom: 20px !important;
        transform: translateX(-50%) !important;
        font-size: 18px !important;
        padding: 12px 20px !important;
        border-radius: 25px !important;
        min-width: 60px;
    }
    
    .flyover-trigger::after {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
}

/* Enhanced visual effects */
@keyframes particleEffect {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 0.7; }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

.floating-action-button:hover::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    animation: particleEffect 1s infinite;
    pointer-events: none;
}

/* Software recommendations panel */
#software-recommendations {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 40, 0.9));
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

/* Bang App Modal */
#bang-app-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    overflow: hidden;
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
