:root {
 --font-family: 'DM Sans', sans-serif;
}

html, body {
 margin: 0;
 padding: 0;
 font-family: var(--font-family);
 background-color: #E0F7FA;
 transition: background-color 0.8s ease;
}

.story-container {
 height: 100vh;
 overflow-y: scroll;
 scroll-snap-type: y mandatory;
}

.story-section {
 height: 100vh;
 width: 100%;
 scroll-snap-align: start;
 display: flex;
 justify-content: center;
 align-items: center;
 position: relative;
 overflow: hidden;
}

.content-wrapper {
 position: relative;
 z-index: 10;
 text-align: center;
 max-width: 650px;
 width: 90%;
 padding: 2rem;
 background: rgba(255, 255, 255, 0.3);
 backdrop-filter: blur(12px);
 border-radius: 20px;
 border: 1px solid rgba(255, 255, 255, 0.25);
 opacity: 0;
 transform: translateY(20px);
 transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
 max-height: 85vh;
 overflow-y: auto;
 scrollbar-width: none;
}

.content-wrapper::-webkit-scrollbar {
 display: none;
}


.story-section.is-visible .content-wrapper {
 opacity: 1;
 transform: translateY(0);
}

.section-subtitle {
 font-size: 1rem;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: 2px;
 margin: 0 0 0.5rem 0;
}

.section-title {
 font-size: 3.5rem;
 font-weight: 700;
 margin: 0;
 line-height: 1.1;
}

.browser-mode-term {
 font-size: 1.2rem;
 font-weight: 400;
 font-style: italic;
 opacity: 0.8;
 margin: 0.25rem 0 1.5rem 0;
 color: inherit;
}

.section-description {
 font-size: 1.1rem;
 font-weight: 400;
 margin: 0 0 2rem 0;
 opacity: 0.9;
}

.use-cases-wrapper {
 margin: 2rem 0;
 padding: 1.5rem;
 background: rgba(0, 0, 0, 0.08);
 border-radius: 15px;
 text-align: left;
}

.use-cases-title {
 font-size: 1.2rem;
 font-weight: 700;
 margin: 0 0 1rem 0;
 text-align: center;
}

.use-cases-list {
 list-style: none;
 padding: 0;
 margin: 0;
}

.use-cases-list li {
 padding: 0.5rem 0 0.5rem 2rem;
 position: relative;
 font-size: 0.95rem;
}

.use-cases-list li::before {
 content: '✔';
 position: absolute;
 left: 0;
 top: 0.5rem;
 font-weight: bold;
}

.knowledge-capsule {
 background: rgba(255, 255, 255, 0.3);
 border-radius: 15px;
 padding: 1rem;
 text-align: left;
}

.capsule-toggles {
 display: flex;
 justify-content: center;
 background-color: rgba(0,0,0,0.05);
 border-radius: 10px;
 padding: 5px;
 margin-bottom: 1rem;
}

.capsule-toggles input[type="radio"] {
 display: none;
}

.capsule-toggles label {
 padding: 0.75rem 1.5rem;
 cursor: pointer;
 border-radius: 10px;
 transition: all 0.3s ease;
 font-weight: 600;
 text-align: center;
}

.capsule-toggles input[type="radio"]:checked + label {
 background-color: #fff;
 color: #333;
 box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.capsule-content .definition {
 font-size: 1rem;
 line-height: 1.6;
 display: none;
}

.capsule-content code {
 background-color: rgba(0,0,0,0.08);
 padding: 2px 5px;
 border-radius: 4px;
 font-family: monospace;
}

#native { color: #263238; }
#native .section-subtitle { color: #4DD0E1; }
#native .use-cases-title { color: #263238; }
#native .use-cases-list li::before { color: #4DD0E1; }


#vpn { color: #ECEFF1; }
#proxy { color: #FAFAFA; }
#tor { color: #EDE7F6; }

#vpn .content-wrapper,
#proxy .content-wrapper,
#tor .content-wrapper {
 background: rgba(25, 28, 44, 0.5);
 border-color: rgba(255, 255, 255, 0.2);
}

#vpn .section-subtitle { color: #90A4AE; }
#vpn .use-cases-list li::before { color: #3F51B5; }
#vpn .knowledge-capsule { background: rgba(0, 0, 0, 0.2); }
#vpn .capsule-toggles label { color: #ECEFF1; }
#vpn .capsule-toggles input[type="radio"]:checked + label { background-color: #3F51B5; color: #fff; }

#proxy .section-subtitle { color: #A7FFEB; }
#proxy .use-cases-list li::before { color: #A7FFEB; }
#proxy .knowledge-capsule { background: rgba(0, 0, 0, 0.2); }
#proxy .capsule-toggles label { color: #FAFAFA; }
#proxy .capsule-toggles input[type="radio"]:checked + label { background-color: #00796B; color: #fff; }

