:root {
    --primary-purple: #8c44ff;
    --black-dice: #000000;
    --bg-light: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    background: var(--bg-light);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 350px;
    background: var(--black-dice);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    color: white;
}

form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 100%;
    margin: o auto 20px auto;
}

.input-group {
    margin-bottom: 15px;
}

label,
.checkbox-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #34495e;
}

input:not([type="checkbox"]) {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.explanation-box {
    background: #eef0ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-purple);
    font-size: 0.9em;
    color: #333;
}

.btn-primary {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary {
    background: #eee;
    color: #333;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary:hover,
.btn-secondary:hover {
    background: var(--black-dice);
    color: white;
}

.nav-group {
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.nav-group h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 8px;
}

.nav-group a {
    display: inline-block;
    background: var(--primary-purple);
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.nav-group a:hover {
    background: white;
    color: var(--primary-purple);
}

/* Animação do Dado */
.dice-animation-area {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dice {
    width: 150px;
    height: 150px;
    background: white;
    border: 3px solid #333;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 110px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.shaking {
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    50% { transform: translate(-1px, -2px) rotate(-2deg); }
    100% { transform: translate(1px, 2px) rotate(2deg); }
}

.main-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grid-graficos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 2fr));
    gap: 15px;
    width: 100%;
}

.chart-container {
    width: 100%;
    min-height: 300px;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chart-container-mini {
    height: 350px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#containerSeparado {
    flex: 1;
    display: none;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 15px;
        gap: 10px;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.2rem;
        margin: 5px 0;
    }

    form {
        max-width: 100%;
        padding: 15px;
        margin-bottom: 10px;
    }

    .input-group {
        margin-bottom: 8px;
    }

    .input-group label {
        font-size: 0.85rem;
    }

    input {
        padding: 8px;
    }

    .explanation-box {
        display: none;
    }

    .main-content {
        padding: 5px;
    }

    .chart-container {
        height: 280px;
    }
}