
.calc-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: calc(2rem + 80px); 
    box-sizing: border-box;
    gap: 2rem;
    position: relative;
    z-index: 1; 
}

.section-intro,
.section-ohms-law,
.section-voltage-divider,
.section-resistors,
.section-capacitors,
.section-power,
.section-rc {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    line-height: 1.7;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(20px);
    animation: calcFadeIn 1s forwards;
    position: relative;
    z-index: 2; 
}

.section-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.section-intro h1 {
    color: #00ffff;
    font-size: 2rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.section-intro p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.7;
}

.section-ohms-law h2,
.section-voltage-divider h2,
.section-resistors h2,
.section-capacitors h2,
.section-power h2,
.section-rc h2 {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.section-ohms-law label,
.section-voltage-divider label,
.section-resistors label,
.section-capacitors label,
.section-power label,
.section-rc label {
    color: #fff;
    font-weight: 500;
    width: 100%;
    display: block;
    margin-bottom: 0.5rem;
}

.calc-input,
.calc-select,
.calc-answer-box {
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #00ffff;
    background-color: #111;
    color: #00ffff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.calc-answer-box {
    color: #fffb00;
    font-weight: bold;
    text-align: center;
}

.calc-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.calc-inline > * {
    flex: 1;
    min-width: 0;
}

.calc-btns {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
    flex-direction: row-reverse;
}

.calc-btn-primary,
.calc-btn-secondary {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.calc-btn-primary {
    background: #00ffff;
    color: #000;
}

.calc-btn-primary:hover {
    background: #00cccc;
    color: #fff;
    box-shadow: 0 0 10px #00ffff;
}

.calc-btn-secondary {
    background: #111;
    color: #00ffff;
    border: 1px solid #00ffff;
}

.calc-btn-secondary:hover {
    background: #1f2937;
    color: #0ff;
    box-shadow: 0 0 10px #00ffff;
}

.calc-hint {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: -6px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

ul {
    list-style-position: inside;
    padding-left: 0.5rem;
}

@keyframes calcFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .calc-container,
    .section-intro,
    .section-ohms-law,
    .section-voltage-divider,
    .section-resistors,
    .section-capacitors,
    .section-power,
    .section-rc {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .calc-container,
    .section-intro,
    .section-ohms-law,
    .section-voltage-divider,
    .section-resistors,
    .section-capacitors,
    .section-power,
    .section-rc {
        padding: 1rem;
    }
}

@media (max-width: 360px) {
    .calc-container {
        padding: 0.5rem;
    }
}

/* Additional mobile fixes for calculators */

@media (max-width: 768px) {
  .calculator-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .calculator-card h3 {
    font-size: 1.1rem;
  }
  
  .calculator-form {
    max-width: 100%;
  }
  
  .input-group {
    margin-bottom: 0.75rem;
  }
  
  .input-group label {
    font-size: 0.85rem;
  }
  
  .input-group input {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  .calculate-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem;
  }
  
  .result-box {
    padding: 0.75rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .calculator-card {
    padding: 1rem;
    border-radius: 0.5rem;
  }
  
  .calculator-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .calculator-form {
    gap: 0.75rem;
  }
  
  .input-group input {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .calculate-btn {
    font-size: 0.875rem;
    padding: 0.5rem;
  }
  
  .result-box {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .input-group label {
    font-size: 0.8rem;
  }
  
  .input-group input {
    font-size: 0.8rem;
  }
}
