409 lines
7.4 KiB
CSS
409 lines
7.4 KiB
CSS
|
|
:root {
|
|
--primary-color: #007bff;
|
|
--primary-color-dark: #0056b3;
|
|
--background-color: #f4f7f6;
|
|
--surface-color: #ffffff;
|
|
--text-color: #333333;
|
|
--border-color: #e0e0e0;
|
|
--danger-color: #dc3545;
|
|
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
--border-radius: 8px;
|
|
--shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
--transition-speed: 0.3s;
|
|
}
|
|
|
|
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: var(--font-family);
|
|
background-color: var(--background-color);
|
|
color: var(--text-color);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
min-height: 100vh;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.app {
|
|
width: 100%;
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
position: relative;
|
|
}
|
|
|
|
.screen {
|
|
display: none;
|
|
flex-direction: column;
|
|
background-color: var(--surface-color);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
overflow: hidden;
|
|
animation: fadeIn 0.5s ease-in-out;
|
|
}
|
|
|
|
.screen[aria-hidden="false"] {
|
|
display: flex;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.screen--start {
|
|
padding: 3rem 2rem;
|
|
text-align: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.title {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
margin: 0 0 0.5rem;
|
|
}
|
|
|
|
.subtitle {
|
|
font-size: 1.1rem;
|
|
color: #666;
|
|
max-width: 500px;
|
|
margin: 0 0 2.5rem;
|
|
}
|
|
|
|
.sex-select {
|
|
display: flex;
|
|
gap: 1.5rem;
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
|
|
.sex-card {
|
|
flex: 1;
|
|
max-width: 220px;
|
|
padding: 2rem 1rem;
|
|
border: 2px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
background-color: transparent;
|
|
transition: all var(--transition-speed) ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sex-card:hover, .sex-card:focus-visible {
|
|
transform: translateY(-5px);
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);
|
|
}
|
|
|
|
.sex-card::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 4px;
|
|
background-color: var(--primary-color);
|
|
transform: scaleX(0);
|
|
transition: transform var(--transition-speed) ease;
|
|
}
|
|
|
|
.sex-card:hover::after, .sex-card:focus-visible::after {
|
|
transform: scaleX(1);
|
|
}
|
|
|
|
.screen--question {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.q-header {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.progress {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
#progress-text {
|
|
font-size: 0.9rem;
|
|
color: #555;
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 8px;
|
|
background-color: #e9ecef;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
width: 0;
|
|
height: 100%;
|
|
background-color: var(--primary-color);
|
|
transition: width 0.4s ease;
|
|
}
|
|
|
|
.nav-top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.6rem 1.2rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
border-radius: var(--border-radius);
|
|
border: 2px solid transparent;
|
|
cursor: pointer;
|
|
transition: all var(--transition-speed) ease;
|
|
background-color: #f0f0f0;
|
|
color: #333;
|
|
}
|
|
|
|
.btn--primary {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn--primary:hover, .btn--primary:focus-visible {
|
|
background-color: var(--primary-color-dark);
|
|
box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
|
|
}
|
|
|
|
.btn--ghost {
|
|
background-color: transparent;
|
|
border-color: var(--border-color);
|
|
}
|
|
|
|
.btn--ghost:hover, .btn--ghost:focus-visible {
|
|
background-color: #f8f9fa;
|
|
border-color: #ccc;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.question-container {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.question-title {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
margin: 0 0 1.5rem;
|
|
}
|
|
|
|
.question-help {
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
margin: -1rem 0 1.5rem;
|
|
border-left: 3px solid var(--border-color);
|
|
padding-left: 1rem;
|
|
}
|
|
|
|
.option-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.option-label {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
cursor: pointer;
|
|
transition: all var(--transition-speed) ease;
|
|
}
|
|
|
|
.option-label:hover {
|
|
border-color: var(--primary-color);
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.option-label input {
|
|
margin-right: 0.75rem;
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
}
|
|
|
|
.option-label.selected {
|
|
border-color: var(--primary-color);
|
|
background-color: #e9f2ff;
|
|
}
|
|
|
|
.q-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
border-top: 1px solid var(--border-color);
|
|
padding-top: 1.5rem;
|
|
}
|
|
|
|
.validation {
|
|
color: var(--danger-color);
|
|
font-weight: 500;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.screen--result {
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
#result-title {
|
|
font-size: 2rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.result-content {
|
|
text-align: left;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.result-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.result-section h3 {
|
|
font-size: 1.3rem;
|
|
color: var(--primary-color);
|
|
border-bottom: 2px solid var(--border-color);
|
|
padding-bottom: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.result-actions {
|
|
margin-top: 2.5rem;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.input-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.input-group label {
|
|
display: block;
|
|
font-weight: 600;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.input-field {
|
|
width: 100%;
|
|
padding: 0.8rem 1rem;
|
|
font-size: 1rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
transition: border-color var(--transition-speed);
|
|
}
|
|
|
|
.input-field:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.unit-toggle {
|
|
margin-left: 1rem;
|
|
font-size: 0.9rem;
|
|
color: var(--primary-color);
|
|
cursor: pointer;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
body {
|
|
padding: 0;
|
|
}
|
|
.app {
|
|
max-width: 100%;
|
|
}
|
|
.screen {
|
|
border-radius: 0;
|
|
min-height: 100vh;
|
|
}
|
|
.screen--start {
|
|
padding: 2rem 1rem;
|
|
}
|
|
.sex-select {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
.sex-card {
|
|
width: 100%;
|
|
max-width: 300px;
|
|
}
|
|
.screen--question, .screen--result {
|
|
padding: 1.5rem 1rem;
|
|
}
|
|
.title {
|
|
font-size: 2rem;
|
|
}
|
|
.q-actions {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
#btn-next {
|
|
width: 100%;
|
|
}
|
|
.validation {
|
|
margin-right: 0;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
body {
|
|
background-color: #fff;
|
|
color: #000;
|
|
padding: 0;
|
|
}
|
|
.app {
|
|
box-shadow: none;
|
|
max-width: 100%;
|
|
}
|
|
.screen--result {
|
|
display: block !important;
|
|
padding: 1rem;
|
|
}
|
|
.screen, .q-header, .q-actions, .result-actions {
|
|
display: none;
|
|
}
|
|
#result-title, .result-section h3 {
|
|
color: #000;
|
|
border-bottom: 2px solid #ccc;
|
|
}
|
|
.print-summary {
|
|
display: block !important;
|
|
margin-top: 2rem;
|
|
page-break-before: always;
|
|
}
|
|
.print-summary h3 {
|
|
font-size: 1.2rem;
|
|
}
|
|
.print-summary ul {
|
|
padding-left: 20px;
|
|
}
|
|
}
|
|
|
|
.print-summary {
|
|
display: none;
|
|
}
|