* { margin:0; padding:0; box-sizing:border-box; }
html, body { overscroll-behavior: contain; }
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    line-height:1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
}
header {
    position: -webkit-sticky;
    position: sticky;
    top:0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding:30px 20px;
    text-align:center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    z-index:100;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-content {
    width: 100%;
}
header h1 {
    font-size:2.2em;
    margin-bottom:12px;
    color: white;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    transition: font-size 0.3s ease;
}
header h1.fact-title {
    font-size: 1.1em;
    line-height: 1.4;
    font-weight: 400;
}
#counter-label { 
    font-size:1.4em; 
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

.scroll-disclaimer {
    font-size: 0.7em;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
    margin-top: 5px;
    display: block;
    text-align: center;
}
#counter { 
    font-weight:bold; 
    color: #ecf0f1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.description {
    max-width:900px;
    margin:40px auto;
    padding:30px 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
}
.description p + p { 
    margin-top:1.5em; 
}
.description p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2c3e50;
}
.silhouettes {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    max-width:95%;
    margin:60px auto;
    padding: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.05);
}
.row {
    display:flex;
    visibility:hidden;
    opacity:0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.row.preloaded {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .row {
        transition: opacity 0.1s ease;
    }
    .silhouette {
        transition: none;
    }
    .silhouette:hover {
        transform: none;
    }
    .row.visible {
        transition: none;
    }
}
.row.visible {
    visibility:visible;
    opacity:1;
    transform: translateY(0);
}
.silhouette {
    width:60px;
    height:60px;
    margin:8px;
    background: #ccc no-repeat center/contain;
    will-change: transform;
    transform: translateZ(0);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}
.silhouette:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.silhouette.survivor {
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    box-shadow: 0 4px 12px rgba(52, 152, 219,0.3);
    border: 2px solid rgba(52, 152, 219,0.4);
}
.silhouette.survivor:hover {
    box-shadow: 0 6px 16px rgba(52, 152, 219,0.5);
    border-color: rgba(52, 152, 219,0.6);
}
.bigfont {
    font-size: 25px;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
    padding: 30px;
    margin: 40px auto;
    max-width: 900px;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}
.bigfont p {
    color: #2c3e50;
    margin: 15px 0;
    font-weight: 500;
}

.fullscreen-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease;
}

.fullscreen-message.show {
    opacity: 1;
    visibility: visible;
}

.fullscreen-message .manifesto-title {
    color: white;
    font-size: 4em;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    max-width: 90%;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4);
    letter-spacing: -4px;
    margin-bottom: 40px;
}

.fullscreen-message .manifesto-text {
    color: rgba(255,255,255,0.95);
    font-size: 1.2em;
    font-weight: 300;
    text-align: center;
    line-height: 1.4;
    max-width: 85%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    margin-bottom: 30px;
}

.fullscreen-message .manifesto-text:last-child {
    margin-bottom: 30px;
    font-weight: 400;
    font-size: 1.4em;
    line-height: 1.4;
}

.restart-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    padding: 15px 30px;
    font-size: 8px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-top: 20px;
}

.restart-button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .restart-button {
        font-size: 8px;
        padding: 12px 24px;
    }
}

/* Autoscroll toggle button */
.autoscroll-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 101;
}

.autoscroll-toggle:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.autoscroll-toggle svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.autoscroll-toggle.active {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
}

/* Mobile-specific styles for fullscreen manifesto */
@media (max-width: 768px) {
    header {
        padding: 10px 10px 2px;
    }
    
    .header-content {
        max-width: 90%;
        text-align: left;
    }
    
    header h1 {
        font-size: 1.6em;
        font-weight: 700;
        letter-spacing: -1px;
        text-align: left;
    }
    
    #counter-label {
        font-size: 1.1em;
        text-align: left;
    }
    
    .scroll-disclaimer {
        text-align: left;
        font-size: 0.7em;
    }
    
    .fullscreen-message .manifesto-title {
        font-size: 2.5em;
        letter-spacing: -4px;
    }
    
    .fullscreen-message .manifesto-text {
        font-size: 1.2em;
        line-height: 1.4;
    }
    
    .fullscreen-message .manifesto-text:last-child {
        font-size: 1.4em;
        line-height: 1.4;
    }
    
    .autoscroll-toggle {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }
    
    .autoscroll-toggle svg {
        width: 20px;
        height: 20px;
    }
}

