      * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {

            background: #0f0f10;
            color: white;

            font-family: Inter, sans-serif;

    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
        }



        .topbar {

            height: 70px;

            background: rgba(28,28,30,0.9);

            border-bottom: 1px solid rgba(255,255,255,0.05);

            display: flex;

            align-items: center;
            justify-content: center;

            padding: 0 24px;
        }

        .topbar-content {

            width: 100%;

            max-width: 950px;

            display: flex;

            align-items: center;

            justify-content: space-between;
        }

        .logo {

            font-size: 22px;
            font-weight: 700;
        }

        .logo span {
            color: #0c922e;
        }

                .ai-header span {
            color: #0c922e;
        }

        .actions {

            display: flex;
            gap: 12px;
            align-items: center;
        }

button {

    border: none;

    border-radius: 999px;

    padding: 12px 20px;

    cursor: pointer;

    font-weight: 600;

    transition: 0.2s;

    color: white;

    height: 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    white-space: nowrap;
}
        .run-btn {

            background: #096f23;
        }

        .run-btn:hover {

            opacity: 0.9;
            transform: translateY(-1px);
        }

        .clear-btn {

            background: #2c2c2e;
        
    transition:
        transform 0.15s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    box-shadow: 0 4px 12px rgba(0,0,0,0.18);

    -webkit-tap-highlight-color: transparent;

    user-select: none;
        
        
        
        }


        button:hover {

    transform: translateY(-2px);

    opacity: 0.95;

    box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

button:active {

    transform: scale(0.96);

    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.ai-window {

    position: fixed;

    left: 20px;
    top: 120px;
    width: 280px;
    height: auto;
    max-height: none;

    background: rgba(20, 20, 20, 0.65);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 24px;

    padding: 20px;

    z-index: 9999;

    overflow-x: hidden;
    overflow-y: hidden;

    box-shadow: 0 8px 40px rgba(0,0,0,0.35);

    color: white;

    font-family: Inter;
}

#resultado {
    overflow: hidden;
    max-height: none;
}

.ai-header {

    cursor: move;

    user-select: none;

    margin-bottom: 15px;
}
.ai-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ai-controls label {
    font-size: 14px;
    color: #d0d0d0;
}

.ai-controls select {
    width: 88px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #121212;
    color: white;
    border: 1px solid rgba(255,255,255,0.12);
}

.ai-btn {

    width: 100%;

    margin-top: 10px;
    margin-bottom: 15px;

    padding: 12px;

    border: none;
    border-radius: 12px;

    background: #198609;

    color: white;

    cursor: pointer;

    font-weight: bold;
}

#resultado {

    white-space: pre-wrap;

    background: #0b0b0b;

    border-radius: 12px;

    padding: 15px;

    margin-top: 15px;

    min-height: 200px;

    border: 1px solid #222;
}

.dict-btn {

    background: #2c2c2e;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    white-space: nowrap;

    line-height: 1;
}

        .container {

            flex: 1;

            display: flex;

            flex-direction: column;

            align-items: center;

            justify-content: center;

            gap: 18px;

            padding: 10px 30px 40px;

    overflow-y: auto;
    overflow-x: hidden;        }

        .editor-box,
        .output-box {

            width: 100%;

            max-width: 950px;

            background: #1c1c1e;

            border-radius: 28px;

            overflow: hidden;

            border: 1px solid rgba(255,255,255,0.05);

            box-shadow: 0 10px 40px rgba(0,0,0,0.35);
        }

        .section-title {

            padding: 14px 20px;

            color: #8e8e93;

            border-bottom: 1px solid rgba(255,255,255,0.05);

            font-size: 14px;
        }

        #editor {

            width: 100%;

            height: 350px;
        }

        #output {

            min-height: 160px;

            max-height: 160px;

            overflow-y: auto;

            padding: 20px;

            color: #32d74b;

            white-space: pre-wrap;

            font-family: Consolas;
        }

        .footer {

            padding: 10px;

            text-align: center;

            color: #6e6e73;

            font-size: 13px;
        }

        /* SIDEBARS */

        .sidebar {

            position: fixed;

            top: 0;
            right: -420px;

            width: 400px;
            height: 100vh;

            background: #1c1c1e;

            border-left: 1px solid rgba(255,255,255,0.08);

            transition: 0.3s;

            overflow-y: auto;

            padding: 24px;

            z-index: 999;
        }

        .sidebar.open {

            right: 0;
            border-radius: 24px;
    

        }

        .sidebar-header {

            display: flex;

            align-items: center;

            justify-content: space-between;
            
            margin-bottom: 20px;
        }

        /* BOTÃO ROBÔ */

