ia23s
could we have the score numbers under the attributes please and without the circle, just a clean number, also all the texts centered please in css and also the added min max mobile and desktop context aware dynamic re-spacing, not tough code
e90c4b4 verified
Raw
History Blame Contribute Delete
5.12 kB
/* DepthMap Trait Architect - Additional Styles */
/* Ensure smooth transitions and crisp rendering */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Custom scrollbar for panel */
#panelContent::-webkit-scrollbar { width: 8px; }
#panelContent::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 8px; }
#panelContent::-webkit-scrollbar-track { background: transparent; }
/* Honeycomb Grid Container */
#hexGrid {
position: relative;
margin: 0 auto;
}
/* Hex cell base - pointy-top hexagons for better interlocking */
.hex {
position: absolute;
width: 140px;
height: 161.24px; /* width * 0.866 for pointy-top hex height */
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform, filter, opacity;
cursor: pointer;
}
/* Enhanced hover effects */
.hex:hover {
transform: translateY(-8px) scale(1.03);
filter: brightness(1.1) saturate(1.1);
z-index: 10;
}
/* Hex inner content with better positioning */
.hex-inner {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 20px 12px;
background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
}
/* Hex label with improved typography */
.hex-label {
font-weight: 700;
letter-spacing: 0.02em;
font-size: 14px;
line-height: 1.3;
color: #1e293b;
text-shadow: 0 1px 2px rgba(255,255,255,0.4);
mix-blend-mode: luminosity;
margin-bottom: 8px;
width: 100%;
text-align: center;
word-wrap: break-word;
}
/* Clean score display */
.hex-score {
font-size: 20px;
font-weight: 800;
color: #1e293b;
text-shadow: 0 1px 3px rgba(255,255,255,0.5);
opacity: 0;
transform: translateY(4px);
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 4px;
}
/* Show score on hover when trait is "unlocked" */
.hex.revealed:hover .hex-score,
.hex.revealed .hex-score {
opacity: 1;
transform: translateY(0);
}
/* Glow ring with enhanced effects */
.hex-ring {
position: absolute;
inset: -8px;
clip-path: inherit;
z-index: -1;
filter: blur(12px);
opacity: 0.8;
transition: all 300ms ease;
}
.hex:hover .hex-ring {
filter: blur(16px);
opacity: 1;
transform: scale(1.05);
}
/* Loading animation for hex entrance */
@keyframes hexFadeIn {
0% {
opacity: 0;
transform: translateY(30px) scale(0.8) rotate(-2deg);
}
100% {
opacity: 1;
transform: translateY(0) scale(1) rotate(0deg);
}
}
.hex {
animation: hexFadeIn 500ms ease-out forwards;
opacity: 0;
}
/* Staggered animation delays for honeycombing effect */
.hex:nth-child(1) { animation-delay: 0ms; }
.hex:nth-child(2) { animation-delay: 50ms; }
.hex:nth-child(3) { animation-delay: 100ms; }
.hex:nth-child(4) { animation-delay: 150ms; }
.hex:nth-child(5) { animation-delay: 200ms; }
.hex:nth-child(6) { animation-delay: 250ms; }
.hex:nth-child(7) { animation-delay: 300ms; }
.hex:nth-child(8) { animation-delay: 350ms; }
.hex:nth-child(9) { animation-delay: 400ms; }
/* Panel transitions */
#panelContent.translate-x-0 { transform: translateX(0); }
#panelBackdrop.opacity-100 { opacity: 1; }
/* Enhanced panel backdrop */
#panelBackdrop {
backdrop-filter: blur(8px);
transition: opacity 250ms ease;
}
/* Responsive hexagonal grid */
@media (max-width: 1024px) {
.hex {
width: 130px;
height: 150px;
}
.hex-label { font-size: 13px; }
.hex-score { font-size: 18px; }
.hex-inner { padding: 18px 10px; }
}
@media (max-width: 768px) {
.hex {
width: 110px;
height: 127px;
}
.hex-label { font-size: 12px; margin-bottom: 6px; }
.hex-score { font-size: 16px; margin-top: 2px; }
.hex-inner { padding: 16px 8px; }
}
@media (max-width: 480px) {
.hex {
width: 90px;
height: 104px;
}
.hex-label { font-size: 11px; margin-bottom: 4px; }
.hex-score { font-size: 14px; margin-top: 2px; }
.hex-inner { padding: 14px 6px; }
}
@media (min-width: 1280px) {
.hex {
width: 160px;
height: 184px;
}
.hex-label { font-size: 15px; margin-bottom: 10px; }
.hex-score { font-size: 22px; margin-top: 6px; }
.hex-inner { padding: 24px 14px; }
}
/* Pulse effect for interactive elements */
@keyframes gentlePulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
.hex:hover {
animation: gentlePulse 2s ease-in-out infinite;
}
/* Subtle shadow enhancement */
.hex-inner {
box-shadow:
0 4px 20px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.2),
inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.hex:hover .hex-inner {
box-shadow:
0 8px 30px rgba(0, 0, 0, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.3),
inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
/* Small utility for hidden but accessible labels */
.sr-only {
position: absolute !important;
height: 1px; width: 1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap;
}