*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    user-select:none;
    -webkit-tap-highlight-color:transparent;
}
::-webkit-progress-bar,
::-webkit-progress-value,
::-moz-progress-bar{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
}
progress{
    display:none !important;
    visibility:hidden !important;
}
#spaLoader{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(15, 15, 30, 0.95);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:99999;
    transition:opacity 0.3s ease;
}
#spaLoader.fade-out{
    opacity:0;
}
.spa-loader-spinner{
    width:50px;
    height:50px;
    border:4px solid rgba(212, 175, 55, 0.3);
    border-top-color:#d4af37;
    border-radius:50%;
    animation:spin 0.8s linear infinite;
}
#pageContent{
    min-height:100vh;
    height:100%;
}
body{
    font-family:"Cinzel", serif;
    background:linear-gradient(135deg, #1a1a2e, #0f3460);
    color:#f5f5f5;
    overflow:hidden;
    height:100vh;
    width:100vw;
    position:relative;
}
.background-image{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:0.4;
    pointer-events:none;
}
.btn-primary{
    padding:15px 40px;
    font-size:1.2rem;
    font-weight:600;
    background:linear-gradient(135deg, #8b7355, #d4af37);
    color:#1a1a1a;
    border:none;
    border-radius:25px;
    cursor:pointer;
    transition:all 0.3s ease;
    box-shadow:0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing:2px;
    font-family:"MedievalSharp", cursive;
    text-decoration:none;
}
.btn-primary:hover, .btn-primary:active{
    background:linear-gradient(135deg, #d4af37, #ffd700);
    transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(212, 175, 55, 0.4);
}
.btn-secondary{
    padding:12px 30px;
    font-size:1rem;
    font-family:"MedievalSharp", cursive;
    background:transparent;
    color:#d4af37;
    border:2px solid #d4af37;
    border-radius:20px;
    cursor:pointer;
    transition:all 0.3s ease;
    letter-spacing:1px;
    text-decoration:none;
    display:inline-block;
}
.btn-secondary:hover, .btn-secondary:active{
    background:rgba(212, 175, 55, 0.1);
    border-color:#ffd700;
    color:#ffd700;
}
.language-buttons{
    display:flex;
    flex-direction:column;
    gap:20px;
    margin-top:30px;
}
.btn-language{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    padding:20px 40px;
    font-size:1.3rem;
    font-family:"MedievalSharp", cursive;
    background:rgba(139, 115, 85, 0.2);
    color:#f5f5f5;
    border:2px solid #8b7355;
    border-radius:15px;
    cursor:pointer;
    transition:all 0.3s ease;
}
.btn-language:hover, .btn-language:active{
    background:linear-gradient(135deg, #8b7355, #d4af37);
    color:#1a1a1a;
    border-color:#d4af37;
    transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(212, 175, 55, 0.3);
}
.btn-language .flag-icon{
    width:50px;
    height:auto;
    border-radius:4px;
    box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
.btn-language .lang-name{
    font-weight:600;
    letter-spacing:1px;
}
.completion-badge{
    width:35%;
    max-width:400px;
    margin:2rem auto;
}
.completion-badge img{
    width:100%;
    height:auto;
    display:block;
}
.completion-container{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:2rem;
    background:radial-gradient(circle at center, #2a2a3ec2, #0f0f1eba);
}
.completion-content{
    text-align:center;
    max-width:600px;
}
.completion-content h2{
    font-family:"UnifrakturMaguntia", cursive;
    font-size:2.5rem;
    color:#ffd700;
    margin-bottom:1.5rem;
    text-shadow:2px 2px 4px rgba(0, 0, 0, 0.5);
}
.completion-content p{
    font-size:1.1rem;
    line-height:1.6;
    margin-bottom:1.5rem;
}
.certificate-form{
    margin:1.5rem 0;
    padding:1.5rem;
    background:rgba(26, 26, 46, 0.8);
    border:1px solid #8b7355;
    border-radius:10px;
}
.certificate-intro{
    font-size:0.95rem !important;
    color:#d5d5d5 !important;
    margin-bottom:1rem !important;
}
.certificate-input{
    width:100%;
    max-width:300px;
    padding:12px 16px;
    font-size:1rem;
    font-family:"MedievalSharp", cursive;
    background:rgba(255, 255, 255, 0.1);
    border:2px solid #8b7355;
    border-radius:8px;
    color:#f5f5f5;
    text-align:center;
    margin-bottom:1rem;
    transition:all 0.3s ease;
}
.certificate-input:focus{
    outline:none;
    border-color:#d4af37;
    background:rgba(255, 255, 255, 0.15);
    box-shadow:0 0 10px rgba(212, 175, 55, 0.3);
}
.certificate-input::placeholder{
    color:#888;
}
.content-box{
    background:linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 52, 96, 0.95));
    border:2px solid #d4af37;
    border-radius:15px;
    padding:2rem;
    margin:1rem;
    box-shadow:0 10px 30px rgba(0, 0, 0, 0.5);
    max-width:600px;
    width:100%;
    text-align:center;
}
.content-box h2{
    font-family:"MedievalSharp", cursive;
    font-size:2rem;
    color:#ffd700;
    margin-bottom:1rem;
    text-align:center;
}
.content-box p{
    font-size:1.1rem;
    line-height:1.6;
    margin-bottom:1.5rem;
    text-align:center;
}
p.cursive{
    font-family:"MedievalSharp", cursive;
    color:#d5d5d5;
}
.falcon{
    position:absolute;
    background:url("../img/falco.png") center/contain no-repeat;
    cursor:pointer;
    display:none;
}
.falcon.flip{
    transform:scaleX(-1);
}
.falcon.flying{
    display:block;
}
.game-area{
    flex-grow:1;
    position:relative;
    overflow:hidden;
}
.game-container{
    height:100%;
    display:flex;
    flex-direction:column;
    background:linear-gradient(135deg, #1e3c72, #2a5298);
}
.game-header{
    background:rgb(0 54 93);
    padding:0.8rem 1rem;
    display:flex;
    flex-direction:column;
    gap:0.5rem;
    z-index:100;
}
.game-instructions{
    text-align:center;
}
.game-instructions p{
    font-size:0.9rem;
    color:#f5f5f5;
    margin:0;
}
#gameScreen .background-image{
    opacity:0.8 !important;
}
img.stemma{pointer-events:none}
.loader{
    width:60px;
    height:60px;
    border:5px solid rgba(255, 215, 0, 0.3);
    border-top:5px solid #ffd700;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:14px;
}
#loadingScreen{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    background:radial-gradient(circle at center, #2a2a3e, #0f0f1e);
}
.main-title{
    font-family:"UnifrakturMaguntia", cursive;
    font-size:3.5rem;
    color:#ffd700;
    text-shadow:3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom:2rem;
    animation:titleGlow 2s ease-in-out infinite;
}
.manuscript-call{
    font-size:1.2rem;
    font-weight:bold;
    text-align:center !important;
    color:#8b0000;
    margin-top:2rem;
    text-indent:0 !important;
}
.manuscript-container{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1rem;
}
.manuscript-intro{
    font-size:1.1rem;
    font-weight:600;
    text-indent:0 !important;
}
.manuscript-scroll{
    position:relative;
    max-width:800px;
    max-height:90vh;
    display:flex;
    flex-direction:column;
}
.manuscript-scroll::after{
    margin-top:-12px;
    z-index:2;
}
.manuscript-scroll::before{
    margin-bottom:-12px;
    z-index:2;
}
.manuscript-scroll::before,
.manuscript-scroll::after{
    content:"";
    display:block;
    height:25px;
    flex-shrink:0;
    background:#8b6914;
    border-radius:50%;
    box-shadow:0 0 15px 5px rgba(139, 105, 20, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}
.manuscript-scroll .manuscript-body{
    padding:2rem 2.5rem;
    overflow-y:auto;
    box-shadow:inset 0 0 30px rgba(139, 69, 19, 0.15),
    0 10px 40px rgba(0, 0, 0, 0.5);
    position:relative;
    background-image:url(/img/pergamena.jpg);
    background-size:contain;
}
.manuscript-text{
    font-family:"MedievalSharp", cursive;
    color:#3a2317;
    font-size:1rem;
    line-height:1.8;
    text-align:justify;
    margin-bottom:2rem;
}
.manuscript-text p{
    margin-bottom:1.2rem;
    text-indent:2rem;
}
.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0, 0, 0, 0.8);
    z-index:1000;
    justify-content:center;
    align-items:center;
}
.modal.active{
    display:flex;
}
.modal-content{
    background:linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border:3px solid #d4af37;
    border-radius:15px;
    padding:2rem;
    max-width:90%;
    max-height:80%;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    -ms-overflow-style:none;
    box-shadow:0 10px 40px rgba(0, 0, 0, 0.5);
    text-align:center;
}
.modal-content::-webkit-scrollbar{
    display:none;
}
.modal-content h3{
    font-family:"MedievalSharp", cursive;
    font-size:1.5rem;
    color:#ffd700;
    margin-bottom:1rem;
    text-align:center;
}
.modal-content p{
    font-size:1.1rem;
    margin-bottom:1.5rem;
    line-height:1.6;
}
.mt24{
    margin-top:24px;
}
.pcdevice{
    text-align:center;
    padding:10px;
    margin-top:31px;
}
.quiz-option{
    padding:1rem;
    background:rgba(212, 175, 55, 0.1);
    border:2px solid #8b7355;
    border-radius:10px;
    cursor:pointer;
    transition:all 0.3s ease;
    font-size:1rem;
    color:#f5f5f5;
}
.quiz-option:hover{
    background:rgba(212, 175, 55, 0.3);
    border-color:#d4af37;
    transform:translateX(5px);
}
.quiz-option.correct{
    background:rgba(0, 255, 0, 0.2);
    border-color:#00ff00;
}
.quiz-option.wrong{
    background:rgba(255, 0, 0, 0.2);
    border-color:#ff0000;
}
.quiz-options{
    display:flex;
    flex-direction:column;
    gap:1rem;
}
.score-display{
    font-size:1.1rem;
    color:#ffd700;
    font-weight:bold;
    text-align:right;
}
.screen{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:none;
    opacity:0;
    transition:opacity 0.5s ease-in-out;
}
.screen.active{
    display:block;
    opacity:1;
}
.training-intro{
    background:rgba(139, 69, 19, 0.1);
    border-radius:10px;
    padding:1.5rem;
    text-align:center;
    border:2px solid rgba(139, 69, 19, 0.3);
}
.training-intro p{
    color:#3a2317;
    font-size:1.1rem;
    margin-bottom:1rem;
    font-family:"Cinzel", serif;
}
.welcome-container{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
}
.welcome-overlay{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    background:rgba(0, 0, 0, 0.5);
}
.welcome-main{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}
.welcome-footer{
    width:100%;
    padding:1rem 1.5rem;
    padding-top:0;
}
.logos-grid{
    display:flex;
    flex-direction:column;
    gap:0.6rem;
    max-width:360px;
    margin:0 auto 1rem;
}
.logos-row{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:0.75rem;
}
.logos-row img{
    flex:1;
    min-width:0;
    max-height:50px;
    object-fit:contain;
}
.copyright{
    text-align:center;
    font-size:0.7rem;
    color:rgba(245, 245, 245, 0.5);
    margin:0;
    font-family:"Cinzel", serif;
    letter-spacing:1px;
}
#welcomeBox{
    display:none;
    justify-content:center;
    align-items:center;
    padding:1rem;
}
#welcomeBox.active{
    display:flex;
}
::-webkit-scrollbar{
    width:8px;
}
::-webkit-scrollbar-thumb{
    background:#8b7355;
    border-radius:4px;
}
::-webkit-scrollbar-thumb:hover{
    background:#d4af37;
}
::-webkit-scrollbar-track{
    background:rgba(0, 0, 0, 0.2);
}
@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
@keyframes titleGlow{
    0%, 100%{text-shadow:3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);}
    50%{text-shadow:3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.8);}
}
@media (max-width:768px){
    .main-title{
        font-size:2.5rem;
    }
    .manuscript-scroll{
        padding:1rem;
    }
    .manuscript-text{
        font-size:0.9rem;
    }
    .modal-content{
        padding:1.5rem;
    }
}
@media (max-width:480px){
    .main-title{
        font-size:2rem;
    }
    .btn-primary{
        padding:12px 30px;
        font-size:1rem;
    }
    .content-box{
        margin:2rem 1rem;
    }
}
/* ============================================
   PARTE 2 - Scelta Location e AR
   ============================================ */