.ai-float-btn {

    position: fixed;

    left: 20px;
    bottom: 20px;

    width: 65px;
    height: 65px;

    border-radius: 50%;

    border: none;

    background: rgba(20,20,20,0.8);

    backdrop-filter: blur(10px);

    color: white;

    font-size: 28px;

    cursor: pointer;

    z-index: 99999;

    box-shadow: 0 0 20px rgba(0,0,0,0.4);

    transition: 0.2s;
}

.ai-float-btn:hover {

    transform: scale(1.08);
}

/* JANELA IA */

.ai-window {

    position: fixed;

    left: 20px;
    bottom: 100px;

    width: 350px;
    height: 510px;

    background: rgba(29, 27, 27, 0.878);

    backdrop-filter: blur(12px);

    border-radius: 24px;

    border: 1px solid rgba(60, 130, 35, 0.848);

    padding: 20px;

    color: white;

    z-index: 99998;

    display: none;

    overflow-y: auto;
}

/* HEADER */

.ai-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

    cursor: move;
}

/* FECHAR */

.close-ai {

    background: transparent;

    border: none;

    color: white;

    font-size: 20px;

    cursor: pointer;
}

        .close-sidebar {

            width: 38px;
            height: 38px;

            border-radius: 50%;

            background: #2c2c2e;

            color: white;

            font-size: 18px;

            display: flex;

            align-items: center;
            justify-content: center;

            padding: 0;
        }

        .sidebar h2 {

            color: #a5e4b7;
        }

        .sidebar h3 {

            margin-top: 22px;
            margin-bottom: 10px;

            color: white;
        }

        .sidebar p {

            color: #b0b0b5;

            line-height: 1.6;

            font-size: 14px;
        }

        .code-example {

            background: #111;

            padding: 14px;

            border-radius: 14px;

            margin-top: 10px;

            color: #32d74b;

            font-family: Consolas;

            white-space: pre-wrap;
            
        }
.dict-title {

    display: flex;

    align-items: center;

    gap: 10px;
}

.python-btn-logo {

    width: 18px;
    height: 18px;

    filter: drop-shadow(0 0 3px rgba(255,255,255,0.08));
}

.python-logo {

    width: 24px;
    height: 24px;

    object-fit: contain;
}


.copy-mini {

    position: absolute;

    top: 10px;
    right: 10px;

    background: rgba(255,255,255,0.06);

    border: none;

    color: #8e8e93;

    width: 30px;
    height: 30px;

    border-radius: 8px;

    cursor: pointer;

    transition: 0.2s;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    line-height: 1;

    font-size: 14px;
}

.copy-mini:hover {

    background: rgba(255,255,255,0.12);

    color: white;
}

.code-wrapper {

    position: relative;
}
@media (max-width: 768px) {

    /* HEADER */
    .topbar {
        padding: 10px;
        height: auto;
    }

    .topbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .logo {
        text-align: center;
        font-size: 18px;
    }

    /* BOTÕES */
    .actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    button {
        width: 100%;
        justify-content: center;
        font-size: 14px;
    }

    /* CONTAINER PRINCIPAL */
    .container {
        padding: 10px;
        gap: 12px;
        overflow: visible; /* 🔥 importante para scroll funcionar */
    }

    /* EDITOR */
    #editor {
        height: 280px;
    }

    .editor-box,
    .output-box {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border-radius: 18px;
    }

    /* OUTPUT menor para caber melhor no celular */
    #output {
        max-height: 140px;
    }

    /* SIDEBAR (DICIONÁRIO + EXEMPLOS) */
    .sidebar {
        width: 100%;
        right: -100%;
        padding: 16px;
    }

    .sidebar.open {
        right: 0;
    }

    /* melhora toque no mobile */
    button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
/* PROFESSOR IA MOBILE */
.ai-window {

    width: 260px;
    max-width: 80%;

    height: auto;
    max-height: none;

    bottom: 80px;
    left: 10px;

    padding: 12px;

    border-radius: 18px;

    font-size: 13px;
}

.ai-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.ai-header h2 {

    font-size: 15px;
    margin: 0;
}

.close-ai {

    background: transparent;
    border: none;

    color: white;

    font-size: 18px;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    cursor: pointer;

    padding: 0;
}

.ai-btn {

    font-size: 13px;
    padding: 10px;
}

#resultado {

    max-height: none;
    overflow: visible;

    font-size: 12px;
}
}

