* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    margin: 0;
    padding: 1rem;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

p {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f0f4f8;
    border-radius: 12px;
    border: 1px solid #d1d9e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.intro p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #2d3748;
}

.protege-definition {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 8px;
}

.protege-definition p {
    margin: 0;
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #555;
}

.checklist-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checklist-table th,
.checklist-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.checklist-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.interaction-type {
    width: 15%;
    vertical-align: top;
}

.behavior-description {
    width: 60%;
}

.response-column {
    width: 12.5%;
    text-align: center;
}

.interaction-cell {
    background: #edf2f7;
    font-weight: 600;
    vertical-align: top;
    color: #2d3748;
}

.behavior-cell {
    line-height: 1.6;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.response-cell {
    text-align: center;
}

.response-cell input[type="radio"] {
    transform: scale(1.3);
    margin: 0;
    cursor: pointer;
}

button {
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: block;
    min-height: 48px;
}

button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.scoring-scale {
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    max-width: 600px;
}

.scoring-scale h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.scale-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.scale-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: #f7fafc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    min-width: 150px;
}

.scale-item:hover {
    transform: translateY(-2px);
}

.scale-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
}

.scale-color.exemplary { background: #48bb78; }
.scale-color.developing { background: #f6e05e; }
.scale-color.emerging { background: #f56565; }

.scale-item p {
    margin: 0;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.scale-note {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.6;
    color: #4a5568;
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.score-summary-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-align: center;
}

.overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.score-circle span {
    font-size: 2.5em;
    line-height: 1;
}

.score-circle small {
    font-size: 0.9em;
    opacity: 0.9;
}

.score-label {
    font-size: 1.3em;
    font-weight: 600;
    color: #2d3748;
}

.score-description p {
    margin: 0.5rem 0 0;
    font-size: 0.95em;
    color: #718096;
}

.score-line {
    margin: 1rem 0;
    font-size: clamp(1.05rem, 2.3vw, 1.2rem);
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border-left: 5px solid #48bb78;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-weight: 500;
}

.score-line:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.charts-container {
    margin: 2rem auto;
    background: white;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.chart-tabs {
    display: flex;
    overflow-x: auto;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.chart-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: auto;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    max-width: none;
}

.chart-tab:hover {
    background: #edf2f7;
    transform: none;
    box-shadow: none;
}

.chart-tab.active {
    border-bottom-color: #667eea;
    color: #2d3748;
    background: white;
}

.chart-views {
    position: relative;
}

.chart-view {
    display: none;
    padding: 1rem;
}

.chart-view.active {
    display: block;
}

.chart-container {
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
    background: white;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    height: 400px;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

#interpretation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f4f8;
    border-radius: 12px;
    border: 1px solid #d1d9e6;
}

#interpretation h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

#interpretation p, #interpretation li {
    font-size: clamp(1.05rem, 2.3vw, 1.2rem);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

#interpretation ul {
    list-style-type: disc;
    padding-left: 20px;
}

@media screen and (max-width: 768px) {
    .container { padding: 1rem; max-width: 100%; }
    .checklist-table { font-size: 0.85rem; }
    .checklist-table th, .checklist-table td { padding: 0.75rem; }
    .interaction-type { width: 20%; }
    .behavior-description { width: 55%; }
    .scale-container { flex-direction: column; align-items: center; }
    .scale-item { width: 100%; max-width: 280px; }
}

@media screen and (max-width: 600px) {
    .chart-container { padding: 0.75rem; height: 300px; }
    .score-circle { width: 100px; height: 100px; }
    .score-circle span { font-size: 2em; }
}
