* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at center, #0d1117 0%, #000000 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
    transition: background 2s ease;
}

/* Mood-based background ambiance and globe colors */
body.bg-mood-happy {
    background: radial-gradient(ellipse at center, #1a1613 0%, #000000 100%);
}
body.bg-mood-happy .meridian,
body.bg-mood-happy .parallel {
    box-shadow: 
        0 0 1px rgba(255, 215, 0, 0.8),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
}
body.bg-mood-happy .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 215, 0, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-happy .particle,
body.bg-mood-happy .accent {
    border-color: rgba(255, 215, 0, 0.3);
    color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.3);
}

body.bg-mood-love {
    background: radial-gradient(ellipse at center, #1a0d14 0%, #000000 100%);
}
body.bg-mood-love .meridian,
body.bg-mood-love .parallel {
    box-shadow: 
        0 0 1px rgba(255, 105, 180, 0.8),
        inset 0 0 20px rgba(255, 105, 180, 0.1);
}
body.bg-mood-love .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(255, 105, 180, 0.15) 0%,
        rgba(255, 105, 180, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-love .particle,
body.bg-mood-love .accent {
    border-color: rgba(255, 105, 180, 0.3);
    color: rgba(255, 105, 180, 0.6);
    background: rgba(255, 105, 180, 0.3);
}

body.bg-mood-excited {
    background: radial-gradient(ellipse at center, #1a0f0d 0%, #000000 100%);
}
body.bg-mood-excited .meridian,
body.bg-mood-excited .parallel {
    box-shadow: 
        0 0 1px rgba(255, 127, 80, 0.8),
        inset 0 0 20px rgba(255, 127, 80, 0.1);
}
body.bg-mood-excited .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(255, 127, 80, 0.15) 0%,
        rgba(255, 127, 80, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-excited .particle,
body.bg-mood-excited .accent {
    border-color: rgba(255, 127, 80, 0.3);
    color: rgba(255, 127, 80, 0.6);
    background: rgba(255, 127, 80, 0.3);
}

body.bg-mood-calm {
    background: radial-gradient(ellipse at center, #0d1517 0%, #000000 100%);
}
body.bg-mood-calm .meridian,
body.bg-mood-calm .parallel {
    box-shadow: 
        0 0 1px rgba(100, 200, 200, 0.8),
        inset 0 0 20px rgba(100, 200, 200, 0.1);
}
body.bg-mood-calm .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(100, 200, 200, 0.15) 0%,
        rgba(100, 200, 200, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-calm .particle,
body.bg-mood-calm .accent {
    border-color: rgba(100, 200, 200, 0.3);
    color: rgba(100, 200, 200, 0.6);
    background: rgba(100, 200, 200, 0.3);
}

body.bg-mood-anxious {
    background: radial-gradient(ellipse at center, #120d17 0%, #000000 100%);
}
body.bg-mood-anxious .meridian,
body.bg-mood-anxious .parallel {
    box-shadow: 
        0 0 1px rgba(147, 112, 219, 0.8),
        inset 0 0 20px rgba(147, 112, 219, 0.1);
}
body.bg-mood-anxious .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(147, 112, 219, 0.15) 0%,
        rgba(147, 112, 219, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-anxious .particle,
body.bg-mood-anxious .accent {
    border-color: rgba(147, 112, 219, 0.3);
    color: rgba(147, 112, 219, 0.6);
    background: rgba(147, 112, 219, 0.3);
}

body.bg-mood-sad {
    background: radial-gradient(ellipse at center, #0d1117 0%, #000000 100%);
}
body.bg-mood-sad .meridian,
body.bg-mood-sad .parallel {
    box-shadow: 
        0 0 1px rgba(70, 130, 180, 0.8),
        inset 0 0 20px rgba(70, 130, 180, 0.1);
}
body.bg-mood-sad .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(70, 130, 180, 0.15) 0%,
        rgba(70, 130, 180, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-sad .particle,
body.bg-mood-sad .accent {
    border-color: rgba(70, 130, 180, 0.3);
    color: rgba(70, 130, 180, 0.6);
    background: rgba(70, 130, 180, 0.3);
}

body.bg-mood-angry {
    background: radial-gradient(ellipse at center, #170d0f 0%, #000000 100%);
}
body.bg-mood-angry .meridian,
body.bg-mood-angry .parallel {
    box-shadow: 
        0 0 1px rgba(220, 20, 60, 0.8),
        inset 0 0 20px rgba(220, 20, 60, 0.1);
}
body.bg-mood-angry .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(220, 20, 60, 0.15) 0%,
        rgba(220, 20, 60, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-angry .particle,
body.bg-mood-angry .accent {
    border-color: rgba(220, 20, 60, 0.3);
    color: rgba(220, 20, 60, 0.6);
    background: rgba(220, 20, 60, 0.3);
}

body.bg-mood-grateful {
    background: radial-gradient(ellipse at center, #0d170d 0%, #000000 100%);
}
body.bg-mood-grateful .meridian,
body.bg-mood-grateful .parallel {
    box-shadow: 
        0 0 1px rgba(50, 205, 50, 0.8),
        inset 0 0 20px rgba(50, 205, 50, 0.1);
}
body.bg-mood-grateful .glow-orb {
    background: radial-gradient(circle at center, 
        rgba(50, 205, 50, 0.15) 0%,
        rgba(50, 205, 50, 0.08) 30%,
        transparent 70%);
}
body.bg-mood-grateful .particle,
body.bg-mood-grateful .accent {
    border-color: rgba(50, 205, 50, 0.3);
    color: rgba(50, 205, 50, 0.6);
    background: rgba(50, 205, 50, 0.3);
}

/* Globe container */
#globeContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 1200px;
    z-index: 1;
}

/* Globe wrapper for rotation */
.globe-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    transform-style: preserve-3d;
    animation: rotateGlobe 20s linear infinite;
}

@keyframes rotateGlobe {
    from {
        transform: rotateY(0deg) rotateX(15deg);
    }
    to {
        transform: rotateY(360deg) rotateX(15deg);
    }
}

/* Globe */
.globe {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Meridians (vertical lines) */
.meridian {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    border-radius: 50%;
    box-shadow: 
        0 0 1px rgba(212, 175, 55, 0.8),
        inset 0 0 20px rgba(212, 175, 55, 0.1);
    transition: box-shadow 1s ease;
}

/* Parallels (horizontal lines) */
.parallel {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 1px rgba(212, 175, 55, 0.6),
        inset 0 0 10px rgba(212, 175, 55, 0.05);
    transition: box-shadow 1s ease;
}

/* Glow effect */
.glow-orb {
    position: absolute;
    width: 420px;
    height: 420px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, 
        rgba(212, 175, 55, 0.1) 0%,
        rgba(212, 175, 55, 0.05) 30%,
        transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: glowPulse 4s ease-in-out infinite;
    transition: background 1s ease;
}

/* Ambient particles */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
    z-index: 0;
    transition: background 1s ease;
}

@keyframes floatParticle {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    to {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

@keyframes glowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}


/* Emotion selector base styles - BEFORE media queries */
.emotion-selector {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}


/* Luxury corner accents */
.accent {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 10;
    transition: border-color 1s ease;
}

.accent-tl {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.accent-tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.accent-bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.accent-br {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Emotional pulse rings */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid;
    transform: translate(-50%, -50%);
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Main UI */
.main-ui {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.main-ui > * {
    pointer-events: auto;
}

/* Header */
.header {
    padding: 0.5rem 2rem 0.25rem 2rem;
    text-align: center;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInDown 1s ease-out forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #8b92a1;
    margin-bottom: 0;
}

/* Connection status indicator */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    animation: pulse 2s infinite;
}

.connection-text {
    color: #8b92a1;
}

/* Connection states */
.connection-dot.connected {
    background: rgba(212, 175, 55, 0.9);
    animation: pulse 2s infinite;
}

.connection-dot.connected + .connection-text {
    color: rgba(212, 175, 55, 0.9);
}

.connection-dot.connecting {
    background: rgba(212, 175, 55, 0.6);
    animation: pulse 1s infinite;
}

.connection-dot.connecting + .connection-text {
    color: rgba(212, 175, 55, 0.6);
}

.connection-dot.reconnecting {
    background: rgba(212, 175, 55, 0.4);
    animation: blink 1s infinite;
}

.connection-dot.reconnecting + .connection-text {
    color: rgba(212, 175, 55, 0.4);
}

.connection-dot.disconnected,
.connection-dot.error {
    background: rgba(212, 175, 55, 0.3);
    animation: none;
}

.connection-dot.disconnected + .connection-text,
.connection-dot.error + .connection-text {
    color: rgba(212, 175, 55, 0.3);
}

.connection-dot.failed {
    background: #991b1b;
    animation: none;
}

.connection-dot.failed + .connection-text {
    color: #991b1b;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    line-height: 1.4;
}

.notification-success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.notification-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Info Button */
.info-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.info-button .status-dot {
    position: absolute;
    top: 15%;
    left: -3px;
    transform: translate(0, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    border: 2px solid rgba(13, 17, 23, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

/* Status dot states */
.info-button .status-dot.connected {
    background: rgba(212, 175, 55, 0.9);
}

.info-button .status-dot.connecting {
    background: rgba(212, 175, 55, 0.6);
}

.info-button .status-dot.reconnecting {
    background: rgba(212, 175, 55, 0.4);
    animation: blink 1s infinite;
}

.info-button .status-dot.error,
.info-button .status-dot.disconnected {
    background: rgba(212, 175, 55, 0.3);
    animation: none;
}

.info-button .status-dot.failed {
    background: rgba(212, 175, 55, 0.2);
    animation: none;
}

/* Info Menu */
.info-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.info-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.info-menu {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(26, 15, 31, 0.98) 50%, rgba(15, 10, 26, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 2002;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(212, 175, 55, 0.1);
}

.info-menu.active {
    left: 0;
}

.info-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.02);
}

.info-menu-header h3 {
    margin: 0;
    color: rgba(212, 175, 55, 0.9);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(212, 175, 55, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.close-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: rgba(212, 175, 55, 0.9);
    transform: rotate(90deg);
}

.info-menu-content {
    padding: 0;
}

.menu-section {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.menu-section:last-child {
    border-bottom: none;
}

.menu-section h4 {
    margin: 0 0 1rem 0;
    color: rgba(212, 175, 55, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Location Settings Styles */
.location-settings {
    padding: 0.5rem 0;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.setting-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.toggle-btn {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 13px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
}

.toggle-indicator {
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.toggle-btn.active .toggle-indicator {
    background: rgba(212, 175, 55, 0.9);
    transform: translateX(24px);
}

.setting-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.location-status-info {
    padding: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.location-status-info small {
    color: rgba(212, 175, 55, 0.9);
    font-size: 0.85rem;
}

.menu-description {
    color: #8b92a1;
    line-height: 1.6;
    margin: 0;
}

/* Connection Status in Menu */
.connection-status-detailed .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.connection-status-detailed .status-row:last-child {
    margin-bottom: 0;
}

.status-label {
    color: #8b92a1;
    font-size: 0.9rem;
}

.status-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-value .connection-dot {
    width: 8px;
    height: 8px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(212, 175, 55, 0.9);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #8b92a1;
}

/* Menu Links */
.menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-links a {
    color: rgba(212, 175, 55, 0.6);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.menu-links a:hover {
    background: rgba(212, 175, 55, 0.05);
    color: rgba(212, 175, 55, 0.9);
    border-color: rgba(212, 175, 55, 0.2);
}

/* Menu Footer */
.menu-footer {
    text-align: center;
    color: rgba(212, 175, 55, 0.4);
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 1.5rem;
}

.menu-footer .version {
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    color: rgba(212, 175, 55, 0.3);
    letter-spacing: 0.05em;
}


.live-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Emotion selector - moved before media queries to prevent override */


.question {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 200;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

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

.emotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
}

.emotion-btn {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #8b92a1;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    min-width: 80px;
}

.emotion-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.emotion-btn:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active/touch states */
.emotion-btn:active,
.emotion-btn.touched {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}


.emotion-btn:hover::before {
    width: 150%;
    height: 150%;
}

.emotion-emoji {
    font-size: 2rem;
    filter: grayscale(0.5);
    transition: filter 0.3s;
}

.emotion-btn:hover .emotion-emoji {
    filter: grayscale(0);
}

.emotion-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.emotion-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Emotion Button Loading States */
.emotion-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.emotion-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    z-index: 10;
}

.emotion-btn.loading .emotion-emoji,
.emotion-btn.loading .emotion-label,
.emotion-btn.loading .emotion-count {
    opacity: 0.3;
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success State */
.emotion-btn.success {
    border-color: rgba(40, 167, 69, 0.6);
    background: rgba(40, 167, 69, 0.1);
}

.emotion-btn.success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(40, 167, 69, 0.9);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 10;
    opacity: 1;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { 
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.emotion-btn.success .emotion-emoji,
.emotion-btn.success .emotion-label,
.emotion-btn.success .emotion-count {
    opacity: 0.4;
}

/* Error State */
.emotion-btn.error {
    border-color: rgba(220, 53, 69, 0.6);
    background: rgba(220, 53, 69, 0.1);
    animation: errorShake 0.5s ease-in-out;
}

.emotion-btn.error::after {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(220, 53, 69, 0.9);
    font-size: 1.8rem;
    font-weight: bold;
    z-index: 10;
    opacity: 1;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.emotion-btn.error .emotion-emoji,
.emotion-btn.error .emotion-label,
.emotion-btn.error .emotion-count {
    opacity: 0.4;
}

/* Reset button states */
.emotion-btn:not(.loading):not(.success):not(.error) .emotion-emoji,
.emotion-btn:not(.loading):not(.success):not(.error) .emotion-label,
.emotion-btn:not(.loading):not(.success):not(.error) .emotion-count {
    opacity: 1;
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Accessibility - Focus Management */
.emotion-btn:focus,
.info-button:focus,
.close-btn:focus,
.mobile-emotions-trigger:focus {
    outline: 2px solid rgba(212, 175, 55, 0.8);
    outline-offset: 2px;
    border-color: rgba(212, 175, 55, 0.6);
}

.emotion-btn:focus {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .emotion-btn {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .emotion-btn:hover,
    .emotion-btn:focus {
        border-color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .connection-dot {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .emotion-btn,
    .globe-wrapper,
    .floating-emotion,
    .particle,
    .connection-line {
        animation: none !important;
        transition: none !important;
    }
    
    .emotion-btn:hover {
        transform: none;
    }
}

/* Stats sidebar */
.stats-panel {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    min-width: 200px;
    opacity: 0;
    animation: fadeInRight 1s ease-out 1s forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.stats-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b92a1;
    margin-bottom: 1rem;
}

.emotion-bar {
    margin-bottom: 1rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.emotion-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.emotion-bar-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.emotion-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Location cards */
.location-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    animation: locationPop 3s ease-out forwards;
    z-index: 5;
}

@keyframes locationPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    20% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    80% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
}

.location-emoji {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 1.1rem;
}

/* Floating emotions */
.floating-emotion {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    animation: floatUp 4s ease-out forwards;
    z-index: 2;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) scale(0.5);
    }
}

/* Connection lines */
.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform-origin: left center;
    animation: connectionFade 2s ease-out forwards;
    z-index: 0;
}

@keyframes connectionFade {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
    }
}

/* Daily mood summary */
.mood-summary {
    position: absolute;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    min-width: 200px;
    opacity: 0;
    animation: fadeInLeft 1s ease-out 1s forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.mood-time {
    font-size: 2rem;
    font-weight: 200;
    margin-bottom: 0.5rem;
}

.mood-dominant {
    font-size: 0.9rem;
    color: #8b92a1;
}

.mood-dominant-emoji {
    font-size: 3rem;
    margin: 1rem 0;
}

/* Share button */
.share-fab {
    position: fixed;
    bottom: 20px;
    left: 80px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.share-fab:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}



/* Glow effects */
.glow-happy { box-shadow: 0 0 30px rgba(255, 204, 0, 0.5); }
.glow-love { box-shadow: 0 0 30px rgba(255, 105, 180, 0.5); }
.glow-excited { box-shadow: 0 0 30px rgba(255, 127, 80, 0.5); }
.glow-calm { box-shadow: 0 0 30px rgba(100, 200, 200, 0.5); }
.glow-anxious { box-shadow: 0 0 30px rgba(147, 112, 219, 0.5); }
.glow-sad { box-shadow: 0 0 30px rgba(70, 130, 180, 0.5); }
.glow-angry { box-shadow: 0 0 30px rgba(220, 20, 60, 0.5); }
.glow-grateful { box-shadow: 0 0 30px rgba(50, 205, 50, 0.5); }

/* Mood-based globe styling */
#globeContainer.mood-happy .wireframe-ring {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.3),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
}

#globeContainer.mood-happy .globe-3d {
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.4));
}

#globeContainer.mood-love .wireframe-ring {
    border-color: rgba(255, 105, 180, 0.4);
    box-shadow: 
        0 0 15px rgba(255, 105, 180, 0.3),
        inset 0 0 15px rgba(255, 105, 180, 0.1);
}

#globeContainer.mood-love .globe-3d {
    filter: drop-shadow(0 0 40px rgba(255, 105, 180, 0.4));
}

#globeContainer.mood-excited .wireframe-ring {
    border-color: rgba(255, 127, 80, 0.4);
    box-shadow: 
        0 0 15px rgba(255, 127, 80, 0.3),
        inset 0 0 15px rgba(255, 127, 80, 0.1);
}

#globeContainer.mood-excited .globe-3d {
    filter: drop-shadow(0 0 40px rgba(255, 127, 80, 0.4));
}

#globeContainer.mood-calm .wireframe-ring {
    border-color: rgba(100, 200, 200, 0.4);
    box-shadow: 
        0 0 15px rgba(100, 200, 200, 0.3),
        inset 0 0 15px rgba(100, 200, 200, 0.1);
}

#globeContainer.mood-calm .globe-3d {
    filter: drop-shadow(0 0 40px rgba(100, 200, 200, 0.4));
}

#globeContainer.mood-anxious .wireframe-ring {
    border-color: rgba(147, 112, 219, 0.4);
    box-shadow: 
        0 0 15px rgba(147, 112, 219, 0.3),
        inset 0 0 15px rgba(147, 112, 219, 0.1);
}

#globeContainer.mood-anxious .globe-3d {
    filter: drop-shadow(0 0 40px rgba(147, 112, 219, 0.4));
}

#globeContainer.mood-sad .wireframe-ring {
    border-color: rgba(70, 130, 180, 0.4);
    box-shadow: 
        0 0 15px rgba(70, 130, 180, 0.3),
        inset 0 0 15px rgba(70, 130, 180, 0.1);
}

#globeContainer.mood-sad .globe-3d {
    filter: drop-shadow(0 0 40px rgba(70, 130, 180, 0.4));
}

#globeContainer.mood-angry .wireframe-ring {
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 
        0 0 15px rgba(220, 20, 60, 0.3),
        inset 0 0 15px rgba(220, 20, 60, 0.1);
}

#globeContainer.mood-angry .globe-3d {
    filter: drop-shadow(0 0 40px rgba(220, 20, 60, 0.4));
}

#globeContainer.mood-grateful .wireframe-ring {
    border-color: rgba(50, 205, 50, 0.4);
    box-shadow: 
        0 0 15px rgba(50, 205, 50, 0.3),
        inset 0 0 15px rgba(50, 205, 50, 0.1);
}

#globeContainer.mood-grateful .globe-3d {
    filter: drop-shadow(0 0 40px rgba(50, 205, 50, 0.4));
}

/* Add smooth transition for mood changes */
#globeContainer {
    transition: all 1.5s ease;
}

.globe-3d {
    transition: filter 1.5s ease;
}

/* Pulse animation for the container to avoid animation conflicts */
@keyframes containerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

#globeContainer.pulse {
    animation: containerPulse 1s ease-out;
}

/* Enhanced mood intensity based on activity */
#globeContainer.mood-intense .wireframe-ring {
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Initial Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #0d1117 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: rgba(212, 175, 55, 0.8);
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: rgba(212, 175, 55, 0.5);
    animation-delay: 0.2s;
    width: 70px;
    height: 70px;
    top: 5px;
    left: 5px;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: rgba(212, 175, 55, 0.3);
    animation-delay: 0.4s;
    width: 50px;
    height: 50px;
    top: 15px;
    left: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Clean 3-ring wireframe animations - always maintains sphere shape */

/* Equator - horizontal ring */
@keyframes rotateEquator {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Main meridian - vertical ring front to back */
@keyframes rotateMeridianMain {
    0% { transform: rotateY(0deg) rotateZ(90deg); }
    100% { transform: rotateY(360deg) rotateZ(90deg); }
}

/* Cross meridian - vertical ring left to right, perpendicular to main */
@keyframes rotateMeridianCross {
    0% { transform: rotateY(90deg) rotateZ(90deg); }
    100% { transform: rotateY(450deg) rotateZ(90deg); }
}

/* Queue indicator styles */
.emotion-btn.queued {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    position: relative;
    overflow: hidden;
}

.emotion-btn.queued::before {
    content: "⏳";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    z-index: 10;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.emotion-btn.queued::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: queueShimmer 2s infinite;
}

@keyframes queueShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Space for mobile styles - important! No mobile styles in the middle of the file! */
