/* Scientific Elements Styling */

/* DNA Double Helix Animation */
.dna-container {
    position: absolute;
    right: 15px;
    top: 20%;
    height: 200px;
    width: 40px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.dna-strand {
    position: absolute;
    width: 100%;
    height: 100%;
}

.dna-step {
    position: absolute;
    width: 30px;
    height: 5px;
    background: var(--secondary-color);
    border-radius: 5px;
    transform-origin: center;
}

.dna-step:nth-child(odd) {
    left: 0;
    transform: rotate(30deg);
}

.dna-step:nth-child(even) {
    right: 0;
    transform: rotate(-30deg);
}

.dna-step:nth-child(1) { top: 10px; }
.dna-step:nth-child(2) { top: 20px; }
.dna-step:nth-child(3) { top: 30px; }
.dna-step:nth-child(4) { top: 40px; }
.dna-step:nth-child(5) { top: 50px; }
.dna-step:nth-child(6) { top: 60px; }
.dna-step:nth-child(7) { top: 70px; }
.dna-step:nth-child(8) { top: 80px; }
.dna-step:nth-child(9) { top: 90px; }
.dna-step:nth-child(10) { top: 100px; }
.dna-step:nth-child(11) { top: 110px; }
.dna-step:nth-child(12) { top: 120px; }
.dna-step:nth-child(13) { top: 130px; }
.dna-step:nth-child(14) { top: 140px; }
.dna-step:nth-child(15) { top: 150px; }
.dna-step:nth-child(16) { top: 160px; }
.dna-step:nth-child(17) { top: 170px; }
.dna-step:nth-child(18) { top: 180px; }

.dna-backbone {
    position: absolute;
    width: 5px;
    height: 100%;
    background: var(--accent-color);
    border-radius: 5px;
}

.dna-backbone-1 {
    left: 5px;
}

.dna-backbone-2 {
    right: 5px;
}

/* Atom Orbit Animation */
.atom-container {
    position: absolute;
    left: 15px;
    bottom: 20%;
    width: 80px;
    height: 80px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.atom-nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.atom-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.atom-orbit-1 {
    width: 40px;
    height: 70px;
    transform: translate(-50%, -50%) rotate(30deg);
    animation: orbit-rotate-1 8s linear infinite;
}

.atom-orbit-2 {
    width: 70px;
    height: 40px;
    transform: translate(-50%, -50%) rotate(60deg);
    animation: orbit-rotate-2 10s linear infinite;
}

.atom-orbit-3 {
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%) rotate(45deg);
    animation: orbit-rotate-3 12s linear infinite;
}

.electron {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
}

.electron-1 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation: electron-move-1 8s linear infinite;
}

.electron-2 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: electron-move-2 10s linear infinite;
}

.electron-3 {
    bottom: 10%;
    left: 20%;
    animation: electron-move-3 12s linear infinite;
}

/* Formula Overlay */
.science-formula {
    position: absolute;
    font-family: monospace;
    color: var(--secondary-color);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    font-size: 14px;
}

.formula-1 {
    top: 40px;
    left: 40px;
    transform: rotate(-10deg);
}

.formula-2 {
    bottom: 30px;
    right: 40px;
    transform: rotate(5deg);
}

/* Beaker Element */
.beaker {
    position: absolute;
    bottom: 20px;
    right: 25px;
    width: 40px;
    height: 50px;
    border: 2px solid var(--secondary-color);
    border-radius: 0 0 10px 10px;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.beaker::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--secondary-color);
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}

.beaker::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--secondary-color);
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}

.beaker-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: var(--accent-color);
    border-radius: 0 0 8px 8px;
    opacity: 0.3;
}

.beaker-bubble {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: bubble-rise 3s infinite;
}

.beaker-bubble-1 {
    bottom: 5px;
    left: 10px;
    animation-delay: 0.5s;
}

.beaker-bubble-2 {
    bottom: 10px;
    left: 20px;
    animation-delay: 1.2s;
}

.beaker-bubble-3 {
    bottom: 5px;
    left: 30px;
    animation-delay: 2s;
}

/* Animation Keyframes */
@keyframes orbit-rotate-1 {
    from { transform: translate(-50%, -50%) rotate(30deg); }
    to { transform: translate(-50%, -50%) rotate(390deg); }
}

@keyframes orbit-rotate-2 {
    from { transform: translate(-50%, -50%) rotate(60deg); }
    to { transform: translate(-50%, -50%) rotate(420deg); }
}

@keyframes orbit-rotate-3 {
    from { transform: translate(-50%, -50%) rotate(45deg); }
    to { transform: translate(-50%, -50%) rotate(405deg); }
}

@keyframes electron-move-1 {
    0% { transform: translateY(-50%) rotate(0deg) translateX(20px); }
    100% { transform: translateY(-50%) rotate(360deg) translateX(20px); }
}

@keyframes electron-move-2 {
    0% { transform: translateX(-50%) rotate(0deg) translateY(20px); }
    100% { transform: translateX(-50%) rotate(360deg) translateY(20px); }
}

@keyframes electron-move-3 {
    0% { transform: rotate(0deg) translateX(30px); }
    100% { transform: rotate(360deg) translateX(30px); }
}

@keyframes bubble-rise {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 0.7; }
    100% { transform: translateY(-20px); opacity: 0; }
}

/* Additional Scientific Pattern */
.molecular-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(181, 166, 66, 0.1) 5px, transparent 6px),
        radial-gradient(circle at 20% 30%, rgba(181, 166, 66, 0.1) 3px, transparent 4px),
        radial-gradient(circle at 40% 60%, rgba(181, 166, 66, 0.1) 6px, transparent 7px),
        radial-gradient(circle at 60% 20%, rgba(181, 166, 66, 0.1) 4px, transparent 5px),
        radial-gradient(circle at 80% 50%, rgba(181, 166, 66, 0.1) 5px, transparent 6px),
        radial-gradient(circle at 90% 80%, rgba(181, 166, 66, 0.1) 3px, transparent 4px);
    background-size: 200px 200px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}