.calc-0a3c5a51-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
}

.calc-0a3c5a51-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 15px 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #000;
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calc-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-header button {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.calc-header button:hover {
    background: rgba(0,0,0,0.05);
}

.calc-converter-btn {
    background: #0067c0 !important;
    color: #fff;
    font-size: 12px !important;
    padding: 5px 10px !important;
    font-weight: bold;
    line-height: 1.2;
}

.calc-converter-btn:hover {
    background: #005a9e !important;
}

.calc-title {
    font-size: 20px;
    font-weight: 600;
    flex-grow: 1;
    margin-left: 15px;
}

.calc-display {
    text-align: right;
    margin-bottom: 20px;
    padding: 0 5px;
}

.calc-equation {
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

.calc-main-value {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-memory-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
    color: #555;
}

.calc-memory-row span {
    padding: 5px;
    cursor: pointer;
}

.calc-memory-row span:hover {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.calc-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    flex-grow: 1;
}

.calc-keypad button {
    border: none;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
    font-size: 18px;
    padding: 15px 0;
    cursor: pointer;
    transition: background 0.1s;
}

.calc-keypad button:hover {
    background: rgba(255,255,255,0.8);
}

.calc-keypad button.btn-num {
    background: rgba(255,255,255,0.8);
    font-weight: 600;
}

.calc-keypad button.btn-num:hover {
    background: #fff;
}

.calc-keypad button.btn-eq {
    background: #0067c0;
    color: #fff;
}

.calc-keypad button.btn-eq:hover {
    background: #005a9e;
}

/* Menus & Panels */
.calc-menus {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    pointer-events: none;
    z-index: 10;
    display: flex;
    overflow: hidden;
}

.calc-mode-menu {
    margin: 0;
    padding: 10px 0;
    background: rgba(240,240,240,0.95);
    backdrop-filter: blur(10px);
    width: 250px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.2s;
    pointer-events: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.calc-mode-menu.open {
    transform: translateX(0);
}

.calc-menu-section {
    font-weight: 600;
    padding: 15px 20px 5px;
    font-size: 14px;
    color: #333;
}

.calc-mode-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.calc-mode-menu li {
    padding: 10px 20px 10px 30px;
    cursor: pointer;
    font-size: 15px;
}

.calc-mode-menu li:hover {
    background: rgba(0,0,0,0.05);
}

.calc-history-panel, .calc-help-panel {
    background: rgba(240,240,240,0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(100%);
    transition: transform 0.2s;
    pointer-events: auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.calc-history-panel.open, .calc-help-panel.open {
    transform: translateY(0);
}

.calc-history-list {
    flex-grow: 1;
    overflow-y: auto;
    text-align: right;
    padding-right: 10px;
}

.calc-history-item {
    margin-bottom: 15px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.calc-history-item:hover {
    background: rgba(0,0,0,0.05);
}

.calc-history-eq {
    font-size: 14px;
    color: #666;
}

.calc-history-res {
    font-size: 24px;
    font-weight: 600;
}

.calc-clear-history {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 10px;
    margin-top: 10px;
    text-align: right;
    width: 100%;
}

.calc-help-panel h3 {
    margin-top: 0;
}

.calc-help-content {
    flex-grow: 1;
    overflow-y: auto;
}

.calc-help-content p {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.calc-help-content hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.calc-close-help {
    margin-top: 10px;
    padding: 10px;
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
