@charset "utf-8";
/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 基础样式 */
html {
    height: 100%;
    background: #2c3e50;
}

body {
    height: 100%;
    font-family: monospace;
    background: #2c3e50;
    color: #ecf0f1;
    min-height: 100vh;
    overflow-x: hidden;
}

body:before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(black 15%, transparent 16%) 0 0, radial-gradient(black 15%, transparent 16%) 8px 8px, radial-gradient(rgba(255, 255, 255, .1) 15%, transparent 20%) 0 1px, radial-gradient(rgba(255, 255, 255, .1) 15%, transparent 20%) 8px 9px;
    background-color: #282828;
    background-size: 16px 16px;
    opacity: 1;
}

/* 计算器包装器 */
.calculator-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 计算器主体 */
.calculator {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(145deg, #c5c5c5, #ffffff);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 25px;
    position: relative;
}

/* 显示屏 */
.display {
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    background: linear-gradient(145deg, #444, #000);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.05);
}

.display-input,
.display-result {
    margin-bottom: 15px;
}

.display-input:last-child,
.display-result:last-child {
    margin-bottom: 0;
}

.display-label {
    font-size: 12px;
    font-weight: 600;
    color: silver;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.display textarea {
    width: 100%;
    background: #ecf0f1;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
    resize: none;
    outline: none;
    min-height: 40px;
    line-height: 1.4;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 -1px 2px rgba(255, 255, 255, 0.3);
}

.display textarea:focus {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 -1px 2px rgba(255, 255, 255, 0.3),
        0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* 控制面板 */
.control-panel {
    margin-bottom: 25px;
}

.control-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 120px;
}

.control-label {
    font-size: 11px;
    font-weight: 600;
    color: gray;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1.8;
    padding: 0 .75em;
    border-radius: 20px;
    background: linear-gradient(145deg, #555, #000);
    box-shadow: 
        2px 1px 4px rgba(0, 0, 0, 0.3),
        inset 0 0 1px #333,
        -1px -1px 2px rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.toggle-item:hover {
    filter: brightness(1.2);
}

.toggle-item:active {
    box-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.3),
        inset 1px 1px 2px rgba(0,0,0, 0.3);
}

.toggle-item input[type="radio"] {
    display: none;
}

.toggle-item input[type="radio"]:checked + .toggle-text {
    color: #FF9800;
    font-weight: 600;
}

.toggle-text {
    font-size: 12px;
    color: #bdc3c7;
    user-select: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* 按钮网格 */
.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

/* 计算器按钮 */
.calc-btn {
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    height: 50px;
    color: white;
    box-shadow: 
        2px 4px 6px rgba(0, 0, 0, 0.3),
        inset 0 0 1px gray,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.calc-btn:hover {
    filter: brightness(1.1);
}

.calc-btn:active {
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* 主要按钮样式 */
.btn-primary {
    background: linear-gradient(145deg, #555, #000000);
}

/* 次要按钮样式 */
.btn-secondary {
    background: linear-gradient(145deg, #FF9800, #FF5722);
}

.shareBtn {
    background: linear-gradient(145deg, #8BC34A, #4CAF50);
}

/* 品牌标识 */
.brand {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(145deg, #444, #000);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.05);
}

.brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.brand-copyright {
    font-size: 11px;
    color: gray;
    text-decoration: none;
}

.brand-copyright:hover {
    color: #ecf0f1;
}