:root {
    --primary-color: #2d3436;
    --accent-color: #0984e3;
    --bg-color: #ffffff;
    --text-color: #2d3436;
    --secondary-bg: #f5f6fa;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff; /* Light blue background */
    margin: 0;
    padding: 0;
    line-height: 1.6;

}
/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95); /* Semi-transparent white background */
    padding: 1rem 0; /* Remove horizontal padding */
    position: fixed; /* Sticky nav */
    top: 0;
    width: 100%; /* Full width */
    z-index: 100; /* Layer priority */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

nav .container {
    max-width: 1200px; /* Center the content */
    margin: auto; 
    padding: 0 20px; /* Add padding to container instead */
    display: flex; /* Flex layout */
    justify-content: space-between; /* Space between logo and links */
    align-items: center; /* Center vertically */
}

.logo {
    font-size: 1.5rem; /* Logo size from Code #2 */
    font-weight: 600; /* Bold logo */
    color: var(--accent-color);
}

nav ul {
    list-style-type: none; /* Remove bullets */
    padding: 0; /* Match Code #2 */
    margin: 0;
    display: flex; /* Horizontal layout */
    gap: 2.5rem; /* Spacing between items */
}

nav a {
    color: var(--text-color); /* Text color */
    text-decoration: none; /* No underline */
    font-weight: 400; /* Regular font weight */
    font-size: 0.9rem; /* Font size */
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 1px; /* Add spacing between letters */
    transition: color 0.3s ease; /* Smooth hover transition */
    padding-right: 10px; /* Match Code #2 */
}

nav a:hover {
    color: var(--accent-color); /* Hover color */
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    nav {
        padding: 1rem 10px; /* Match Code #2 */
    }

    nav .container {
        flex-direction: column; /* Stack items vertically */
        gap: 1rem; /* Add spacing between items */
    }

    nav ul {
        flex-direction: column; /* Vertical alignment for links */
        gap: 1rem; /* Match Code #2 */
    }

    nav a {
        font-size: 0.8rem; /* Smaller font size */
        text-align: center; /* Center align for smaller screens */
    }

    .logo {
        font-size: 1.2rem; /* Smaller logo font size */
        padding-left: 10px; /* Add left padding */
    }
}


.main-container {
    max-width: 900px;
    margin: 100px auto 50px;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 30px;
    min-height: 80vh;
    height: fit-content; 
}

.form-container, .result-container, .progress-bar-container {
    flex: 1;
}

