/* General Page Styling */
body, html {
    margin: 0;
    padding: 0;
    height: auto;
  overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f2f5;
    color: #333;
}

/* Header Styling */
header {
    width: 100%;
    height: 70px;
    text-align: center;
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Lab Container - Full Screen */
.lab-container {
    display: flex;
    width: 100%;
    height: auto;
    align-items: flex-start;
     background-color: #ffffff; 
    overflow: visible;
}

/* Experiment Area */
.experiment-area {
     background-image: url("images/chem lab.jpg"); 
     background-size: cover;
     background-position: center;
    flex: 3;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-end;
    background-color: #e8f4f8;
    border-right: 1px solid #d1d1d1;
    position: relative;
    min-height: 600px; 
    height: auto;
    padding-bottom: 50px;
}


/* 
/* Table at the Bottom */
 .table {
    background-image: url(images/table.png_files/image001.png);
    bottom: 220px;
    width: 100%;
    position: absolute;
    display: flex;
    justify-content: center; 
    align-items: flex-end;
    padding: 20px;
    height: 200px;
    background: transparent;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(4px);
    border-radius: 5px;
    box-shadow: none; 
    overflow: hidden;
}

/* Flasks & Equipment */
 .flask, .equipment, .beaker {
    justify-content: center;
    position: relative;
    z-index: 2;
    align-self: flex-end;
    pointer-events: auto;
    
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    
}

/* Beaker Specific Size */
.beaker {
    /* position: absolute; */
    height: 180px;
    width: 140px;
    
}  

/* Flask Custom Sizes */
#flask1, #flask2, #flask3 {
    
    height: 180px;
    width: 140px;
    opacity: 0.9;
} 

/* Additional Equipment Sizing */
.equipment {
    /* position: absolute; */
     height: 180px;
    width: 140px;
}  
/* .table {
    background-image: url(images/table.png_files/image001.png);
    bottom: 220px;
    left: 0px;
    width: 100%;
    position: absolute;
    display: flex;
    justify-content: center; 
    align-items: flex-end;
    padding: 20px;
    height: 220px;
    background: transparent;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    
    backdrop-filter: blur(4px);
    border-radius: 5px;
    box-shadow: none;
    overflow: hidden; 
}


/* Flasks & Equipment */
/* .flask, .equipment, .beaker {
    justify-content: center;
    position: relative;
    z-index: 2;
    align-self: flex-end;
    pointer-events: auto;
    
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}
 */

/* Beaker Specific Size */
/* .beaker {
    /* position: absolute; */
    /* height: 180px;
    width: 140px;
    
} */ */

/* Flask Custom Sizes */
/* #flask1, #flask2, #flask3 {

    height: 180px;
    width: 140px;
    opacity: 0.9;
} */

/* Additional Equipment Sizing */
/* .equipment {
    
    height: 180px;
    width: 140px;
} */ 
/* Hover Effect */
.flask:hover, .equipment:hover, .beaker:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.4));
}

/* Disabled State */
.flask.disabled, .equipment.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Tooltip for Object Hover */
#tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
    max-width: 250px;
    line-height: 1.5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#tooltip strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    color: #4fc3f7;
}

/* Instruction Panel */
.instruction-panel {
    width: 50px;
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    overflow-y: auto;
    border-left: 1px solid #ddd;
}

.instruction-panel h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 12px 15px;
    margin: 8px 0;
    background-color: #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

li:hover {
    background-color: #dee2e6;
}

li.completed {
    background-color: #d4edda;
    color: #155724;
    text-decoration: line-through;
}

li.current {
    background-color: #cce5ff;
    color: #004085;
    font-weight: bold;
    border-left: 4px solid #007bff;
}

li.upcoming {
    background-color: #f8f9fa;
    color: #6c757d;
}

.reaction-info {
    margin-top: 30px;
    padding: 15px;
    background-color: #e2f3f8;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.reaction-info h3 {
    color: #17a2b8;
    margin-top: 0;
}

.reaction-info p {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    margin: 8px 0;
}

