/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #FFFF00;   
    --primary-dark: #FFD700; 
    --secondary: #1E90FF;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #ffd166;
    --dark-bg: #121212;
    --light: #1e1e1e;
    --gray: #2d2d2d;
    --text: #d0d0d0;
    --text-light: #a0a0a0;
    --card-bg: #1E1E1E;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --radius: 12px;
    --dark-card: #1E1E1E;
    --border: #36506b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--dark-bg);
    min-height: 100vh;
    transition: var(--transition);
    font-size: 17px;

}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styles */
.header {
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
    -webkit-background-clip: text;
    animation: fadeIn 0.8s ease;
}

.header p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeIn 1s ease;
}

/* Card styles */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.card-header {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--gray);
    background: var(--card-bg);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: var(--primary);
}

.card-header h2 i {
    margin-right: 0.75rem;
    color: var(--primary);
}

.card-body {
    padding: 2rem;
}

/* Measurement area */
.measurement-area-container {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

.measurement-area {
    position: relative;
    height: 200px;
    background: var(--gray);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.5s ease;
    width: 100%;
    cursor: crosshair;
}

.visual-guide {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    pointer-events: none;
    transition: width 0.5s ease;
}

.reference-line-container {
    position: absolute;
    width: 100%;
    height: 2px;
    background: transparent;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.reference-line {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 100%;
}

.reference-line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary);
    opacity: 0.3;
    z-index: 1;
}

.scale-tick {
    width: 2px;
    background: var(--primary);
    opacity: 0.7;
    z-index: 2;
    position: relative;
}

.scale-tick.major {
    height: 20px;
    opacity: 0.9;
}

.scale-tick:not(.major) {
    height: 10px;
}

.start-point, .end-point {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.start-point {
    left: 20px;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(6, 214, 160, 0.3);
}

.end-point {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 71, 111, 0.3);
}

.movement-tracker {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--warning);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.3);
    transition: all 0.1s ease;
}

.measurement-instructions {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Instruction list in alert */
.instruction-list {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.instruction-list li {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn i {
    margin-right: 0.5rem;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
}

/* Stats panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--border);
    animation: fadeIn 0.8s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.stat-card h3 i {
    margin-right: 0.75rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Alert styles */
.alert {
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.8s ease;
}

.alert-info {
    box-shadow: var(--shadow);
    color: var(--primary);
}

.alert-success {
    background: rgba(6, 214, 160, 0.1);
    border-left: 4px solid var(--success);
    color: #05a87d;
}

.alert-warning {
    background: rgba(255, 209, 102, 0.1);
    border-left: 4px solid var(--warning);
    color: #d4ac2b;
}

.alert-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Content styles */
.content-section {
    margin-bottom: 2.5rem;
    animation: fadeIn 1s ease;
    position: relative;
    z-index: 1;
}

.content-section h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.content-section h2 i {
    margin-right: 0.75rem;
}

.content-section p {
    margin-bottom: 1.25rem;
    color: var(--text);
    line-height: 1.7;
}

.content-section ul, .content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
    color: var(--text);
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.content-section strong {
    color: var(--primary);
}

/* Button group */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-6 {
    margin-bottom: 2.5rem;
}

.px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.25rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .instruction-list {
        padding-left: 1.25rem;
    }
    
    .instruction-list li {
        font-size: 0.85rem;
    }
    
    .reference-line-container {
        padding: 0 15px;
    }
    
    .scale-tick.major {
        height: 16px;
    }
    
    .scale-tick:not(.major) {
        height: 8px;
    }
}

/* -------------------------------------------------------------------------- */
/* Extracted Inline Styles */
/* -------------------------------------------------------------------------- */

/* This targets the icon in the main heading */
.card-header h2 .fas {
    color: var(--text-primary-dark);
}

/* Styles for the alert section */
.alert-text {
    color: var(--text-primary-dark);
}

.alert-heading {
    font-size: 1.1rem;
}

/* Styles for the stats card icons and values */
.stat-card h3 .fas {
    color: rgb(207, 207, 207)!important;
}

.stat-card .stat-value {
    color: var(--text-primary-dark);
}

/* Styles for the main content body */
.content-card-body {
    font-size: 17px;
}

        .card-header h2 .fas {
            color: rgb(204, 204, 204)!important;
        }
        
        .alert-text {
            color: rgb(208, 208, 208)!important;
            font-size: 14px;
        }

        .alert-heading {
            font-size: 1.1rem;
        }

        .form-label-small {
            font-size: 0.8rem;
            margin-top: 0.5rem;
        }

        .content-card-body {
            font-size: 17px;
        }

/* Styles for Content */
        h2 {
            font-size: 1.6em;
        }
        h3 {
            font-size: 1.3em;
            margin-bottom: 1em;
        }
        ul, ol {
            margin-bottom: 1.5em;
        }
        li {
            margin-bottom: 0.5em;
        }
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.95em;
    border: 1px solid #ddd; /* outer border */
}

th, td {
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #ddd; /* grid lines */
}

th {
    font-weight: 600;
}
        .emoji {
            font-size: 1.2em;
        }
        .faq-section {
            border-radius: 5px;
            margin-top: 2em;
        }
        .faq-section h2 {
            margin-top: 0;
        }
        @media (max-width: 600px) {
            body {
                padding: 15px;
            }
            table {
                font-size: 0.85em;
            }
            th, td {
                padding: 8px 10px;
            }
        }

/* Button styles */
#cps-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    color: rgb(225, 225, 225);
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

#cps-reset-btn i {
    margin-right: 0.5rem;
}

#cps-reset-btn:hover {
    transform: translateY(-2px);
}

#cps-reset-btn:active {
    transform: translateY(0);
}

#cps-reset-btn {
    background: var(--danger);
}
