:root {
    --primary-color: #2563eb;
    --primary-dark: #1dd8a0;
    --secondary-color: #3b82f6;
    --main-color: #347ce7;
    --alt-color: #31c2af;
    --social-links: #f8fafc;
    --accent-color: #60a5fa;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}


body {
    margin: 0;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}


.questionnaire-container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 2100px;
    margin: 0 auto;
}

.questionnaire-container h1 {
    font-size: 3rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.questinnaire-container > p {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Tabs container */
.questionnaire-tabs {
    display: flex;
    justify-content: flex-start;
    margin-top: 4rem;
    margin-bottom: 2rem;
    gap: 1rem;
}

/* Tab buttons */
.tab-link {
    background: #fff;
    border: 1px solid var(--main-color);
    border-bottom: none;
    color: var(--main-color);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
    position: relative;
    top: 2px;
}

.tab-link.active {
    background: linear-gradient(90deg, var(--main-color) 0%, var(--alt-color) 100%);
    border: transparent;
    color: #fff;
    z-index: 2;
}

/* Student tabs */
.student-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.student-tabs-vertical {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
}
.student-side-tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 60px;
    align-items: center;
}
.student-tab-link {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: #fff;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 1.2rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: center;
    border-bottom: none;
    min-height: 90px;
    min-width: 40px;
}
.student-tab-link.active {
    background: linear-gradient(90deg, var(--main-color) 0%, var(--alt-color) 100%);
    color: #fff;
}

/* Student tabs content */
.student-tabs-content {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
}

.student-tab-content {
    width: 100%;
    text-align: center; 
}

/* Tab content sections */
.tab-section {
    display: none;
    background: #fff;
    border: 2px solid var(--main-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    z-index: 1;
}

/* Pie chart row layout */
.pie-chart-row {
    display: flex;
    align-items: flex-start; 
    justify-content: flex-start;
    gap: 3rem;
    margin-bottom: 2rem;
    margin-left: 3.5rem;
    flex-wrap: nowrap; 
    min-height: 220px;
}

.pie-chart-row.center-items {
    align-items: center;
}

/* Pie chart captions */
.pie-captions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    text-align: left;
    justify-content: center;      
    align-items: flex-start;      
    min-width: 120px;
    white-space: nowrap;
    height: 170px;               
}

.pie-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 0.7em;
    vertical-align: middle;
}
.pie-dot.green { background: #50C878; }
.pie-dot.blue { background: #347ce7; }
.pie-dot.yellow { background: #FDDA0D; }
.pie-dot.red { background: #EE4B2B; }
.pie-dot.purple { background: #a259e6; }
.pie-chart-row canvas {
    max-width: 170px;
    max-height: 170px;
}

.pie-statement-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2rem;
    width: 100%;
}
.pie-statement {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--main-color);
    text-align: left;
    margin: 0;
    white-space: nowrap; 
}

.pie-chart-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    min-width: 420px;
    max-width: 600px;
    margin: 2rem 0;
    width: 100%;
    padding-left: 2rem;
}

.pie-chart-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    max-width: 320px;
    flex: 1 1 auto;
}

.bar-chart-group {
    margin: 2rem 0;
    width: 100%;
    max-width: 700px;
    padding-left: 2rem;
}

.bar-statement-row {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.bar-statement {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--main-color);
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

.bar-chart-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
}

.bar-legend,
.bar-percentages {
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    height: 140px; 
    min-width: 70px;
    font-size: 0.75rem;
}

.bar-legend {
    align-items: flex-end;
    text-align: right;
}

.bar-percentages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 40px;
    height: 140px; 
    font-size: 0.75rem;
    justify-content: flex-start;
}

.bar-percentages > div {
    height: 10px;      
    line-height: 10px; 
    margin-bottom: 7px;
}

.bar-percentages > div:last-child {
    margin-bottom: 0;
}

.bar-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.4em;
    vertical-align: middle;
}
.bar-dot.blue { background: #347ce7; }
.bar-dot.green { background: #31c2af; }
.bar-dot.orange { background: #f59e42; }
.bar-dot.purple { background: #a259e6; }
.bar-dot.gray { background: #94a3b8; }
.bar-dot.red { background: #e74c3c; }
.bar-dot.yellow { background: #f7c948; }
.bar-dot.teal { background: #20bfa9; }

.bar-chart-canvas-wrapper {
    position: relative;
    width: 400px;
    height: 180px;
}

.bar-percentages-abs {
    position: absolute;
    top: 0;
    right: -0px;  
    width: 32px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.bar-percentages-abs span {
    position: absolute;
    left: 0;
    width: 100%;
    font-size: 0.85rem;
    text-align: left;
    transform: translateY(-50%);
  
}

.bar-categories-abs {
    position: relative;
    width: 110px;
    height: 180px;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.bar-categories-abs span {
    position: absolute;
    right: 0;
    width: 100%;
    font-size: 0.85rem;
    text-align: right;
    transform: translateY(-50%);
    white-space: nowrap;
}

.pie-chart-row .pie-chart-group:first-child {
    margin-right: 6rem;
}

@media (max-width: 900px) {
    .pie-chart-row {
        flex-direction: column;
        gap: 2rem;
    }
    .pie-chart-group {
        max-width: 100%;
        min-width: 0;
        justify-content: center;
    }
    .pie-statement, .pie-captions {
        white-space: normal;
    }
}