* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Mobile optimizations */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content areas */
.card, .insight-item, .stat-card {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    background: #ffffff;
}

.highlighter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.highlighter-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left p {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 400;
}

.header-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.main-content {
    padding: 40px;
}

header {
    text-align: left;
    margin-bottom: 40px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 24px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1e293b;
}

header p {
    font-size: 1.125rem;
    color: #64748b;
    font-weight: 400;
    max-width: 600px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.card h2 {
    color: #1e293b;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.input-section {
    margin-bottom: 50px;
}

.input-group {
    margin-bottom: 32px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.input-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Slider Styles */
.slider-container {
    margin-top: 20px;
}

.slider {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    /* Touch-friendly improvements */
    touch-action: pan-x;
    -webkit-tap-highlight-color: transparent;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 2px solid white;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.slider::-webkit-slider-track {
    background: #6366f1;
    height: 4px;
    border-radius: 4px;
}

.slider::-moz-range-track {
    background: #6366f1;
    height: 4px;
    border-radius: 4px;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: #6366f1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Touch-friendly improvements */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size */
}

.btn-primary:hover {
    background: #5855eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.results-section {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #6366f1;
}

.stat-card h3 {
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-section {
    margin-bottom: 32px;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
    padding: 16px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.legend-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.insights-section {
    margin-bottom: 32px;
}

.insights-content {
    line-height: 1.6;
}

.insight-item {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #6366f1;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.insight-item:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-item strong {
    color: #1e293b;
    font-weight: 600;
}

.insight-item ul {
    margin-top: 8px;
    margin-left: 16px;
}

.insight-item li {
    margin-bottom: 4px;
    color: #475569;
    font-size: 0.875rem;
}

footer {
    text-align: center;
    color: #64748b;
    margin-top: 40px;
    padding: 20px 0;
    font-weight: 400;
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
}

/* Mobile-First Responsive Design */

/* Base mobile styles (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .highlighter-header {
        padding: 16px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
        text-align: center;
    }
    
    .header-left h1 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .header-left p {
        font-size: 0.875rem;
        margin: 0;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .stat-item {
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .main-content {
        padding: 16px;
    }
    
    header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    header p {
        font-size: 0.875rem;
        margin: 0;
    }
    
    .input-section {
        margin-bottom: 32px;
    }
    
    .input-group {
        margin-bottom: 24px;
    }
    
    .input-group label {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .input-group input {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .slider-container {
        margin-top: 16px;
    }
    
    .slider {
        height: 6px;
        margin-bottom: 10px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        border: 3px solid white;
    }
    
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border: 3px solid white;
    }
    
    .slider-labels {
        font-size: 0.625rem;
        margin-top: 4px;
    }
    
    .btn-primary {
        padding: 16px 24px;
        font-size: 0.875rem;
        border-radius: 8px;
        min-height: 48px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .stat-card {
        padding: 20px 16px;
        border-radius: 8px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .stat-card h3 {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .stat-value {
        font-size: 1.75rem;
        margin-bottom: 2px;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .chart-section {
        margin-bottom: 24px;
    }
    
    .chart-container {
        height: 280px;
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
    }
    
    .legend-item {
        padding: 8px 12px;
        font-size: 0.75rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
    }
    
    .insights-section {
        margin-bottom: 24px;
    }
    
    .insight-item {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .insight-item strong {
        font-size: 0.875rem;
    }
    
    .insight-item ul {
        margin-top: 6px;
        margin-left: 12px;
    }
    
    .insight-item li {
        font-size: 0.75rem;
        margin-bottom: 3px;
    }
    
    .card {
        padding: 20px 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .card h2 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }
    
    footer {
        margin-top: 32px;
        padding: 16px 0;
        font-size: 0.75rem;
    }
}

/* Tablet styles (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .highlighter-header {
        padding: 24px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 24px;
        text-align: center;
    }
    
    .header-left h1 {
        font-size: 2rem;
        margin-bottom: 6px;
    }
    
    .header-left p {
        font-size: 1rem;
        margin: 0;
    }
    
    .header-stats {
        gap: 20px;
        justify-content: center;
    }
    
    .stat-item {
        padding: 16px 20px;
        min-width: 120px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 24px;
    }
    
    header {
        margin-bottom: 32px;
        padding-bottom: 20px;
    }
    
    header h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 1rem;
        margin: 0;
    }
    
    .input-section {
        margin-bottom: 40px;
    }
    
    .input-group {
        margin-bottom: 28px;
    }
    
    .input-group label {
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
    
    .input-group input {
        padding: 16px 18px;
        font-size: 1rem;
    }
    
    .slider-container {
        margin-top: 18px;
    }
    
    .slider {
        height: 6px;
        margin-bottom: 12px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid white;
    }
    
    .slider::-moz-range-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid white;
    }
    
    .btn-primary {
        padding: 16px 28px;
        font-size: 0.875rem;
        min-height: 52px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .stat-card h3 {
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 2rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .chart-section {
        margin-bottom: 32px;
    }
    
    .chart-container {
        height: 320px;
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .chart-legend {
        gap: 16px;
        margin-top: 12px;
    }
    
    .legend-item {
        padding: 8px 14px;
        font-size: 0.875rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
    
    .insights-section {
        margin-bottom: 32px;
    }
    
    .insight-item {
        padding: 18px 20px;
        margin-bottom: 16px;
    }
    
    .insight-item strong {
        font-size: 0.875rem;
    }
    
    .insight-item ul {
        margin-top: 8px;
        margin-left: 16px;
    }
    
    .insight-item li {
        font-size: 0.875rem;
        margin-bottom: 4px;
    }
    
    .card {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    footer {
        margin-top: 40px;
        padding: 20px 0;
        font-size: 0.875rem;
    }
}

/* Desktop styles (769px and above) */
@media (min-width: 769px) {
    .highlighter-header {
        padding: 40px 0;
    }
    
    .header-content {
        padding: 0 40px;
    }
    
    .header-left h1 {
        font-size: 2.5rem;
    }
    
    .header-left p {
        font-size: 1.125rem;
    }
    
    .header-stats {
        gap: 32px;
    }
    
    .stat-item {
        padding: 16px 24px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 40px;
    }
    
    header {
        margin-bottom: 40px;
        padding-bottom: 24px;
    }
    
    header h1 {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 1.125rem;
        margin: 0;
    }
    
    .input-section {
        margin-bottom: 50px;
    }
    
    .input-group {
        margin-bottom: 32px;
    }
    
    .input-group label {
        font-size: 0.875rem;
        margin-bottom: 12px;
    }
    
    .input-group input {
        padding: 16px 20px;
        font-size: 1.1rem;
    }
    
    .slider-container {
        margin-top: 20px;
    }
    
    .slider {
        height: 6px;
        margin-bottom: 16px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        border: 3px solid white;
    }
    
    .slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border: 3px solid white;
    }
    
    .btn-primary {
        padding: 18px 32px;
        font-size: 0.875rem;
        min-height: 56px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 32px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .stat-card h3 {
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 2rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .chart-section {
        margin-bottom: 32px;
    }
    
    .chart-container {
        height: 400px;
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .chart-legend {
        gap: 24px;
        margin-top: 12px;
    }
    
    .legend-item {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
    
    .insights-section {
        margin-bottom: 32px;
    }
    
    .insight-item {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .insight-item strong {
        font-size: 0.875rem;
    }
    
    .insight-item ul {
        margin-top: 8px;
        margin-left: 20px;
    }
    
    .insight-item li {
        font-size: 0.875rem;
        margin-bottom: 6px;
    }
    
    .card {
        padding: 32px;
        margin-bottom: 32px;
    }
    
    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    footer {
        margin-top: 40px;
        padding: 20px 0;
        font-size: 0.875rem;
    }
} 
