:root {
    --bg: #CDA4DE;     
    --text: #000;    
    --accent: #23002c;    
    --secondary: #5C1A5C; 
    --highlight: #660066; 
    --max-width: 760px;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    padding: 3rem 1rem 2rem;
    text-align: center;
}

h1 {
    font-size: 2.8rem;
    margin: 0;
    color: var(--accent);
    animation: pulse 3s infinite alternate;
}

h2 {
    margin-top: 2.5rem;
    font-size: 1.6rem;
    color: var(--secondary);
    animation: pulse 4s infinite alternate;
}

main {
    max-width: var(--max-width);
    margin: auto;
    padding: 1rem;
}

.section {
    margin-bottom: 3rem;
}

p {
    color: var(--text);
    animation: float 6s ease-in-out infinite;
}

.highlight {
    color: var(--highlight);
    font-weight: bold;
    animation: pulse 2s infinite alternate;
}

/* Evidențiere specială pentru cuvântul "atom" */
.atom {
    color: #330033;
    font-weight: bold;
    animation: float 3s ease-in-out infinite;
}

figure {
    margin: 2rem 0;
    text-align: center;
}

section figure img {
    width: 50%;      /* the image will be 50% of its container's width */
    height: auto;    /* keeps the aspect ratio */
    display: block;  /* removes any inline spacing */
    margin: auto;    /* centers the image */
}


figcaption {
    font-size: 0.9rem;
    color: #4B004B;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.swatch {
    height: 80px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Animatii text */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

