/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* Header */
header {
    margin-bottom: 40px;
    padding: 30px 40px 20px 40px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

/* Navigation and Buttons Container */
.header-nav-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 15px;
}

.nav-link {
    padding: 10px 20px;
    background-color: transparent;
    color: #37A1E1;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.nav-link:hover {
    background-color: #f0f8ff;
    border-color: #37A1E1;
}

.nav-link.active {
    background-color: #37A1E1;
    color: #ffffff;
    border-color: #37A1E1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    text-align: center;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: flex-start;
    padding-top: 0;
}

h1 {
    color: #37A1E1;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

#reset-btn {
    background-color: #E6302B;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#reset-btn:hover {
    background-color: #c52824;
}

#reset-btn:focus {
    outline: 2px solid #37A1E1;
    outline-offset: 2px;
}

/* Header Buttons Container */
.header-buttons {
    display: flex;
    gap: 15px;
}

#reset-btn {
    display: none;
}

/* Login Button */
.login-btn {
    background-color: #999;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-btn:hover {
    background-color: #777;
    color: #ffffff;
}

.login-btn:focus {
    outline: 2px solid #37A1E1;
    outline-offset: 2px;
}

/* HU Logo */
.hu-logo {
    height: 2.5rem;
    width: auto;
    max-width: 50px;
    object-fit: contain;
    margin-top: 0;
    align-self: flex-start;
}

/* Canvas grid */
#canvas-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

/* Panel styling */
.panel {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel:hover {
    box-shadow: 0 2px 8px rgba(55, 161, 225, 0.1);
    border-color: #37A1E1;
}

.panel h2 {
    color: #37A1E1;
    font-size: 1.4rem;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Slider container */
.slider-container {
    margin-bottom: 15px;
}

.slider-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #000000;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #f0f0f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #37A1E1;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #37A1E1;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]:focus {
    outline: 2px solid #37A1E1;
    outline-offset: 2px;
}

/* Level indicator */
.level-indicator {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Output text */
.output-text {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 60px;
    color: #000000;
}

.output-text strong {
    color: #37A1E1;
    font-weight: 600;
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
}

.output-text br {
    line-height: 1.8;
}

/* Responsive design */
@media (max-width: 767px) {
    body {
        padding: 0;
    }
    
    header {
        padding: 20px 20px 15px 20px;
    }
    
    #canvas-container {
        max-width: 100%;
        padding: 0 20px 30px 20px;
        gap: 20px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .panel h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .slider-container input[type="range"] {
        height: 6px;
    }
    
    .slider-container input[type="range"]::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
    
    .slider-container input[type="range"]::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
    
    .output-text {
        font-size: 0.9rem;
        padding: 10px;
        min-height: 50px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left {
        order: 2;
    }
    
    .header-right {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-buttons {
        justify-content: center;
    }
    
    .login-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    #reset-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .hu-logo {
        height: 50px;
        max-width: 100px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    #reset-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    
    .score-panel h2 {
        font-size: 1.3rem;
    }
    
    .digitalization-rating {
        margin-top: 15px;
    }
    
    .star {
        font-size: 1.3rem;
    }
    
    .digitalization-text {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    body {
        padding: 0;
    }
    
    header {
        padding: 40px 40px 25px 40px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .hu-logo {
        height: 50px;
        max-width: 50px;
    }
}

@media (min-width: 1024px) {
    #canvas-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .score-panel {
        grid-column: span 2;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .hu-logo {
        height: 50px;
        max-width: 50px;
    }
}

/* Focus styles for accessibility */
.panel:focus-within {
    outline: 2px solid #37A1E1;
    outline-offset: 2px;
}

/* Score panel styling */
.score-panel {
    background-color: #ffffff;
    border-color: #E6302B;
}

.score-panel h2 {
    color: #E6302B;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.score-display {
    text-align: center;
}

.score-display .level-indicator {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
}

.score-display .output-text {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
   
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Digitalization rating styling */
.digitalization-rating {
    margin-top: 20px;
    text-align: center;
}

.stars-container {
    margin-bottom: 10px;
    display: none;
}

.star {
    font-size: 1.5rem;
    margin: 0 2px;
    display: inline-block;
}

.star.filled {
    color: #E6302B;
}

.star.empty {
    color: #ddd;
}

.digitalization-text {
    font-size: 0.9rem;
    color: #666;

    line-height: 1.4;
    max-width: 100%;
}

/* Locked panel styling */
.panel-locked {
    opacity: 0.7;
    background-color: #f5f5f5;
    border-color: #999;
    position: relative;
}

.panel-locked h2 {
    color: #666;
}

.panel-locked .slider-container input[type="range"] {
    background: #ddd;
    cursor: not-allowed;
}

.panel-locked .slider-container input[type="range"]::-webkit-slider-thumb {
    background: #999;
    cursor: not-allowed;
}

.panel-locked .slider-container input[type="range"]::-moz-range-thumb {
    background: #999;
    cursor: not-allowed;
}

.lock-icon {
    font-size: 0.9em;
    margin-left: 8px;
}

.locked-message {
    margin-top: 15px;
    padding: 10px;
    background-color: #e6f7fd;
    border: 1px solid #77CDEF;
    border-radius: 4px;
    color: #005a7a;
    font-size: 0.9rem;
    text-align: center;
}

/* Contact section styling */
.contact-section {
    background-color: #f8f9fa;
    border: 2px solid #37A1E1;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(55, 161, 225, 0.1);
}

.contact-section h2 {
    color: #37A1E1;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.contact-section p {
    color: #000;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.contact-section .access-info {
    background-color: #e7f3ff;
    border: 1px solid #37A1E1;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #000;
}

.contact-section .access-info strong {
    color: #37A1E1;
}

.contact-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.contact-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #37A1E1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    background-color: #2a8bc7;
}

.contact-btn.secondary {
    background-color: #ffffff;
    color: #37A1E1;
    border: 2px solid #37A1E1;
}

.contact-btn.secondary:hover {
    background-color: #f0f8ff;
}

.contact-btn:focus {
    outline: 2px solid #37A1E1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .panel {
        border-width: 3px;
    }
    
    .slider-container input[type="range"]::-webkit-slider-thumb {
        border-width: 3px;
    }
    
    .slider-container input[type="range"]::-moz-range-thumb {
        border-width: 3px;
    }
    
    .score-panel {
        border-width: 4px;
    }
    
    .panel-locked {
        border-width: 3px;
    }
    
    .contact-section {
        border-width: 3px;
    }
}

/* Responsive adjustments for contact section */
@media (max-width: 767px) {
    .contact-section {
        padding: 20px;
    }
    
    .contact-section h2 {
        font-size: 1.3rem;
    }
    
    .contact-section p {
        font-size: 0.9rem;
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 100%;
        text-align: center;
    }
}

@media (min-width: 1024px) {
    .contact-section {
        grid-column: span 2;
    }
}
