sw-fe/src/styles/island.css

478 lines
8.6 KiB
CSS

/* ===== ISLAND VIEWER MODAL ===== */
/* Animations for MapLibre-based islands */
@keyframes islandFloat {
0%, 100% {
transform: translateY(0px);
}
50% {
transform: translateY(-10px);
}
}
@keyframes treeSway {
0%, 100% {
transform: rotate(0deg);
}
50% {
transform: rotate(3deg);
}
}
@keyframes contentFloat {
0%, 100% {
transform: translateY(0px);
}
50% {
transform: translateY(-5px);
}
}
.island-viewer-modal {
position: fixed;
inset: 0;
z-index: 9999;
background: linear-gradient(135deg, rgba(0, 20, 40, 0.95) 0%, rgba(0, 10, 30, 0.98) 100%);
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(8px);
animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.island-viewer-container {
position: relative;
width: 92%;
max-width: 1300px;
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
border-radius: 24px;
padding: 2.5rem;
box-shadow:
0 25px 80px rgba(0, 0, 0, 0.7),
0 0 0 1px rgba(148, 163, 184, 0.1),
inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
border: 1px solid rgba(56, 189, 248, 0.2);
}
body[data-theme="blue"] .island-viewer-modal{
background: linear-gradient(135deg, rgba(3, 12, 40, 0.95) 0%, rgba(2, 8, 28, 0.98) 100%);
}
body[data-theme="blue"] .island-viewer-container{
background: linear-gradient(135deg, #0b1b3b 0%, #0f224d 60%, #163264 100%);
border-color: rgba(96, 165, 250, 0.35);
}
@keyframes slideUp {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.island-viewer-close {
position: absolute;
top: 1rem;
right: 1rem;
width: 40px;
height: 40px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
font-size: 24px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
z-index: 10;
}
.island-viewer-close:hover {
background: rgba(255, 255, 255, 0.3);
transform: rotate(90deg);
}
.island-viewer-close:active {
transform: rotate(90deg) scale(0.95);
}
/* Header */
.island-viewer-header {
text-align: center;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.island-header-row{
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
}
.island-header-avatar{
width: 64px;
height: 64px;
border-radius: 14px;
overflow: hidden;
border: 1px solid rgba(56, 189, 248, 0.6);
background: rgba(56, 189, 248, 0.15);
display: grid;
place-items: center;
color: #e2e8f0;
font-weight: 800;
}
.island-header-avatar img{
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.island-header-text{
text-align: left;
}
.island-tabbar{
margin-top: 12px;
display: inline-flex;
gap: 10px;
padding: 6px 10px;
border-radius: 999px;
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(148, 163, 184, 0.25);
}
.island-tab{
width: 34px;
height: 34px;
border-radius: 10px;
border: 0;
background: rgba(255, 255, 255, 0.08);
color: #e2e8f0;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.island-tab.is-active{
background: rgba(56, 189, 248, 0.25);
color: #fff;
box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}
.island-viewer-header h2 {
color: #f1f5f9;
font-size: 2.25rem;
margin-bottom: 0.75rem;
font-weight: 800;
text-shadow: 0 2px 12px rgba(56, 189, 248, 0.4);
letter-spacing: -0.02em;
}
.island-viewer-header p {
color: #cbd5e1;
font-size: 1.1rem;
font-style: italic;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* Profile panel */
.island-profile-panel {
display: flex;
gap: 1rem;
align-items: center;
padding: 0.75rem 1rem;
border-radius: 14px;
border: 1px solid rgba(148, 163, 184, 0.2);
background: rgba(15, 23, 42, 0.6);
margin-bottom: 1.5rem;
}
.island-posts-panel{
padding: 0.9rem 1rem;
border-radius: 14px;
border: 1px solid rgba(148, 163, 184, 0.2);
background: rgba(15, 23, 42, 0.6);
margin-bottom: 1.5rem;
max-height: 280px;
overflow: auto;
}
.island-post-row{
padding: 10px 12px;
border-radius: 12px;
background: rgba(2, 6, 23, 0.4);
border: 1px solid rgba(148, 163, 184, 0.18);
margin-bottom: 10px;
}
.island-post-title{
font-weight: 800;
font-size: 0.88rem;
color: #f8fafc;
}
.island-post-snippet{
font-size: 0.78rem;
color: rgba(226, 232, 240, 0.8);
margin-top: 4px;
}
.island-post-meta{
font-size: 0.72rem;
color: rgba(148, 163, 184, 0.85);
margin-top: 6px;
}
.island-posts-empty{
font-size: 0.85rem;
color: rgba(226, 232, 240, 0.75);
}
.island-profile-avatar {
width: 64px;
height: 64px;
border-radius: 14px;
overflow: hidden;
border: 1px solid rgba(56, 189, 248, 0.6);
background: rgba(56, 189, 248, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.island-profile-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.island-profile-letter {
color: #e2f2ff;
font-weight: 800;
font-size: 1.4rem;
}
.island-viewer-canvas-wrap{
position: relative;
}
.island-tabbar-overlay{
position: absolute;
right: 16px;
top: 16px;
}
.island-profile-meta {
flex: 1;
min-width: 0;
}
.island-profile-name {
font-size: 0.95rem;
font-weight: 800;
color: #e2e8f0;
margin-bottom: 0.35rem;
}
.island-profile-actions {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.island-profile-error{
font-size: 0.75rem;
color: #f87171;
}
.island-profile-info{
font-size: 0.75rem;
color: #86efac;
}
.island-profile-row {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.75rem;
color: #cbd5f5;
}
.island-profile-row select {
flex: 1;
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(148, 163, 184, 0.4);
color: #e2e8f0;
border-radius: 999px;
padding: 0.2rem 0.6rem;
font-size: 0.72rem;
}
.island-profile-input {
width: 100%;
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(148, 163, 184, 0.4);
color: #e2e8f0;
border-radius: 10px;
padding: 0.35rem 0.6rem;
font-size: 0.72rem;
}
.island-profile-btn {
align-self: flex-start;
border: 1px solid rgba(56, 189, 248, 0.6);
background: rgba(56, 189, 248, 0.2);
color: #e2f2ff;
font-weight: 800;
font-size: 0.72rem;
padding: 0.35rem 0.8rem;
border-radius: 999px;
cursor: pointer;
}
.island-profile-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* Canvas */
.island-viewer-canvas {
border-radius: 16px;
overflow: hidden;
box-shadow:
0 12px 40px rgba(0, 0, 0, 0.5),
0 0 0 1px rgba(56, 189, 248, 0.15),
inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
display: block;
margin: 0 auto;
border: 1px solid rgba(148, 163, 184, 0.1);
}
/* Stats */
.island-viewer-stats {
display: flex;
gap: 2rem;
justify-content: center;
margin-top: 1.5rem;
}
.stat {
text-align: center;
}
.stat-value {
display: block;
color: white;
font-size: 2rem;
font-weight: bold;
margin-bottom: 0.25rem;
}
.stat-label {
color: rgba(255, 255, 255, 0.7);
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Footer */
.island-viewer-footer {
text-align: center;
margin-top: 1rem;
}
.island-info {
color: rgba(255, 255, 255, 0.6);
font-size: 0.85rem;
margin: 0;
}
/* ===== ISLAND MARKERS (on map) ===== */
.island-marker {
opacity: 0;
transition: opacity 0.4s ease;
}
.island-marker.sw-appear-in {
opacity: 1;
}
.island-marker-container {
pointer-events: auto;
}
/* Responsive */
@media (max-width: 768px) {
.island-viewer-container {
width: 95%;
padding: 1.5rem;
}
.island-viewer-header h2 {
font-size: 1.5rem;
}
.island-viewer-canvas {
height: 400px !important;
}
.island-viewer-stats {
flex-wrap: wrap;
gap: 1rem;
}
.stat-value {
font-size: 1.5rem;
}
}
/* Light theme support */
body[data-theme="light"] .island-viewer-container {
background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
}
body[data-theme="light"] .island-viewer-header h2 {
color: #1e3a8a;
}
body[data-theme="light"] .island-viewer-header p {
color: rgba(30, 58, 138, 0.8);
}
body[data-theme="light"] .stat-value {
color: #1e3a8a;
}
body[data-theme="light"] .stat-label {
color: rgba(30, 58, 138, 0.7);
}
body[data-theme="light"] .island-info {
color: rgba(30, 58, 138, 0.6);
}
body[data-theme="light"] .island-viewer-close {
background: rgba(30, 58, 138, 0.2);
color: #1e3a8a;
}
body[data-theme="light"] .island-viewer-close:hover {
background: rgba(30, 58, 138, 0.3);
}