.form-container {
    flex: 2; /* Take up more space */
    padding-right: 40px;
    overflow-y: auto; /* Enable scrolling if content overflows */
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

h2 {
    color: #007BFF; /* Primary blue */
    text-align: center;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-top: 15px;
    color: #555;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 2px solid #007BFF; /* Blue border */
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    background: white;
}

button {
    width: 100%;
    background: #007BFF; /* Primary blue */
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

button:hover {
    background: #0056b3; /* Darker blue on hover */
}

.result-container {
    flex: 1; /* Take up less space than form */
    padding: 20px;
    background: #f8f9fa; /* Light gray background */
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.output {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
}

.success {
    color: #28a745; /* Green for success */
}

.fail {
    color: #dc3545; /* Red for failure */
}

@media (max-width: 768px) {
    .main-container {
        min-height: calc(100vh - 130px);
        height: auto;
        flex-direction: column;
    }
    .form-container {
        padding-right: 0;
        max-height: none;
        overflow-y: visible;
    }
    .result-container {
        margin-bottom: 20px;
    }
    .progress-bar-container {
        flex: 0 0 30px;
        width: 100%;
        height: 30px; /* Fixed height for mobile */
        margin: 20px 0;
        min-height: 30px; /* Reset for mobile */
    }
    .progress-bar, .progress-bar-background {
        width: 100%;
        height: 30px;
    }
}

.progress-bar-container {
    flex: 0 0 50px; /* Don't grow or shrink, stay at 50px width */
    position: relative;
    min-height: 400px; /* Ensure minimum height */
}

.progress-bar-background {
    background-color: #e0e0e0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-bar-min {
    width: 100%;
    background-color: #51cf66;
    position: absolute;
    bottom: 0;
    transition: height 0.3s ease;
}

.progress-bar-max {
    width: 100%;
    background-color: #ffd93d;
    position: absolute;
    bottom: 0;
    transition: height 0.3s ease;
}

.threshold-marker {
    position: absolute;
    bottom: 95%;  /* Set the marker position at 855/900 points */
    width: 100%;
    height: 2px;
    background-color: red;
    transition: bottom 0.3s ease;
}

.output {
    margin-bottom: 20px;
}

/* Optional: Styling for success/failure messages */
.success {
    color: green;
}

.fail {
    color: red;
}

.grade-input-container {
    margin-bottom: 15px;
}

.input-with-confidence {
    display: flex;
    gap: 10px;
}

.input-with-confidence input {
    flex: 3;
    transition: background-color 0.3s ease;
}

.confidence-select {
    flex: 1;
    padding: 5px;
    border: 2px solid #007BFF;
    border-radius: 5px;
    font-size: 14px;
    min-width: 100px;
}

/* Min/Max Input Styles */
.input-with-confidence input.score-min,
.input-with-confidence input.score-max {
    width: calc(50% - 10px);
    margin: 5px 5px 0 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Score Ranges */
.low-score {
    background-color: #ffcccc;
    border-color: #e74c3c;
}

.medium-score {
    background-color: #fff6cc;
    border-color: #f1c40f;
}

.high-score {
    background-color: #ccffcc;
    border-color: #27ae60;
}


/* Confidence level background colors - applied to select instead of input */
select[value="unsure"],
option[value="unsure"],
.confidence-select option[value="unsure"] {
    background-color: #eb3737; /* Light red */
}

select[value="moderate"],
option[value="moderate"],
.confidence-select option[value="moderate"] {
    background-color: #e39d53; /* Light orange */
}

select[value="certain"],
option[value="certain"],
.confidence-select option[value="certain"] {
    background-color: #38ed38; /* Light green */
}

.course-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    justify-content: space-between;
}

.edit-name-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1px 1px;
    font-size: 14px;
    color: #007BFF;
    transition: color 0.3s ease;
    width: auto;
    min-width: auto;
    margin-top: 0;
}

.edit-name-btn:hover {
    color: #0056b3;
}

.course-name-input {
    display: none;
    padding: 2px 1px;
    border: 1px solid #007BFF;
    border-radius: 4px;
    font-size: 14px;
    width: auto;
}

.course-label {
    margin: 0;
    flex: 1;
}

/* Update/add these styles */
.min-max-inputs {
    display: flex;
    gap: 10px;
    flex: 3;
}

.grade-input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.min-input {
    border-color: #ff6b6b;
}

.max-input {
    border-color: #51cf66;
}

.input-with-confidence {
    display: flex;
    gap: 10px;
    align-items: center;
}

.confidence-select {
    flex: 0 0 100px;
}

/* Timer and Counter Styles */
.timer-counter-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timer-section, .counter-section {
    flex: 1;
    text-align: center;
}

h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stopwatch {
    font-size: 1.8rem;
    font-family: monospace;
    color: #007BFF;
    margin: 10px 0;
    font-weight: bold;
}

.timer-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.timer-btn, .counter-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: #007BFF;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    width: auto;
    margin: 0;
}

.timer-btn:hover, .counter-btn:hover {
    background: #0056b3;
}

.problem-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

#problemCount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007BFF;
    min-width: 60px;
}

.counter-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.counter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #007BFF;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: auto;
}

.reset-btn {
    background: #dc3545;  /* Red color for reset button */
}

.reset-btn:hover {
    background: #c82333;
}

/* Add keyboard shortcut hint */
.counter-btn::after {
    content: " (Space)";
    font-size: 0.8em;
    opacity: 0.7;
}

.reset-btn::after {
    content: " (R)";
    font-size: 0.8em;
    opacity: 0.7;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .timer-counter-container {
        flex-direction: column;
    }
    
    .main-container {
        height: auto;
        flex-direction: column;
    }
    
    .progress-bar-container {
        flex: 0 0 30px;
        width: 100%;
        height: 30px;
        min-height: 30px; /* Reset for mobile */
        margin: 20px 0;
    }
    
    .progress-bar-background {
        height: 100%;
    }
}

/* Replace the confidence-select styles with these */
.confidence-indicator {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    transition: color 0.3s ease;
    width: 60px;
    text-align: center;
}

.confidence-indicator::after {
    content: attr(data-confidence);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
}

.add-course-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-course-btn:hover {
    background-color: #272648;
}

.remove-course-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    transition: all 0.3s ease;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.remove-course-btn:hover {
    color: white;
    background-color: #ff6b6b;
}

/* Add smooth scrollbar styling */
.form-container::-webkit-scrollbar {
    width: 8px;
}

.form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.form-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.form-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}