sw-fe/src/components/World/PlanetsWorld.css

636 lines
12 KiB
CSS

/* Planets World - Full screen group metaverse */
.planets-world {
position: relative;
width: 100%;
min-height: calc(100vh - 100px);
margin: 0;
padding: 0;
background: radial-gradient(ellipse at center, #0f0f1a 0%, #050510 70%, #000005 100%);
overflow: hidden;
}
.planets-world-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
/* Search bar - fixed below topbar */
.planets-world-search {
position: fixed;
top: 56px;
left: 50%;
transform: translateX(-50%);
z-index: 100;
display: flex;
align-items: center;
gap: 6px;
background: rgba(15, 10, 30, 0.86);
backdrop-filter: blur(10px);
border: 1px solid rgba(155, 89, 182, 0.45);
border-radius: 14px;
padding: 6px 10px;
max-width: min(580px, calc(100vw - 24px));
}
.planets-world-search .search-icon {
color: #9b59b6;
font-size: 18px;
}
.planets-world-search i {
color: rgba(255, 255, 255, 0.5);
font-size: 14px;
}
.planets-world-search .search-count {
font-size: 11px;
color: rgba(155, 89, 182, 0.9);
font-weight: 600;
padding: 2px 8px;
background: rgba(155, 89, 182, 0.15);
border-radius: 20px;
}
.planets-world-search .world-nav-inline {
display: flex;
gap: 4px;
margin-left: 6px;
}
.planets-world-search .world-nav-btn-sm {
width: 30px;
height: 30px;
border: none;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.7);
font-size: 13px;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.planets-world-search .world-nav-btn-sm:hover {
background: rgba(155, 89, 182, 0.3);
color: white;
}
.planets-world-search input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: white;
font-size: 14px;
font-weight: 500;
}
.planets-world-search input::placeholder {
color: rgba(255, 255, 255, 0.5);
}
.planets-world-search .search-clear {
background: rgba(255, 255, 255, 0.1);
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
color: white;
cursor: pointer;
transition: background 0.2s;
}
.planets-world-search .search-clear:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Planet markers */
.planet-marker {
cursor: pointer;
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.planet-marker:hover {
transform: scale(1.2);
z-index: 100;
}
.planet-marker-inner {
position: relative;
animation: planetOrbit 12s ease-in-out infinite;
filter: drop-shadow(0 0 20px rgba(155, 89, 182, 0.4));
}
.planet-marker:hover .planet-marker-inner {
filter: drop-shadow(0 0 30px rgba(155, 89, 182, 0.7));
}
.planet-svg {
overflow: visible;
}
.planet-marker-label {
position: absolute;
bottom: -25px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(135deg, rgba(15, 15, 26, 0.95), rgba(30, 30, 50, 0.9));
padding: 6px 14px;
border-radius: 16px;
border: 1px solid rgba(155, 89, 182, 0.3);
white-space: nowrap;
text-align: center;
backdrop-filter: blur(8px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.planet-marker-name {
display: block;
font-size: 12px;
font-weight: 700;
color: #d4a5ff;
}
.planet-marker-meta {
display: block;
font-size: 9px;
color: rgba(255, 255, 255, 0.6);
margin-top: 2px;
}
/* Tooltip */
.planets-world-tooltip {
position: fixed;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
z-index: 200;
display: flex;
align-items: center;
gap: 16px;
background: linear-gradient(135deg, rgba(15, 15, 26, 0.98), rgba(30, 30, 50, 0.95));
backdrop-filter: blur(20px);
border: 1px solid rgba(155, 89, 182, 0.4);
border-radius: 20px;
padding: 16px 24px;
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
animation: tooltipSlide 0.3s ease;
}
@keyframes tooltipSlide {
from {
opacity: 0;
transform: translateX(-50%) translateY(20px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
.tooltip-icon {
width: 56px;
height: 56px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: 0 4px 16px rgba(155, 89, 182, 0.4);
}
.tooltip-icon i {
font-size: 24px;
color: white;
}
.tooltip-info {
display: flex;
flex-direction: column;
gap: 4px;
}
.tooltip-name {
font-size: 16px;
font-weight: 700;
color: #d4a5ff;
}
.tooltip-desc {
font-size: 13px;
color: rgba(255, 255, 255, 0.8);
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tooltip-stats {
font-size: 11px;
color: rgba(255, 255, 255, 0.5);
font-weight: 600;
}
/* Planet detail modal */
.planet-modal-backdrop {
position: fixed;
inset: 0;
z-index: 500;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.planet-modal {
width: 90%;
max-width: 480px;
background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
border: 1px solid rgba(155, 89, 182, 0.3);
border-radius: 24px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
animation: modalSlide 0.3s ease;
}
@keyframes modalSlide {
from {
opacity: 0;
transform: scale(0.9) translateY(20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.planet-modal-close {
position: absolute;
top: 16px;
right: 16px;
width: 36px;
height: 36px;
border: none;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 16px;
cursor: pointer;
z-index: 10;
transition: background 0.2s;
}
.planet-modal-close:hover {
background: rgba(255, 255, 255, 0.2);
}
.planet-modal-header {
position: relative;
padding: 40px 24px 24px;
text-align: center;
}
.planet-modal-icon {
width: 80px;
height: 80px;
margin: 0 auto 16px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.15);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.planet-modal-icon i {
font-size: 36px;
color: white;
}
.planet-modal-header h2 {
font-size: 24px;
font-weight: 800;
color: white;
margin: 0 0 8px;
}
.planet-modal-header p {
font-size: 14px;
color: rgba(255, 255, 255, 0.8);
margin: 0;
}
.planet-modal-stats {
display: flex;
justify-content: center;
gap: 32px;
padding: 24px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.planet-modal-stats .stat {
text-align: center;
}
.planet-modal-stats .stat-value {
display: block;
font-size: 24px;
font-weight: 800;
color: #d4a5ff;
}
.planet-modal-stats .stat-label {
display: block;
font-size: 11px;
color: rgba(255, 255, 255, 0.5);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-top: 4px;
}
.planet-modal-actions {
display: flex;
gap: 12px;
padding: 24px;
}
.planet-action-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px 20px;
border: none;
border-radius: 12px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.1);
color: white;
}
.planet-action-btn:hover {
background: rgba(255, 255, 255, 0.15);
}
.planet-action-btn.planet-action-primary {
background: linear-gradient(135deg, #9b59b6, #8e44ad);
box-shadow: 0 4px 16px rgba(155, 89, 182, 0.4);
}
.planet-action-btn.planet-action-primary:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}
/* Planet Terrain View */
.planet-terrain-view {
position: fixed;
inset: 0;
z-index: 500;
background: linear-gradient(180deg, #0f0f1a 0%, #050510 100%);
animation: planetTerrainFadeIn 0.4s ease;
}
@keyframes planetTerrainFadeIn {
from {
opacity: 0;
transform: scale(1.1);
}
to {
opacity: 1;
transform: scale(1);
}
}
.planet-terrain-header {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
background: linear-gradient(180deg, rgba(15, 15, 26, 0.95) 0%, rgba(15, 15, 26, 0) 100%);
}
.planet-terrain-back {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(155, 89, 182, 0.3);
border-radius: 12px;
color: white;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.planet-terrain-back:hover {
background: rgba(155, 89, 182, 0.2);
border-color: rgba(155, 89, 182, 0.5);
}
.planet-terrain-info {
text-align: center;
}
.planet-terrain-info h2 {
margin: 0;
font-size: 20px;
font-weight: 700;
color: #d4a5ff;
}
.planet-terrain-theme {
font-size: 12px;
color: rgba(255, 255, 255, 0.6);
text-transform: uppercase;
letter-spacing: 1px;
}
.planet-terrain-actions {
display: flex;
gap: 10px;
}
.planet-terrain-action {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 12px;
color: white;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
}
.planet-terrain-action:hover {
background: rgba(255, 255, 255, 0.15);
}
.planet-terrain-post {
background: linear-gradient(135deg, #9b59b6, #8e44ad);
border: none;
font-weight: 600;
}
.planet-terrain-post:hover {
transform: scale(1.05);
box-shadow: 0 4px 16px rgba(155, 89, 182, 0.4);
}
.planet-terrain-canvas {
position: absolute;
inset: 0;
}
.planet-terrain-map {
width: 100%;
height: 100%;
}
.planet-terrain-loading {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
}
.planet-terrain-loading p {
color: rgba(255, 255, 255, 0.8);
font-size: 16px;
}
/* Planet post markers on terrain */
.planet-post-marker {
cursor: pointer;
transition: transform 0.2s ease;
}
.planet-post-marker:hover {
transform: scale(1.1);
z-index: 100;
}
/* Loading overlay */
.planets-world-loading {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 20px;
background: rgba(5, 5, 16, 0.95);
z-index: 300;
}
.planets-world-loading .loading-spinner {
width: 60px;
height: 60px;
border: 4px solid rgba(155, 89, 182, 0.2);
border-top-color: #9b59b6;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.planets-world-loading p {
color: rgba(255, 255, 255, 0.8);
font-size: 16px;
font-weight: 600;
}
/* Orbit animation */
@keyframes planetOrbit {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
25% {
transform: translateY(-8px) rotate(2deg);
}
50% {
transform: translateY(0) rotate(0deg);
}
75% {
transform: translateY(8px) rotate(-2deg);
}
}
/* Responsive */
@media (max-width: 768px) {
.planets-world-title {
font-size: 22px;
}
.planets-world-title i {
font-size: 24px;
}
.planets-world-search {
top: 90px;
padding: 10px 16px;
}
.planets-world-tooltip {
bottom: 70px;
padding: 12px 16px;
gap: 12px;
}
.tooltip-icon {
width: 44px;
height: 44px;
}
.tooltip-icon i {
font-size: 18px;
}
.tooltip-name {
font-size: 14px;
}
.planets-world-create {
bottom: 16px;
right: 16px;
padding: 12px 18px;
font-size: 13px;
}
.planet-modal {
width: 95%;
}
}