/* Vertical Tower Transformation */
.element-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Making it "Lots Taller" */
    min-height: 180px; 
    border: 1px solid rgba(255,255,255,0.1);
    margin: 2px;
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 50% 100%, 0% 90%); /* Vector-style "Arrow" bottom */
}

/* Dynamic State Classes (to be toggled by JS) */
.state-melting {
    background: var(--bg-melt);
    box-shadow: 0 0 15px var(--bg-melt);
}

.state-boiling {
    background: var(--bg-boil);
    filter: brightness(1.2);
}
/* style.css */
:root {
    --transition-speed: 0.6s;
    --column-width: 80px;
}

.periodic-table {
    display: grid;
    grid-template-columns: repeat(18, var(--column-width));
    gap: 10px;
    padding: 20px;
    align-items: end; /* Aligns pillars to the bottom */
}

.element-card {
    /* The "Lots Taller" part */
    height: 300px; 
    width: var(--column-width);
    
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 20px;
    
    /* Vector Math Shape */
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: all var(--transition-speed) cubic-bezier(0.23, 1, 0.32, 1);
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

.element-card:hover {
    height: 450px; /* Interactive height boost */
    z-index: 10;
    box-shadow: 0 0 30px rgba(255,255,255,0.5);
}

/* Glow effect for Triple Point */
.triple-point-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    filter: blur(20px);
    border-radius: 50%;
    opacity: 0.6;
}
/* Base Style for all Elements */
.element-card {
    width: 80px;
    height: 400px; /* The "Lots Taller" default */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* Vector Box */
    margin: 5px;
}

/* Individual Element Color Overrides */
/* Colors based on Melting/Boiling points */

.Hydrogen { 
    background-color: #00d4ff; /* Cold - Low Boiling Point */
    height: 420px; 
}

.Iron { 
    background-color: #ff8c00; /* Hotter - High Melting Point */
    height: 550px; 
}

.Tungsten { 
    background-color: #ff2200; /* Extreme - Highest Melting Point */
    height: 650px; 
    box-shadow: 0 0 20px #ff2200;
}

.Gold {
    background-color: #ffd700;
    height: 500px;
}
/* Special 'Triple Point' indicator for Carbon */
.Carbon::after {
    content: '';
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    filter: blur(10px);
    position: absolute;
    top: 20%; /* Triple point visualization position */
}