* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 40px;
}

.instruction-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
}

.thermometer-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.thermometer {
    position: relative;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 256px
}

.thermometer-bulb {
    width: 100px;
    height: 100px;
    background: #ff4444;
    border-radius: 50%;
    border: 3px solid #ff2222;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
    z-index: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 0px;
    position: absolute;
    bottom: -80px;
    right: -20px; 
}

.bulb-percentage {
    color: white;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

.bulb-fraction {
    color: #ffaaaa;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    margin-top: 2px;
}

.lessons-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    min-height: 100vh;
}

.lesson-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    border: 1px solid #fff;
    border-width: 1px 0 0 0;
    padding-left: 100px;
}

.chapter-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    border: 1px solid #fff;
    border-width: 1px 0 0 0;
}

.section-label + .chapter-group {
    border-width: 0px !important;
}

.chapter-group.first-chapter {
    border-top: none !important;
    border-width: 0 0 0 0 !important;
}

.lesson-section .chapter-group.first-chapter {
    border-top: none !important;
    border-width: 0 0 0 0 !important;
}

.lessons-row {
    display: flex;
    flex-direction: column;
    margin-left: 96px; /* Make room for labels */
}

.lesson {
    height: 12px;
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.6);
    border-width: 0 0 1px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: rgba(255,255,255,0.8);
    margin: 0;
    width: 60px;
}

.lesson:last-child {
    border-bottom: none;
}

/* Common styles for both section and chapter labels */
.section-label,
.chapter-label {
    padding: 12px 10px;
    text-align: right;
    white-space: nowrap;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 20px;
    line-height: 1;
    vertical-align: middle;
}

.section-label {
  left: 0;
}

.section-label:hover,
.chapter-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.section-label.completed,
.chapter-label.completed {
    background: #4CAF50;
    color: white;
    border-radius: 0;
}

/* Section-specific styles */
.section-label {
  width: 100px;
  font-weight: bold;
  font-size: 14px;
}

/* Score tracking styles */
.score-container {
    position: absolute;
    height: 20px;
    z-index: 25;
    pointer-events: auto;
    width: 60px;
}

.score-container.section-score {
    right: 166px;
    top: 25px;
}

.score-container.chapter-score {
    right: 70px;
    top: 25px;
}

.score-input {
    width: 100%;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 2px;
}

/* Hide spinner arrows */
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.score-input:focus {
    outline: none;
    border-color: #0400ff;
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* Score visual indicators */
.score-input.score-good {
    background: #4CAF50 !important;
    border-color: #66BB6A !important;
    color: white !important;
    font-weight: bold;
    box-shadow: 
        0 0 8px rgba(76, 175, 80, 0.8),
        0 0 16px rgba(76, 175, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.score-input.score-bad {
    background: rgba(244, 67, 54, 0.6) !important;
    border-color: #f44336 !important;
    color: #fadcdb !important;
    font-weight: bold;
}

.score-history {
    position: absolute;
    left: 70px;
    top: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px;
    border-radius: 4px;
    font-size: 9px;
    min-width: 70px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.score-container.section-score .score-history {
    z-index: 150;
    left: -80px;
    top: 0;
}

.score-container:hover .score-history {
    opacity: 1;
    pointer-events: auto;
}

.score-history-title {
    font-weight: bold;
    margin-bottom: 2px;
    color: #4CAF50;
}

.score-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.score-list li {
    padding: 1px 0;
}

/* Chapter-specific styles */
.chapter-label {
    width: 96px;
    font-size: 12px;
}

.lesson:hover {
    background: rgba(255,255,255,0.5);
    box-shadow: 0 0 4px rgba(255,255,255,0.8);
}

.lesson.completed {
    background: #ff4444;
    border-color: #ff2222;
    box-shadow: 0 0 3px rgba(255,68,68,0.6);
    color: #ffaaaa;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);

}

.lesson.completed:hover {
    background: #ff6666;
    box-shadow: 0 0 5px rgba(255,68,68,0.8);
}

.progress-info {
    margin-top: 20px;
    color: white;
    font-size: 19px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.reset-button {
    background: #e0e0e0;
    color: #666666;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: none;
}

.reset-button:hover {
    background: #d0d0d0;
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.reset-button:active {
    background: #c0c0c0;
    transform: translateY(2px);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }
    .lesson {
      height: 20px;
    }
}
