* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: url('profile-banner1.jpg') no-repeat center center/cover;
    transition: background-color 0.3s ease;
}

body.night-mode {
    background: #1a1a1a;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
}

.header.night-mode {
    background: rgba(0, 0, 0, 0.7);
}

.header h1 {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-size: 24px;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
}

.night-mode .menu-toggle {
    background: rgba(255, 255, 255, 0.15);
}

.night-mode .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.options {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.options.active {
    display: flex;
}

.night-mode .options {
    background: rgba(0, 0, 0, 0.7);
}

.option-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.night-mode .option-btn {
    background: rgba(255, 255, 255, 0.15);
}

.night-mode .option-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.calculator-container {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    min-height: 400px;
}

.night-mode .calculator-container {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.tab-list {
    display: flex;
    gap: 10px;
}

.tab {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.35);
}

.tab.active {
    background: rgba(255, 255, 255, 0.5);
}

.night-mode .tab {
    background: rgba(255, 255, 255, 0.15);
}

.night-mode .tab:hover {
    background: rgba(255, 255, 255, 0.25);
}

.night-mode .tab.active {
    background: rgba(255, 255, 255, 0.3);
}

.add-tab {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 10px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-tab:hover {
    background: rgba(255, 255, 255, 0.35);
}

.night-mode .add-tab {
    background: rgba(255, 255, 255, 0.15);
}

.night-mode .add-tab:hover {
    background: rgba(255, 255, 255, 0.25);
}

.tab-content {
    flex: 1;
    overflow: hidden;
}

.tab-pane {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tab-pane.active {
    display: flex;
}

.calc-display {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
    min-height: 100px;
}

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

.calc-input {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 15px;
    border-radius: 10px;
    color: #fff;
    width: 70%;
    font-size: 20px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    cursor: pointer; /* Indicate clickable */
}

.calc-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.night-mode .calc-input {
    background: rgba(255, 255, 255, 0.15);
}

.calc-result {
    color: #fff;
    font-size: 20px;
    width: 30%;
    text-align: right;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 10px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.night-mode .calc-buttons {
    background: rgba(0, 0, 0, 0.7);
}

.calc-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.calc-btn:active {
    transform: scale(0.95);
}

.night-mode .calc-btn {
    background: rgba(255, 255, 255, 0.15);
}

.night-mode .calc-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.fraction {
    display: inline-block;
    text-align: center;
    font-size: 14px;
    vertical-align: middle;
}

.fraction sup, .fraction sub {
    font-size: 10px;
    line-height: 1;
}