/* --- YLEISET TYYLIT --- */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    
    /* TAUSTAKUVA */
    background-image: url('walrus.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Himmeä peite taustakuvan päällä */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Sisältökontti */
.content-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 700px;
    text-align: center;
    padding: 20px;
    padding-bottom: 50px; /* Lisätilaa alareunaan */
}

.site-title {
    color: white;
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* --- PUHEKUPLA --- */
.speech-bubble {
    background: #e6e6e6;
    border-radius: 0.4em;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 3px solid #367295;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    transition: transform 0.3s ease;
    margin-bottom: 20px; /* Varmuusväli */
}

/* Puhekuplan "pyrstö" */
.speech-bubble:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 0;
    height: 0;
    border: 30px solid transparent;
    border-top-color: #367295;
    border-bottom: 0;
    border-left: 0;
    margin-left: -15px;
    margin-bottom: -30px;
}

.speech-bubble:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 0;
    height: 0;
    border: 30px solid transparent;
    border-top-color: #e6e6e6;
    border-bottom: 0;
    margin-left: -15px;
    margin-bottom: -26px;
    z-index: 1;
}

/* Tekstityylit puhekuplan sisällä */
#info-type {
    color: #e74c3c;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px 0;
}

#info-title {
    color: #367295;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

#info-text {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 10px;
}

.extra-text {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-top: 20px;
}

/* --- MURSU-NAPPI --- */
.action-button {
    /* Siirretään reilusti alas (oli 80px) */
    margin-top: 120px; 
    
    /* Hienompi liukuväri-tausta (ruskean sävyt) */
    background: linear-gradient(to bottom, #8d6e63, #5d4037);
    color: #fff;
    border: 3px solid #3e2723; /* Tumma reunus */
    
    /* Isompi koko */
    padding: 25px 60px;
    font-size: 1.6em;
    
    border-radius: 60px; /* Pyöreä muoto */
    cursor: pointer;
    
    /* Syvempi 3D-varjo ja tekstin varjo */
    box-shadow: 0 8px 0 #3e2723, 0 15px 25px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    
    transition: all 0.2s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.action-button:hover {
    /* Kirkkaampi liukuväri hoverissa */
    background: linear-gradient(to bottom, #a1887f, #6d4c41);
    transform: translateY(-4px); /* Nousee ylöspäin */
    box-shadow: 0 12px 0 #3e2723, 0 20px 35px rgba(0,0,0,0.5);
}

.action-button:active {
    /* Painamisen efekti */
    transform: translateY(4px);
    box-shadow: 0 2px 0 #3e2723;
}

.action-button:disabled {
    background: #a1887f; /* Tasainen väri disabloituna */
    border-color: #8d6e63;
    box-shadow: none;
    cursor: wait;
    transform: translateY(4px);
    opacity: 0.8;
}

/* --- ANIMAATIOT JA APULUOKAT --- */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #367295;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-spinner {
    text-align: center;
    color: #367295;
    font-weight: bold;
}