#tor .section-subtitle { color: #F8BBD0; }
#tor .use-cases-list li::before { color: #F8BBD0; }
#tor .knowledge-capsule { background: rgba(0, 0, 0, 0.2); }
#tor .capsule-toggles label { color: #EDE7F6; }
#tor .capsule-toggles input[type="radio"]:checked + label { background-color: #7E57C2; color: #fff; }

.data-stream { position: absolute; width: 100%; height: 100%; z-index: 0; }
.data-stream path { fill: none; stroke: #80DEEA; stroke-width: 15; stroke-linecap: round; animation: flow 10s linear infinite; }
@keyframes flow { 0% { transform: translateX(-5%); } 50% { transform: translateX(5%); } 100% { transform: translateX(-5%); } }

.tunnel { position: absolute; width: 100%; height: 100%; perspective: 1000px; }
.tunnel-segment { position: absolute; top: 50%; left: 50%; width: 200vw; height: 200vw; border: 40px solid #3F51B5; border-radius: 50%; box-sizing: border-box; transform-style: preserve-3d; opacity: 0; }
#vpn.is-visible .tunnel-segment { animation: tunnel-zoom 8s linear infinite; }
#vpn.is-visible .tunnel-segment:nth-child(2) { animation-delay: -2s; }
#vpn.is-visible .tunnel-segment:nth-child(3) { animation-delay: -4s; }
#vpn.is-visible .tunnel-segment:nth-child(4) { animation-delay: -6s; }
@keyframes tunnel-zoom { 0% { transform: translate(-50%, -50%) translateZ(-500px) rotateX(75deg); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translate(-50%, -50%) translateZ(1000px) rotateX(75deg); opacity: 0; } }

.monorail-track { position: absolute; width: 120%; height: 10px; background: #00796B; top: 50%; left: -10%; transform: translateY(-50%) rotate(-10deg); box-shadow: 0 0 20px #A7FFEB; }
.data-packet { position: absolute; width: 40px; height: 20px; background: #A7FFEB; border-radius: 5px; top: 50%; left: 0; transform: translateY(-50%); box-shadow: 0 0 15px #fff; }
#proxy.is-visible .data-packet { animation: packet-race 5s ease-in-out infinite; }
@keyframes packet-race { 0% { left: 0%; } 100% { left: 100%; } }

#tor-network-svg { position: absolute; width: 100%; height: 100%; z-index: 0; }
.tor-node { fill: #7E57C2; stroke: #EDE7F6; stroke-width: 2; filter: drop-shadow(0 0 5px #512DA8); }
#tor-spark { filter: drop-shadow(0 0 8px #F8BBD0); opacity: 0; }
#tor.is-visible #tor-spark { opacity: 1; }

@media (max-width: 768px) {
 .section-title { font-size: 2.5rem; }
 .browser-mode-term { font-size: 1.1rem; }
 .section-description { font-size: 1rem; }
 .content-wrapper { padding: 1.5rem; }
 .capsule-toggles label { padding: 0.75rem 1rem; font-size: 0.9rem; }

 .content-wrapper {
     scrollbar-width: thin;
     scrollbar-color: rgba(255, 255, 255, 0.4) rgba(0, 0, 0, 0.1);
 }
 .content-wrapper::-webkit-scrollbar {
     display: block;
     width: 8px;
 }
 .content-wrapper::-webkit-scrollbar-track {
     background: rgba(0, 0, 0, 0.1);
     border-radius: 10px;
 }
 .content-wrapper::-webkit-scrollbar-thumb {
     background: rgba(255, 255, 255, 0.4);
     border-radius: 10px;
 }
 .content-wrapper::-webkit-scrollbar-thumb:hover {
     background: rgba(255, 255, 255, 0.6);
 }

 #vpn .content-wrapper::-webkit-scrollbar-thumb,
 #proxy .content-wrapper::-webkit-scrollbar-thumb,
 #tor .content-wrapper::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
 }
 #vpn .content-wrapper::-webkit-scrollbar-thumb:hover,
 #proxy .content-wrapper::-webkit-scrollbar-thumb:hover,
 #tor .content-wrapper::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.5);
 }
}

@media (max-width: 480px) {
 .section-title { font-size: 2rem; }
 .content-wrapper { width: 85%; padding: 1.5rem 1rem; }
 .use-cases-wrapper { padding: 1rem; }
 .use-cases-list li { padding-left: 1.5rem; font-size: 0.9rem; }
 .capsule-toggles { flex-direction: column; align-items: stretch; }
 .capsule-toggles label { margin-bottom: 5px; }
 .capsule-toggles label:last-child { margin-bottom: 0; }
}