/* DOM */
body {
    margin: 0;
    padding: 20px;
    background-color: #2b2b2b;
    text-align: center;
    color: rgb(216, 213, 206);
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 1.05em;
}

body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/isola.png') no-repeat right bottom;
    background-size: cover;
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

b, strong {
    font-weight: bold;
    color: #FCA601;
}

h1, h2, h3 {
    color: #FCA601;
    margin-top: 10px;
    margin-bottom: 0px;
}

a {
    color: #6EC1E4;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

a:hover {
    color: #f2f7fa;
}

a:hover svg {
    fill: #FCA601;
}

ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

li {
    margin: 8px 0;
}

/* CLASSI */
.buttonBase {
    display: inline-block;
    background-color: #FCA601;
    color: #2b2b2b;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.buttonBase:hover {
    background-color: #5c5c5c;
    color: #FCA601;
}

.buttonAnswer {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 12px 16px;
    background-color: #444;
    color: #f0f0f0;
    border: 2px solid #666;
    border-radius: 8px;
    font-size: 1em;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.buttonAnswer:hover {
    background-color: #555;
    border-color: #FCA601;
}

.buttonAnswer:active {
    animation: flashClick 0.4s ease-out;
}

@keyframes flashClick {
    0%   { background-color: #FCA601; color: #2b2b2b; transform: scale(1.02); }
    50%  { background-color: #ffdd99; }
    100% { background-color: #444; color: #f0f0f0; transform: scale(1); }
}

.logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px auto;
    background: url('../assets/logo.png') no-repeat center center;
    background-size: contain;
}

.titolo {
    position: relative;
    top: -20px;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 5/1; /* mantiene proporzioni */
    margin: 0 auto;
    background: url('../assets/tit.png') no-repeat center center;
    background-size: contain;
}


.container {
    max-width: 800px;
    margin: -20px auto 0 auto;
    padding: 10px 30px;
    background-color: #363636;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.link-list svg {
    fill: #6EC1E4;
    transition: fill 0.2s;
}

.questionText {
    font-size: 1.3em;
}

/* Progression bar */
.progressbar-container {
    width: 100%;
    background-color: #555;
    border-radius: 5px;
    height: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}
  
.progressbar {
    height: 100%;
    width: 0%;
    background-color: #FCA601;
    transition: width 0.3s ease-in-out;
}
  

/* Scheda risultato */
.stella {
    font-size: 1.2em;
    margin: 0 1px;
}

.stellaPiena {
    color: #FCA601;
}

.stellaVuota {
    color: #acacac;
}

.naufrago-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #444;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    gap: 20px;
    text-align: left;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.avatarpic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #FCA601;
    background-color: #222;
}

.naufrago-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #FCA601;
}

.naufrago-info p {
    margin: 0;
    font-size: 1.1em;
    color: #eee;
}

/* Pulsante condividi */
.share-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.share-wrapper svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    transition: fill 0.3s;
}

.share-wrapper:hover svg {
    fill: #FCA601;
}

.share-wrapper:hover::after {
    content: "Condividi";
    position: absolute;
    top: -32px;
    right: 0;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
}

/* Share */
.share-box {
    display: inline-block;
    margin-top:10px !important;
}

.share-box input {
    width: 300px;
    padding: 8px;
    border-radius: 5px;
    border: none;
    margin-right: 10px;
    font-size: 1em;
    background-color: #222;
    color: #fff;
}

.inputShare {
    width: 100%;
    max-width: 100%;
    font-size: 1em;
    padding: 8px 10px;
    border: 2px solid #FCA601;
    border-radius: 6px;
    background-color: #2b2b2b;
    color: #fff;
    overflow-x: auto;
    white-space: nowrap;
    cursor: text;
  }

  .share-title {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #FCA601;
}

.share-message {
    background-color: #1e1e1e;
    padding: 12px 16px;
    border-left: 4px solid #FCA601;
    margin-bottom: 12px;
    text-align: left;
    border-radius: 6px;
    font-style: italic;
    color: #eee;
}

.share-frase {
    margin: 0;
    font-size: 1em;
    word-break: break-word;
}

.share-input-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-input-wrapper input {
    flex: 1;
    min-width: 260px;
}

@media screen and (max-width: 600px) {
    .naufrago-card {
      flex-direction: column;
      text-align: center;
      padding: 16px;
    }
  
    .naufrago-info {
      text-align: center;
    }
    p a.buttonBase {
        display: block;
        margin: 10px 0;
    }    
}

/* FOOTER */
.credits {
    margin-top: 40px;
    padding: 20px;
    background-color: #1e1e1e;
    color: #ccc;
    border-top: 2px solid #FCA601;
    border-radius: 8px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95em;
  }
  
  .credits h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #FCA601;
    font-size: 1.2em;
  }
  
  .credits p {
    margin: 0;
    line-height: 1.6em;
  }
