/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

strong {
    font-weight: 600;
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.game-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    display: none !important;
    min-height: 100vh;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

.screen.active {
    display: flex !important;
}

#gameScreen.active {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Ensure start screen is completely hidden when not active */
#startScreen:not(.active) {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

/* Ensure game screen takes full viewport when active */
#gameScreen.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* ===== LOADING SCREEN ===== */
#loadingScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== START SCREEN ===== */
#startScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.fullscreen-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Feature boxes at top right */
.feature-sidebar {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 3;
    max-width: 280px;
}

.feature-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item-compact {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.feature-item-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.feature-icon-compact {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-item-compact h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.2;
}

.feature-item-compact p {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.3;
}

/* Fullscreen logo background */
.logo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-fullscreen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


.subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
    font-weight: 300;
}

.start-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}


/* Action buttons at bottom with subtitle */
.start-actions-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 2rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.subtitle-bottom {
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0;
    font-weight: 300;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.button-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Audio Toggle Button */
.audio-toggle {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 4;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.audio-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.audio-toggle:active {
    transform: translateY(0);
}

.audio-toggle.muted {
    background: rgba(255, 255, 255, 0.7);
}

.audio-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.audio-toggle.muted .audio-icon {
    opacity: 0.5;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
}

.btn-menu {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.btn-menu:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* ===== GAME HEADER ===== */
.game-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    justify-items: center;
    gap: 1rem;
    text-align: center;
}

.header-left {
    justify-self: center;
}

.scenario-info {
    justify-self: center;
    text-align: center;
}

.scenario-info h2 {
    margin: 0;
    font-size: 1.5rem;
}

.scenario-progress {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.score-display {
    display: flex;
    gap: 2rem;
    font-size: 1.1rem;
    justify-self: center;
    align-items: center;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-item label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

/* ===== GAME CONTENT ===== */
.game-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.content-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: #f8f9fa;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.card-content {
    padding: 1.5rem;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ===== PATIENT INFORMATION ===== */
.patient-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.patient-image-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.patient-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #3498db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.patient-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.patient-details {
    display: grid;
    gap: 1.5rem;
}

.patient-basic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.patient-basic p {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0;
    border-left: 4px solid #3498db;
}

.patient-presentation {
    background: #e8f4fd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.patient-presentation h4 {
    color: #2980b9;
    margin-bottom: 1rem;
}

/* ===== VITAL SIGNS ===== */
.vitals-timestamp {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.vital-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.vital-item:hover {
    background: #e8f4fd;
}

.vital-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.vital-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.vital-unit {
    font-size: 0.8rem;
    color: #95a5a6;
    font-weight: 500;
}

.vital-high {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.vital-high .vital-value {
    color: #e74c3c;
}

.vital-low {
    border-color: #f39c12;
    background: #fef9e7;
}

.vital-low .vital-value {
    color: #f39c12;
}

/* ===== SCENARIO CONTENT ===== */
.scenario-text {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #27ae60;
    font-size: 1.05rem;
    line-height: 1.6;
}

.question-text {
    background: #e8f4fd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.question-text h4 {
    color: #2980b9;
    margin: 0;
}

/* ===== CHOICES ===== */
.choices-grid {
    display: grid;
    gap: 1rem;
}

.choice-btn {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 1.25rem;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
}

.choice-btn:hover:not(:disabled) {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateX(4px);
}

.choice-btn:disabled {
    cursor: not-allowed;
}

.choice-btn.selected {
    background: #fff3cd;
    border-color: #ffc107;
}

.choice-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.choice-btn.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.choice-btn.correct-answer {
    background: #d1ecf1;
    border-color: #17a2b8;
    position: relative;
}

.choice-btn.correct-answer::after {
    content: "Correct Answer";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.choice-letter {
    font-weight: 700;
    color: #3498db;
    margin-right: 0.75rem;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.choice-text {
    flex: 1;
}

/* ===== FEEDBACK ===== */
.feedback-card {
    animation: slideIn 0.3s ease;
}

.feedback-card.feedback-correct {
    border-left: 4px solid #27ae60;
}

.feedback-card.feedback-correct .card-header {
    background: #d4edda;
    color: #155724;
}

.feedback-card.feedback-incorrect {
    border-left: 4px solid #e74c3c;
}

.feedback-card.feedback-incorrect .card-header {
    background: #f8d7da;
    color: #721c24;
}

.feedback-result {
    font-size: 1.5rem;
    font-weight: bold;
}

.feedback-text {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.feedback-actions {
    text-align: center;
}

/* ===== RESULTS SCREEN ===== */
#resultsScreen {
    text-align: center;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-title {
    text-align: center;
    flex: 1;
}

.results-title h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.completion-time {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.results-spacer {
    width: 100px; /* Same width as menu button to center the title */
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.score-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.score-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.score-large {
    font-size: 5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.score-symbol {
    font-size: 3rem;
    opacity: 0.7;
}

.grade-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.grade-letter {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    background: #3498db;
}

.grade-description {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* ===== STATISTICS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card.correct {
    border-top: 4px solid #27ae60;
}

.stat-card.incorrect {
    border-top: 4px solid #e74c3c;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* ===== PERFORMANCE SUMMARY ===== */
.performance-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: left;
}

.performance-summary h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.summary-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #34495e;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
    max-height: 90vh;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 2rem;
}

.modal-body ol {
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ===== REVIEW CONTENT ===== */
.review-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.review-item.correct {
    border-left: 4px solid #27ae60;
}

.review-item.incorrect {
    border-left: 4px solid #e74c3c;
}

.review-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-header h4 {
    margin: 0;
    color: #2c3e50;
}

.review-result {
    font-weight: 600;
}

.review-item.correct .review-result {
    color: #27ae60;
}

.review-item.incorrect .review-result {
    color: #e74c3c;
}

.review-choice, .review-rationale {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e1e8ed;
}

.review-choice {
    background: #f8f9fa;
}

/* ===== SHARE OPTIONS ===== */
.share-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.share-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== EXIT MODAL ===== */
.exit-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .container, .game-container {
        margin: 0 1rem;
    }
    
    .game-content {
        padding: 1.5rem;
    }
    
    .score-main {
        flex-direction: column;
        gap: 2rem;
    }
    
    .score-large {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .screen {
        padding: 1rem;
    }
    
    .container {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
    
    .game-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        text-align: center;
        gap: 1rem;
    }
    
    .header-left,
    .scenario-info,
    .score-display {
        justify-self: center;
    }
    
    .score-display {
        gap: 1.5rem;
    }
    
    .game-content {
        padding: 1rem;
        gap: 1rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .patient-basic {
        grid-template-columns: 1fr;
    }
    
    .patient-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .patient-image-container {
        justify-content: flex-start;
    }
    
    .patient-image {
        width: 100px;
        height: 100px;
    }
    
    .vitals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .vital-item {
        padding: 0.75rem;
    }
    
    .vital-value {
        font-size: 1.25rem;
    }
    
    .feature-sidebar {
        top: 1.5rem;
        right: 1.5rem;
        max-width: 240px;
    }
    
    .feature-grid-vertical {
        gap: 0.8rem;
    }
    
    .feature-item-compact {
        padding: 0.8rem 1rem;
    }
    
    .feature-item-compact h4 {
        font-size: 0.85rem;
    }
    
    .feature-item-compact p {
        font-size: 0.7rem;
    }
    
    .subtitle-bottom {
        font-size: 1.2rem;
    }
    
    .start-actions-bottom {
        padding: 1.5rem;
        gap: 1.2rem;
    }
    
    .button-group {
        gap: 1rem;
    }
    
    .audio-toggle {
        top: 1.5rem;
        left: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .audio-icon {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .score-large {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .results-spacer {
        display: none;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .fullscreen-container {
        flex-direction: column;
        justify-content: flex-end;
    }
    
    .feature-sidebar {
        position: relative;
        top: auto;
        right: auto;
        max-width: 100%;
        margin-bottom: auto;
        padding: 1rem;
        background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    }
    
    .feature-grid-vertical {
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feature-item-compact {
        padding: 0.6rem 0.8rem;
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }
    
    .feature-item-compact h4 {
        font-size: 0.8rem;
    }
    
    .feature-item-compact p {
        font-size: 0.65rem;
    }
    
    .subtitle-bottom {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .start-actions-bottom {
        padding: 1rem;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }
    
    .btn-large {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .audio-toggle {
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .audio-icon {
        font-size: 1rem;
    }
    
    .score-large {
        font-size: 2.5rem;
    }
    
    .vitals-grid {
        grid-template-columns: 1fr;
    }
    
    .choice-btn {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .screen:not(#resultsScreen) {
        display: none !important;
    }
    
    #resultsScreen {
        display: block !important;
        padding: 0;
        background: white;
        color: black;
    }
    
    .btn, .modal {
        display: none !important;
    }
    
    .container {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .score-card {
        background: white;
        border: 1px solid #000;
    }
}