body {
    font-family: 'Segoe UI', sans-serif;
    background: #e0e5ec;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: #f7f9fc;
    border-radius: 20px;
    padding: 25px;
    width: 380px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 10px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    flex: 1;
    margin: 0 3px;
    font-weight: 500;
    background: #f0f0f0;
    color: #333;
    transition: 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    background: #d1d9e6;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Smaller input boxes */
.calculator input {
    width: 100%;
    padding: 8px;
    font-size: 1.1em;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid #ccc;
    text-align: right;
    background: #fff;
    color: #333;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.buttons button {
    padding: 12px;
    font-size: 0.95em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
    transition: 0.2s;
}

.buttons button:hover {
    background: #d1d9e6;
}

.history-toggle {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    border-radius: 12px;
    border: none;
    background: #d1d9e6;
    cursor: pointer;
}

.history-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 70%;
    background: #f7f9fc;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.history-panel h3 {
    text-align: center;
    margin-bottom: 10px;
}

.history-panel ul {
    padding-left: 10px;
}

.history-panel button {
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: #d1d9e6;
    cursor: pointer;
}

/* Chat styles */
.chatbox {
    display: flex;
    flex-direction: column;
}

.chat-output {
    height: 300px;
    background: #f0f0f0;
    border-radius: 15px;
    padding: 10px;
    overflow-y: auto;
    color: #333;
    margin-bottom: 10px;
}

.chat-output div {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
}

.chat-output div:nth-child(odd) {
    background: #e1e5ec;
    align-self: flex-start;
}

.chat-output div:nth-child(even) {
    background: #cfd6e3;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
}

#chat-input {
    flex: 1;
    padding: 12px;
    border-radius: 15px;
    border: 1px solid #ccc;
    margin-right: 5px;
}

.chatbox button {
    padding: 12px;
    border-radius: 15px;
    border: none;
    background: #d1d9e6;
    cursor: pointer;
    transition: 0.2s;
}

.chatbox button:hover {
    background: #b0b8cc;
}
