#jerry-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    background: #ffc928;
    color: #080e19;
    border: none;
    border-radius: 30px;
    padding: 16px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 35px #0008;
}

#jerry-panel {
    position: fixed;
    bottom: 85px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 110px);
    z-index: 9999;
    background: #111e30;
    color: #f0f4fa;
    border: 1px solid #38516c;
    border-radius: 14px;
    box-shadow: 0 15px 60px #0009;
    overflow: auto;
    text-align: left;
    font-family: Arial, sans-serif;
}

#jerry-panel[hidden],
#jerry-launcher[hidden] {
    display: none !important;
}

.jerry-header {
    background: #0d1726;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #38516c;
}

.jerry-avatar {
    width: 48px;
    height: 48px;
    border: 2px solid #ffc928;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffc928;
    font-size: 24px;
    font-weight: bold;
}

.jerry-name {
    color: #ffc928;
    font-size: 21px;
    font-weight: bold;
    letter-spacing: 2px;
}

.jerry-subtitle {
    font-size: 11px;
    color: #b4c2d5;
    margin-top: 5px;
}

.jerry-header-text {
    flex: 1;
}

#jerry-panel button {
    cursor: pointer;
    font-family: inherit;
}

#jerry-close {
    border: 0;
    background: transparent;
    color: white;
    font-size: 25px;
}

#jerry-messages {
    padding: 15px;
    height: 230px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.65;
}

.jerry-message {
    background: #1b3049;
    border-radius: 9px;
    padding: 12px;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.jerry-user {
    background: #303b46;
    margin-left: 25px;
}

.jerry-actions {
    padding: 0 15px 12px;
    display: grid;
    gap: 7px;
}

.jerry-actions button {
    background: #0d1726;
    color: #ffc928;
    border: 1px solid #38516c;
    padding: 10px;
    border-radius: 6px;
    text-align: left;
}

.jerry-actions button:hover {
    border-color: #ffc928;
}

#jerry-form {
    display: flex;
    padding: 12px;
    gap: 7px;
    border-top: 1px solid #38516c;
}

#jerry-input {
    flex: 1;
    min-width: 0;
    background: #080e19;
    color: white;
    border: 1px solid #38516c;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.jerry-gold-button {
    background: #ffc928;
    color: #080e19;
    border: 0;
    border-radius: 6px;
    padding: 10px;
    font-weight: bold;
}

.jerry-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
}

.jerry-controls button {
    background: transparent;
    border: 1px solid #38516c;
    border-radius: 5px;
    padding: 7px 10px;
    color: #b4c2d5;
}

#jerry-status {
    padding: 8px 15px 12px;
    color: #b4c2d5;
    font-size: 11px;
    text-align: center;
}

.jerry-speaking .jerry-avatar {
    animation: jerryPulse 1s infinite alternate;
}

@keyframes jerryPulse {
    from { box-shadow: 0 0 5px #ffc92833; }
    to { box-shadow: 0 0 22px #ffc92899; }
}

@media (max-width: 550px) {
    #jerry-panel {
        right: 16px;
        bottom: 76px;
    }
    #jerry-launcher {
        right: 16px;
        bottom: 16px;
    }
    #jerry-messages {
        height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jerry-speaking .jerry-avatar {
        animation: none;
    }
}
/* JERRY V2 VOICE SETTINGS */

.jerry-voice-settings {
    padding: 8px 15px;
    color: #b4c2d5;
    font-size: 13px;
}

.jerry-voice-settings summary {
    cursor: pointer;
    color: #ffc928;
}

.jerry-voice-settings label {
    display: block;
    margin: 12px 0 6px;
}

.jerry-voice-settings select {
    width: 100%;
    background: #080e19;
    color: white;
    border: 1px solid #38516c;
    border-radius: 6px;
    padding: 9px;
}

.jerry-voice-settings input[type="range"] {
    width: 100%;
    accent-color: #ffc928;
}

#jerry-voice-test {
    background: #ffc928;
    color: #080e19;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    margin-top: 8px;
    font-weight: bold;
}
.jerry-language-settings {
    padding: 8px 15px;
    font-size: 12px;
    color: #ffc928;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jerry-language-settings select {
    flex: 1;
    background: #080e19;
    color: white;
    border: 1px solid #38516c;
    border-radius: 6px;
    padding: 8px;
}