/* style.css */
* { box-sizing: border-box; }

body { margin: 0; padding: 8vh 20px 20px 20px; font-family: 'Helvetica Neue', Arial, sans-serif; text-align: center; color: #333; min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow-x: hidden; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); transition: background 1s ease; }

#dynamic-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; pointer-events: none; }

.bg-portrait { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; 
    object-position: center 20%; 
    transform: scale(2.0); 
    opacity: 0.05; filter: grayscale(100%); transition: all 1s ease; 
}

@media (max-width: 600px) {
    .bg-portrait {
        transform: scale(1.5);
        object-position: center 15%;
    }
}

.floating-text { position: absolute; white-space: nowrap; color: #2c3e50; font-weight: bold; animation: floatLeft linear infinite; }
@keyframes floatLeft { from { transform: translateX(100vw); } to { transform: translateX(-100vw); } }

.container { width: 100%; max-width: 600px; padding: 40px 30px; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.5); z-index: 10; position: relative; transition: all 0.5s ease; }
.hidden { display: none !important; }

h1 { font-size: 32px; color: #2c3e50; margin-bottom: 10px; font-weight: 800; letter-spacing: 2px; }
.lead { color: #555; font-size: 15px; margin-bottom: 30px; line-height: 1.6; }

.fade-in { animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.fade-out { animation: fadeOut 0.3s forwards; }
.blur-in { animation: blurIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; filter: blur(10px); transform: scale(0.95); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }
@keyframes blurIn { to { opacity: 1; filter: blur(0); transform: scale(1); } }

.btn { display: block; width: 100%; padding: 18px; margin: 15px 0; font-size: 16px; font-weight: bold; cursor: pointer; border: 2px solid rgba(52,152,219,0.1); border-radius: 12px; background-color: rgba(255,255,255,0.9); color: #2c3e50; box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: all 0.2s ease; }
.btn:hover { background-color: #fff; border-color: #3498db; box-shadow: 0 8px 15px rgba(52,152,219,0.15); transform: translateY(-2px); }
.btn:active, .btn.selected { transform: translateY(1px); background-color: #3498db; color: #fff; box-shadow: none; border-color: #3498db; }

.btn-primary { background: linear-gradient(135deg, #3498db, #2980b9); color: white; border: none; box-shadow: 0 4px 15px rgba(52,152,219,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #2980b9, #2471a3); color: white; }
.btn-secondary { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; border: none; box-shadow: 0 4px 15px rgba(46,204,113,0.3); }
.btn-secondary:hover { background: linear-gradient(135deg, #27ae60, #229954); color: white; }
.btn-amazon { background: linear-gradient(135deg, #ff9900, #e68a00); color: white; border: none; box-shadow: 0 4px 15px rgba(255,153,0,0.3); }
.btn-amazon:hover { background: linear-gradient(135deg, #e68a00, #cc7a00); color: white; }

.progress-container { width: 100%; background-color: rgba(0,0,0,0.05); border-radius: 10px; margin-bottom: 15px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #3498db, #2ecc71); width: 0%; transition: width 0.4s ease; }
#progress-text { font-size: 13px; color: #7f8c8d; margin-bottom: 30px; font-weight: bold; letter-spacing: 1px; }

.philosopher-img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.15); margin: 20px auto; display: block; background-color: #f0f0f0; }
.desc { font-size: 16px; line-height: 1.8; text-align: left; color: #444; margin-bottom: 30px; }

.story-quote { font-size: 24px; font-weight: bold; color: #fff; line-height: 1.4; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.story-explanation { font-size: 16px; color: #eee; line-height: 1.8; text-align: left; background: rgba(0,0,0,0.4); padding: 20px; border-radius: 12px; border-left: 4px solid #3498db; text-shadow: 0 1px 3px rgba(0,0,0,0.8); margin-bottom: 30px; }

.container.immersive-mode { background: rgba(20, 25, 30, 0.75); border-color: rgba(255,255,255,0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }

.loader { border: 4px solid rgba(0,0,0,0.05); border-top: 4px solid #3498db; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }