#life5s-calculator {
    max-width: 520px;
    margin: 2rem auto;
    padding: 1.75rem 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #333333;
}

.life5s-field {
    margin-bottom: 1.1rem;
}

.life5s-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.life5s-field .req {
    color: #d9534f;
}

.life5s-field input,
.life5s-field select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cccccc;
    /*font-size: 0.95rem;*/
    color: #333333;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #fafafa;
}

.life5s-field input:focus,
.life5s-field select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.2);
    outline: none;
    background: #ffffff;
}

.life5s-field input:disabled,
.life5s-field select:disabled {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.life5s-field input:disabled:focus,
.life5s-field select:disabled:focus {
    border-color: #cccccc;
    box-shadow: none;
    background: #f8f9fa;
}


.life5s-has-error input,
.life5s-has-error select {
    border-color: #d9534f;
}

.life5s-error {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #d9534f;
    min-height: 0.8rem;
}

.life5s-submit {
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #d4af37, #f4d35e);
    color: #222222;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.life5s-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.life5s-submit[disabled] {
    background: #cccccc;
    color: #777777;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.life5s-submit.refresh {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #cccccc;
}

.life5s-result {
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.life5s-result-text {
    /*font-size: 0.95rem;*/
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.life5s-bar-wrapper {
    position: relative;
    width: 100%;
    margin-top: 4rem;
}

.life5s-bar-bg {
    position: relative;
    width: 100%;
    height: 24px;
    border-radius: 12px;
    background: linear-gradient(90deg, #18a558 0%, #90ee90 25%, #f5c518 50%, #ff8c00 75%, #d9534f 100%);
    overflow: visible;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.life5s-bar-indicator {
    position: absolute;
    top: -4px;
    height: 32px;
    width: 4px;
    background: #000;
    border-radius: 2px;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.8), 0 2px 8px rgba(0,0,0,0.3);
    transform: translateX(-50%);
    transition: left 0.35s ease-out;
    z-index: 10;
}

/*.life5s-bar-indicator::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
*/
.life5s-bar-value {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.life5s-bar-indicator:hover .life5s-bar-value,
.life5s-bar-value.show {
    opacity: 1;
}

.life5s-bar-scale {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    position: relative;
    height: 20px;
}

.life5s-bar-scale::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 9px,
        #ccc 9px,
        #ccc 10px
    );
}

.scale-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: #666666;
  font-weight: 500;
  white-space: nowrap;
}


@media (max-width: 600px) {
    #life5s-calculator {
        padding: 1.25rem 1.25rem;
    }
}
