/* ===============================
   SHINTAKU INDEX - KORE26:Shintaku
   =============================== */

/* Toggle AI fisso in alto a destra */
.ai-toggle-sticky {
    position: fixed;
    top: 5.5rem;
    right: 1.25rem;
    z-index: 50;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    padding: 0.65rem 1rem;
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ai-toggle-sticky .toggle-label {
    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Contenitore generale centrato */
.welcome-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-sizing: border-box;
}

/* Schede */
.card {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(12, 18, 24, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    width: 100%;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.subtitle {
    color: #8a8d91;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Form creazione storia */
.story-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(64, 156, 255, 0.15), rgba(28, 38, 51, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    box-sizing: border-box;
    font-family: sans-serif;
    transition: border-color 0.2s;
}

.input-group textarea {
    resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #007aff;
}

/* Pulsante principale */
.btn-primary {
    background: linear-gradient(135deg, #007aff, #0044b4);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Lista storie */
.stories-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.story-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(64, 156, 255, 0.15), rgba(28, 38, 51, 0.85));
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    gap: 15px;
}

.story-info h3 {
    margin: 0;
    font-size: 16px;
    color: white;
    line-height: 1.3;
}

.story-info p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #8a8d91;
}

.story-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.delete-form {
    display: inline;
}

.btn-delete {
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    font-family: sans-serif;
}

.btn-delete:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.btn-secondary {
    color: #007aff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    transform: translateX(3px);
}

.no-stories {
    color: #8a8d91;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 768px) {
    .ai-toggle-sticky {
        display: none !important;
    }

    .welcome-container {
        margin: 20px auto;
        gap: 20px;
    }

    .card {
        padding: 20px;
        border-radius: 16px;
    }

    .card h2 {
        font-size: 20px;
    }

    .story-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .story-actions {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 10px;
        gap: 0;
    }
}

@media (max-width: 600px) {
    .welcome-container {
        padding: 0 14px;
    }
}

/* Avviso: servizio in fase di test */
.beta-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #fcd34d;
}

.beta-notice i {
    font-size: 18px;
    margin-top: 1px;
    flex-shrink: 0;
}

.beta-notice strong {
    color: #fde68a;
    font-weight: 600;
}

.beta-notice p {
    margin: 4px 0 0;
    color: #e7d9ad;
    font-size: 13.5px;
}