/* ARGame - Container comune */
.argame-container{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:5%;
    background:radial-gradient(circle at center, #2a2a3ec2, #0f0f1eba);
    overflow-y:auto;
    z-index:100;
    position:relative;
}
.argame-content{
    text-align:center;
    max-width:600px;
    width:100%;
}
.argame-content h2{
    font-family:"UnifrakturMaguntia", cursive;
    font-size:2.2rem;
    color:#ffd700;
    margin-bottom:1.5rem;
    text-shadow:2px 2px 4px rgba(0, 0, 0, 0.5);
}
/* Schermata Introduzione */
.argame-intro-box{
    background:rgba(26, 26, 46, 0.8);
    border:1px solid #8b7355;
    border-radius:10px;
    padding:1.5rem;
    margin-bottom:1.5rem;
    text-align:center;
}
.argame-intro-box p{
    font-size:1rem;
    line-height:1.7;
    margin-bottom:1rem;
}
.argame-intro-box p:last-child{
    margin-bottom:0;
}
#languageScreen{
    align-items: center;
    padding: 1rem;
}
#languageScreen.active{
    display:flex!important;
}
.permissions-box{
    background:rgba(26, 26, 46, 0.8);
    border:1px solid #8b7355;
    border-radius:10px;
    padding:1.5rem;
    text-align:left;
    margin-bottom:1.5rem;
}
.permissions-box > p:first-child{
    font-size:1rem;
    line-height:1.6;
    margin-bottom:1.5rem;
    text-align:center;
}
.permission-item{
    display:flex;
    align-items:flex-start;
    gap:1rem;
    padding:1rem;
    background:rgba(139, 69, 19, 0.15);
    border:1px solid #8b7355;
    border-radius:8px;
    margin-bottom:1rem;
}
.permission-icon-box{
    width:50px;
    height:50px;
    background:linear-gradient(135deg, #8b7355, #d4af37);
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}
.permission-icon-text{
    font-family:"MedievalSharp", cursive;
    font-size:0.75rem;
    font-weight:bold;
    color:#1a1a1a;
}
.permission-desc{
    flex:1;
}
.permission-desc strong{
    display:block;
    font-family:"MedievalSharp", cursive;
    font-size:1.1rem;
    color:#ffd700;
    margin-bottom:0.3rem;
}
.permission-desc p{
    font-size:0.9rem;
    line-height:1.5;
    color:#d5d5d5;
    margin:0;
}
.permission-note{
    font-size:0.85rem;
    color:#aaa;
    text-align:center;
    margin-top:1rem;
    margin-bottom:0;
    font-style:italic;
}
/* Schermata Scelta Location */
.location-subtitle{
    font-size:1rem;
    color:#d5d5d5;
    margin-bottom:1.5rem;
}
.location-cards{
    display:flex;
    gap:1rem;
    justify-content:center;
    flex-wrap:wrap;
    margin-top:1rem;
}
.location-card{
    position:relative;
    width:200px;
    height:300px;
    border-radius:15px;
    overflow:hidden;
    cursor:pointer;
    border:3px solid #d4af37;
    transition:all 0.3s ease;
    box-shadow:0 4px 15px rgba(0, 0, 0, 0.4);
}
.location-card:hover, .location-card:active{
    transform:translateY(-5px) scale(1.02);
    box-shadow:0 8px 25px rgba(212, 175, 55, 0.4);
    border-color:#ffd700;
}
.location-card-image{
    width:100%;
    height:100%;
    object-fit:cover;
    pointer-events:none;
}
.location-card-overlay{
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    padding:1rem;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
}
.location-card-name{
    font-family:"MedievalSharp", cursive;
    font-size:1.2rem;
    color:#ffd700;
    font-weight:bold;
    text-shadow:2px 2px 4px rgba(0, 0, 0, 0.8);
}
.location-card-desc{
    font-size:0.85rem;
    color:#d5d5d5;
    margin-top:0.3rem;
}
.hero{
    max-width: 100%;
    width: 100%;
    display: flex;
}
.map-content{
    max-width:700px;
}
.relics-list-container{
    background:rgba(26, 26, 46, 0.8);
    border:1px solid #8b7355;
    border-radius:10px;
    padding:1rem;
    margin-bottom:1.5rem;
    max-height:50vh;
    overflow-y:auto;
}
.relics-list{
    display:flex;
    flex-direction:column;
    gap:0.8rem;
}
.relic-item{
    display:flex;
    align-items:center;
    gap:1rem;
    padding:0.8rem;
    background:rgba(139, 69, 19, 0.15);
    border:1px solid #8b7355;
    border-radius:8px;
    transition:all 0.3s ease;
    cursor:pointer;
}
.relic-item:active{
    transform:scale(0.98);
    background:rgba(139, 69, 19, 0.25);
}
.relic-item-arrow{
    color:#8b7355;
    font-size:1.5rem;
    font-weight:bold;
    flex-shrink:0;
}
.relic-item.collected .relic-item-arrow{
    color:#4CAF50;
}
.relic-item.collected{
    background:rgba(76, 175, 80, 0.2);
    border-color:#4CAF50;
}
.relic-item-number{
    width:32px;
    height:32px;
    background:linear-gradient(135deg, #8b7355, #d4af37);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:"MedievalSharp", cursive;
    font-size:0.9rem;
    font-weight:bold;
    color:#1a1a1a;
    flex-shrink:0;
}
.relic-item.collected .relic-item-number{
    background:linear-gradient(135deg, #4CAF50, #8BC34A);
}
.relic-item-info{
    flex:1;
    text-align:left;
}
.relic-item-name{
    font-family:"MedievalSharp", cursive;
    font-size:1rem;
    color:#ffd700;
    display:block;
}
.relic-item.collected .relic-item-name{
    color:#8BC34A;
}
.relic-item-status{
    font-size:0.8rem;
    color:#aaa;
}
.relic-item.collected .relic-item-status{
    color:#4CAF50;
}
.map-instructions{
    font-size:0.95rem;
    color:#d5d5d5;
    margin-bottom:1.5rem;
    font-style:italic;
}
.btn-reset{
    display:block;
    margin:1.5rem auto 0;
    padding:8px 16px;
    font-size:0.85rem;
    font-family:"MedievalSharp", cursive;
    background:transparent;
    color:#ff6b6b;
    border:1px solid #ff6b6b;
    border-radius:15px;
    cursor:pointer;
    transition:all 0.3s ease;
}
.btn-reset:hover, .btn-reset:active{
    background:rgba(255, 107, 107, 0.1);
    border-color:#ff4444;
    color:#ff4444;
}
#arScreen{
    background:transparent !important;
}
#arScreen.active{
    pointer-events:none;
}
#arScreen.active ~ .background-image,
#arScreen.active + .background-image,
body:has(#arScreen.active) .background-image{
    opacity:0 !important;
}
#arContainer{
    width:100%;
    height:100%;
    position:relative;
    background:transparent;
}
#arViewport{
    display:none;
}
.ar-status{
    position:fixed;
    top:0;
    left:0;
    right:0;
    display:flex;
    justify-content:space-between;
    padding:1rem;
    background:linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    z-index:9999;
    font-size:0.9rem;
    color:#fff;
    pointer-events:none;
}
#gpsStatus{
    color:#4CAF50;
}
#gpsStatus.error{
    color:#f44336;
}
#gpsStatus.waiting{
    color:#ff9800;
}
.ar-instructions{
    position:fixed;
    top:60px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0, 0, 0, 0.7);
    padding:0.8rem 1.2rem;
    border-radius:10px;
    text-align:center;
    z-index:9999;
    max-width:90%;
    pointer-events:none;
}
.ar-instructions p{
    font-size:0.9rem;
    margin:0.3rem 0;
    color:#fff;
}
#distanceInfo{
    color:#ffd700;
    font-weight:bold;
}
#relicStatus{
    font-size:0.85rem;
    margin-top:0.5rem;
}
#relicStatus.relic-status-hidden{
    color:#ff6b6b;
}
#relicStatus.relic-status-visible{
    color:#4CAF50;
}
#relicStatus.relic-status-collectible{
    color:#ffd700;
    font-weight:bold;
    animation:pulseText 1s ease-in-out infinite;
}
@keyframes pulseText{
    0%, 100%{ opacity:1; }
    50%{ opacity:0.6; }
}
.ar-controls{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    display:flex;
    gap:1rem;
    justify-content:center;
    padding:1.5rem;
    background:linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index:9999;
    pointer-events:auto;
}
.btn-ar-action{
    padding:1rem 2rem;
    font-size:1.1rem;
    font-family:"MedievalSharp", cursive;
    background:linear-gradient(135deg, #8b7355, #d4af37);
    color:#1a1a1a;
    border:none;
    border-radius:25px;
    cursor:pointer;
    transition:all 0.3s ease;
    font-weight:600;
}
.btn-ar-action:hover, .btn-ar-action:active{
    background:linear-gradient(135deg, #d4af37, #ffd700);
    transform:scale(1.05);
}
.btn-ar-action:disabled{
    background:#666;
    color:#999;
    cursor:not-allowed;
    transform:none;
}
.btn-ar-back{
    padding:1rem 1.5rem;
    font-size:1rem;
    font-family:"MedievalSharp", cursive;
    background:transparent;
    color:#d4af37;
    border:2px solid #d4af37;
    border-radius:25px;
    cursor:pointer;
    transition:all 0.3s ease;
}
.btn-ar-back:hover, .btn-ar-back:active{
    background:rgba(212, 175, 55, 0.2);
}
/* Modal Storia */
.story-modal-content{
    max-width:500px;
    width:90%;
}
.story-scroll-container{
    max-height:40vh;
    overflow-y:auto;
    margin:1rem 0;
    padding:1rem;
    background:rgba(0, 0, 0, 0.3);
    border-radius:10px;
    border:1px solid #8b7355;
}
.story-relic-info{
    background:rgba(212, 175, 55, 0.1);
    border:1px solid #d4af37;
    border-radius:8px;
    padding:0.8rem;
    margin:1rem 0;
}
.story-relic-info p{
    font-size:0.95rem;
    margin:0;
    color:#d4af37;
}
#relicName{
    font-weight:bold;
    color:#ffd700;
}
.relic-nearby-indicator{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    width:150px;
    height:150px;
    border:4px solid #ffd700;
    border-radius:50%;
    animation:pulseRelic 1.5s ease-in-out infinite;
    pointer-events:none;
    z-index:50;
}
@keyframes pulseRelic{
    0%{
        transform:translate(-50%, -50%) scale(0.8);
        opacity:1;
        border-color:#ffd700;
    }
    50%{
        transform:translate(-50%, -50%) scale(1.2);
        opacity:0.5;
        border-color:#d4af37;
    }
    100%{
        transform:translate(-50%, -50%) scale(0.8);
        opacity:1;
        border-color:#ffd700;
    }
}
.ar-top-info{
    position:fixed;
    top:76px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0, 0, 0, 0.6);
    backdrop-filter:blur(10px);
    padding:0.6rem 1.2rem;
    border-radius:20px;
    z-index:9999;
    pointer-events:none;
}
.ar-top-info span{
    color:#fff;
    font-size:0.9rem;
    font-family:"MedievalSharp", cursive;
}
.ar-collect-container{
    position:fixed;
    bottom:calc(env(safe-area-inset-bottom, 20px) + 20px);
    left:50%;
    transform:translateX(-50%);
    z-index:9999;
    pointer-events:auto;
}
.btn-collect-relic{
    padding:1rem 2.5rem;
    font-size:1.2rem;
    font-family:"MedievalSharp", cursive;
    font-weight:600;
    background:linear-gradient(135deg, #d4af37, #ffd700);
    color:#1a1a1a;
    border:none;
    border-radius:30px;
    cursor:pointer;
    box-shadow:0 4px 20px rgba(212, 175, 55, 0.5);
    transition:all 0.3s ease;
    animation:pulseCollect 2s ease-in-out infinite;
}
.btn-collect-relic:hover, .btn-collect-relic:active{
    background:linear-gradient(135deg, #ffd700, #fff8dc);
    transform:scale(1.05);
    box-shadow:0 6px 30px rgba(212, 175, 55, 0.7);
}
.collected-content{
    padding:0;
    text-align:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.collected-icon{
    position:relative;
    width:80px;
    height:80px;
    margin:0 auto 20px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.icon-glow{
    position:absolute;
    width:100%;
    height:100%;
    background:radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    border-radius:50%;
    animation:pulse 2s ease-in-out infinite;
}
.icon-symbol{
    font-size:48px;
    color:#d4af37;
    position:relative;
    z-index:1;
    animation:float 3s ease-in-out infinite;
}
@keyframes pulse{
    0%, 100%{ transform:scale(1); opacity:0.4; }
    50%{ transform:scale(1.3); opacity:0.2; }
}
@keyframes float{
    0%, 100%{ transform:translateY(0); }
    50%{ transform:translateY(-5px); }
}
.collected-header h2{
    font-size:1.8rem;
    color:#d4af37;
    margin:0;
    text-shadow:0 0 20px rgba(212, 175, 55, 0.3);
}
.fragment-counter{
    background:rgba(212, 175, 55, 0.15);
    border:1px solid rgba(212, 175, 55, 0.3);
    border-radius:20px;
    padding:8px 20px;
    margin:15px auto;
    display:inline-block;
    font-size:0.9rem;
    color:#d4af37;
}
.story-fragment{
    background:rgba(0, 0, 0, 0.4);
    border:1px solid rgba(139, 115, 85, 0.5);
    border-radius:12px;
    padding:25px 20px;
    margin:20px 0;
    text-align:center;
    overflow-y:auto;
    height:345px;
    max-height:345px;
}
.story-title{
    font-size:1.2rem;
    color:#d4af37;
    text-align:center;
    margin:0 0 20px;
}
.story-text{
    font-size:1rem;
    line-height:1.7;
    color:#ccc;
    margin:0;
    font-style:italic;
    font-family:"MedievalSharp", cursive;
    text-align:left;
}
.collected-actions{
    margin-top:30px;
}
.btn-large{
    display:inline-block;
    padding:18px 30px;
    font-size:1.1rem;
}
@keyframes pulseCollect{
    0%, 100%{
        box-shadow:0 4px 20px rgba(212, 175, 55, 0.5);
    }
    50%{
        box-shadow:0 4px 30px rgba(255, 215, 0, 0.8);
    }
}
.btn-ar-back-minimal{
    position:fixed;
    top:76px;
    right:20px;
    padding:10px 16px;
    font-size:16px;
    font-family:monospace;
    background:rgba(0, 0, 0, 0.5);
    color:#c9c9c9;
    border-radius:36px;
    cursor:pointer;
    z-index:9999;
    pointer-events:auto;
    transition:all 0.3s ease;
    border:0;
}
.btn-ar-back-minimal:hover, .btn-ar-back-minimal:active{
    background:rgba(0, 0, 0, 0.7);
    border-color:rgba(255, 255, 255, 0.5);
}
/* Schermata AR pulita - nessun background */
.ar-screen-clean{
    background:transparent !important;
    padding:0 !important;
    margin:0 !important;
}
.ar-screen-clean #arContainer{
    background:transparent !important;
}
/* DEBUG BOX - da rimuovere in produzione */
.ar-debug-box{
    position:fixed;
    top:120px;
    left:10px;
    background:rgba(0, 0, 0, 0.8);
    color:#0f0;
    font-family:monospace;
    font-size:11px;
    padding:8px 12px;
    border-radius:8px;
    z-index:99999;
    pointer-events:none;
    line-height:1.6;
    max-width:200px;
}
.ar-debug-box span{
    color:#fff;
}
/* Settings Button */
.settings-btn{
    position:absolute;
    top:20px;
    right:20px;
    width:44px;
    height:44px;
    background:rgba(139, 115, 85, 0.3);
    border:2px solid #8b7355;
    border-radius:50%;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.3s ease;
    z-index:110;
    padding:0;
}
.settings-btn svg{
    width:24px;
    height:24px;
    color:#d4af37;
    transition:transform 0.3s ease;
}
.settings-btn:hover, .settings-btn:active{
    background:rgba(212, 175, 55, 0.3);
    border-color:#d4af37;
}
.settings-btn:hover svg, .settings-btn:active svg{
    transform:rotate(45deg);
}
/* Settings Modal */
.settings-modal-content{
    max-width:400px;
    width:90%;
}
.settings-options{
    margin:1.5rem 0;
}
.settings-option{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:1rem;
    background:rgba(0, 0, 0, 0.3);
    border:1px solid #8b7355;
    border-radius:10px;
    margin-bottom:1rem;
}
.settings-option:last-child{
    margin-bottom:0;
}
.settings-option-label{
    font-family:"MedievalSharp", cursive;
    font-size:1rem;
    color:#d5d5d5;
}
.settings-language-buttons{
    display:flex;
    gap:10px;
}
.btn-lang-small{
    width:50px;
    height:35px;
    padding:4px;
    background:rgba(0, 0, 0, 0.3);
    border:2px solid #8b7355;
    border-radius:8px;
    cursor:pointer;
    transition:all 0.3s ease;
    display:flex;
    align-items:center;
    justify-content:center;
}
.btn-lang-small img{
    width:100%;
    height:auto;
    border-radius:4px;
}
.btn-lang-small:hover, .btn-lang-small:active{
    border-color:#d4af37;
    background:rgba(212, 175, 55, 0.2);
}
.btn-lang-small.active{
    border-color:#ffd700;
    background:rgba(212, 175, 55, 0.3);
    box-shadow:0 0 10px rgba(212, 175, 55, 0.5);
}
/* Toggle Switch (per futuro audio) */
.toggle-switch{
    position:relative;
    display:inline-block;
    width:50px;
    height:26px;
}
.toggle-switch input{
    opacity:0;
    width:0;
    height:0;
}
.toggle-slider{
    position:absolute;
    cursor:pointer;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:#666;
    transition:0.4s;
    border-radius:26px;
}
.toggle-slider:before{
    position:absolute;
    content:"";
    height:20px;
    width:20px;
    left:3px;
    bottom:3px;
    background:#fff;
    transition:0.4s;
    border-radius:50%;
}
.toggle-switch input:checked + .toggle-slider{
    background:linear-gradient(135deg, #8b7355, #d4af37);
}
.toggle-switch input:checked + .toggle-slider:before{
    transform:translateX(24px);
}
@media (max-width:480px){
    .location-cards{
        gap:0.8rem;
    }
    .location-card{
        width:160px;
        height:240px;
    }
    .location-card-name{
        font-size:1rem;
    }
    .location-card-desc{
        font-size:0.75rem;
    }
    .argame-content h2{
        font-size:1.8rem;
    }
    .relic-item{
        padding:0.6rem;
    }
    .relic-item-number{
        width:28px;
        height:28px;
        font-size:0.8rem;
    }
    .relic-item-name{
        font-size:0.9rem;
    }
}
