* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: url('../img/bg-wood1.png') center / cover no-repeat fixed;
    background-color: #2c1e16;
    /* Fallback */
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================= */
/* HOME PAGE (KARTIBU STUDIOS)               */
/* ========================================= */
.home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.kartibu-logo-img {
    max-width: 90%;
    max-height: 200px;
    height: auto;
    margin-bottom: 20px;
    animation: float 4s ease-in-out infinite;
    /* Un bagliore morbido bianco per far risaltare il logo nero sul legno scuro */
    filter: drop-shadow(0px 5px 15px rgba(255, 255, 255, 0.3));
}

.kartibu-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.coming-soon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: 10px;
    animation: pulse 2s infinite;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

.main-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ========================================= */
/* LEGAL PAGES (COLORWORD)                   */
/* ========================================= */
.legal-wrapper {
    padding: 40px 20px;
    flex: 1;
    display: flex;
    justify-content: center;
}

.legal-container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    color: #333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.legal-header {
    text-align: center;
    margin-bottom: 30px;
}

.app-badge {
    display: inline-block;
    background: #007AFF;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-container h1 {
    color: #1c2833;
    font-size: 32px;
    margin-bottom: 8px;
}

.last-updated {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

.legal-container h2 {
    color: #2c3e50;
    font-size: 22px;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ecf0;
}

.legal-container p {
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 16px;
}

.legal-container ul {
    margin: 10px 0 20px 25px;
}

.legal-container li {
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 16px;
}

.legal-container a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 600;
}

.legal-container a:hover {
    text-decoration: underline;
}

.lang-toggle {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.lang-toggle button {
    padding: 10px 25px;
    border: 2px solid #007AFF;
    border-radius: 25px;
    background: transparent;
    color: #007AFF;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle button:hover {
    background: rgba(0, 122, 255, 0.1);
}

.lang-toggle button.active {
    background: #007AFF;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.lang-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.lang-section.active {
    display: block;
}

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

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

.legal-footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 2px solid #e8ecf0;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .kartibu-logo-img {
        max-height: 120px;
    }

    .legal-container {
        padding: 25px 20px;
    }

    .legal-container h1 {
        font-size: 26px;
    }

    .lang-toggle {
        flex-direction: column;
        padding: 0 20px;
    }
}