/* Animations */
@keyframes stirring {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
}
.pouring-liquid {
    position: absolute;
    width: 5px;
    height: 0;
    border-radius: 0 0 5px 5px;
    z-index: 999;
    transform-origin: top center;
}


@keyframes heating {
    0%, 100% { 
        filter: brightness(100%) drop-shadow(0 0 5px rgba(255, 200, 100, 0.3));
    }
    50% { 
        filter: brightness(110%) drop-shadow(0 0 15px rgba(255, 150, 50, 0.5));
    }
}
 @keyframes heating {
    0%, 100% { 
        filter: brightness(100%) drop-shadow(0 0 5px rgba(220, 225, 228, 0.3)); 
    }
    50% { 
        filter: brightness(110%) drop-shadow(0 0 15px rgba(212, 215, 216, 0.7)); 
    }
} 
 @keyframes heating {
    0% { filter: brightness(100%) drop-shadow(0 0 0 rgba(255, 165, 0, 0)); }
    50% { filter: brightness(120%) drop-shadow(0 0 15px rgba(255, 165, 0, 0.7)); }
    100% { filter: brightness(100%) drop-shadow(0 0 0 rgba(255, 165, 0, 0)); }
} 

/* @keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
} */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes water-bath-effect {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); } /* Removed blue shadow */
}

 @keyframes water-bath-effect {
    0% { filter: hue-rotate(0deg) brightness(100%); }
    50% { filter: hue-rotate(10deg) brightness(110%); }
    100% { filter: hue-rotate(0deg) brightness(100%); }
} 

.water-bath-active {
    animation: 'pulse 2s infinite';
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

 @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
} 

@keyframes float-up {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Chemical Info Panel */
.info-panel {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.info-panel h3 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.info-panel p {
    margin: 8px 0;
    line-height: 1.5;
}

.info-panel .formula {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #d35400;
}

/* Feedback Message */
.feedback-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff4444;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    animation: slide-up 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
}

.feedback-message.fade-out {
    animation: fade-out 0.5s ease-out forwards;
}

@keyframes slide-up {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Design */
/* Add to your CSS file */
@media (max-width: 768px) {
    .lab-container {
        flex-direction: column;
        height: auto;
    }
    
    .experiment-area {
        height: 50vh;
        min-height: 400px;
    }
    
    .instruction-panel {
        width: 100%;
        max-height: 30vh;
        overflow-y: auto;
    }
    
    .flask, .beaker, .equipment {
        width: 80px !important;
        height: 100px !important;
    }
    
    #beaker {
        width: 100px !important;
        height: 150px !important;
    }
    
    .table {
        height: 150px;
        padding: 10px;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
        padding: 10px;
    }
    
    .flask, .equipment {
        width: 60px !important;
        height: 80px !important;
    }
    
    #beaker {
        width: 80px !important;
        height: 120px !important;
    }
    
    .instruction-panel li {
        padding: 8px;
        font-size: 0.9rem;
    }
}
.sound-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: #2c3e50;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sound-btn:hover {
  transform: scale(1.1);
  background: #1a252f;
}

.sound-btn.muted {
  background: #7f8c8d;
}
/* Observation Table Styling */
#observation-section {
  position: relative;
  width: 100%;
  margin-top: 40px;
  clear: both;
  display: block;
  margin: 30px auto;
  background: rgba(255, 255, 255, 0.95);
}
#observation-section h2 {
  text-align: center;
  margin-bottom: 10px;
}

.obs-note {
  font-size: 14px;
  color: #444;
  margin-bottom: 15px;
  background: #f5f5f5;
  padding: 10px;
  border-left: 4px solid #0077aa;
}

.observation-table {
  width: 100%;
  border-collapse: collapse;
}

.observation-table th,
.observation-table td {
  border: 1px solid #999;
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

.observation-table th {
  background-color: #e6f2f8;
  font-weight: bold;
}

.observation-table input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .observation-table th,
  .observation-table td {
    font-size: 12px;
    padding: 8px;
  }
}
