* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei";
    background: #ffffff;
    min-height: 100vh;
    padding: 0;
    color: #333;
}

/* 防止Vue加载前显示代码 */
[v-cloak] {
    display: none;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #409EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.el-main{
    padding:0;
}
.el-card{
    border:none;
}
.loading-spinner p {
    color: #409EFF;
    font-size: 16px;
    font-weight: 500;
}

#app {
    width: 100%;
    height: 100%;
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-card {
    border-radius: 20px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
}

.card-header h1 {
    color: #409EFF;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-header h1 img {
    height: 1em;
    width: auto;
    vertical-align: middle;
}

/* 使用提示 */
.usage-tip {
    margin: 20px 0;
    border-radius: 10px;
}

.tip-title {
    font-size: 15px;
    font-weight: 600;
    color: #409EFF;
}

.tip-content {
    font-size: 14px;
    line-height: 1.8;
    margin-top: 5px;
}

.tip-content strong {
    color: #409EFF;
    font-weight: 600;
}

.separator {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #409EFF;
    line-height: 40px;
}

.result-card {
    margin-top: 30px;
    border-radius: 20px;
    background: #f5f7fa;
}

.no-result-tip {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.no-result-tip i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.no-result-tip p {
    font-size: 16px;
    margin: 0;
}

/* 自动计算提示 */
.auto-calc-tip {
    margin-top: 8px;
    font-size: 13px;
    color: #67C23A;
}

.auto-calc-tip i {
    margin-right: 4px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    font-size: 16px;
    font-weight: 600;
    color: #409EFF;
}

.result-header i {
    margin-right: 5px;
}

.result-notice {
    margin-top: 20px;
}

/* Element UI 样式覆盖 */
.el-form-item__label {
    font-weight: 600;
    color: #606266;
}

.el-input-group__append {
    background-color: #f5f7fa;
    color: #909399;
    padding: 0 15px;
    border-radius: 0 50px 50px 0;
}

.el-input__inner {
    border-radius: 50px;
}

.el-input-group .el-input__inner {
    border-radius: 50px 0 0 50px;
}

.el-select .el-input__inner {
    border-radius: 50px;
}

.el-button {
    border-radius: 50px;
}

.el-button--primary {
    background-color: #409EFF;
    border-color: #409EFF;
}

.el-button--primary:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

.el-descriptions {
    margin-bottom: 0;
}

.el-descriptions-item__label {
    font-weight: 600;
}

.el-descriptions-item__content {
    color: #303133;
}

.el-tag {
    font-weight: 600;
    border-radius: 50px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .card-header h1 {
        font-size: 24px;
    }

    .usage-tip {
        margin: 15px 0;
    }

    .tip-title {
        font-size: 14px;
    }

    .tip-content {
        font-size: 13px;
    }

    .el-form-item__label {
        font-size: 14px;
    }



    /* 按钮在移动端堆叠显示 */
    .el-form-item .el-button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 10px;
    }

    .el-form-item .el-button:last-child {
        margin-bottom: 0;
    }

    /* 移动端宽高输入框改为垂直排列 */
    .el-form-item .el-row {
        display: block !important;
    }

    .el-form-item .el-row .el-col {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .el-form-item .el-row .el-col:last-child {
        margin-bottom: 0;
    }

    .separator {
        display: none;
    }

    /* 表格响应式 */
    .el-descriptions {
        font-size: 13px;
    }

    .el-descriptions-item__label,
    .el-descriptions-item__content {
        padding: 8px 10px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .card-header h1 {
        font-size: 20px;
    }

    .usage-tip {
        margin: 10px 0;
    }

    .tip-title {
        font-size: 13px;
    }

    .tip-content {
        font-size: 12px;
    }

    .el-card__header {
        padding: 15px;
    }

    .el-card__body {
        padding: 15px;
    }

    .el-form--label-left .el-form-item__label {
        width: 100px !important;
        font-size: 13px;
    }
}

/* 输入框聚焦效果 */
.el-input__inner:focus,
.el-select .el-input__inner:focus {
    border-color: #409EFF;
}


/* 加载动画 */
.el-loading-mask {
    background-color: rgba(255, 255, 255, 0.9);
}

/* 画面尺寸可视化图示 */
.screen-diagram {
    margin: 20px auto 30px;
    padding: 20px;
    max-width: 500px;
}

.dimension-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dimension-label {
    color: #FF9800;
    font-weight: bold;
    font-size: 14px;
}

.dimension-line {
    background-color: #FF9800;
}

.dimension-line-horizontal-left,
.dimension-line-horizontal-right {
    height: 2px;
    flex: 1;
    background-color: #FF9800;
    position: relative;
}

.dimension-line-horizontal-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: -4px;
    width: 2px;
    height: 10px;
    background-color: #FF9800;
}

.dimension-line-horizontal-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 2px;
    height: 10px;
    background-color: #FF9800;
}

.dimension-top > span {
    padding: 0 5px;
}

.screen-wrapper {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.screen-box {
    flex: 1;
    border: 4px solid #409EFF;
    border-radius: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px 15px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
    position: relative;
}

.screen-content {
    text-align: center;
    width: 100%;
}

.screen-logo {
    margin-bottom: 8px;
}

.screen-logo img {
    max-width: 100px;
    max-height: 45px;
    height: auto;
    object-fit: contain;
}

.screen-title {
    font-size: 16px;
    font-weight: bold;
    color: #409EFF;
    margin-bottom: 12px;
}

.screen-info {
    font-size: 13px;
    color: #333;
}

.screen-info p {
    margin: 6px 0;
    line-height: 1.6;
}

.screen-size-display {
    font-size: 14px;
    color: #409EFF;
    font-weight: 600;
}

.screen-dimension-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dimension-separator {
    color: #FF9800;
    font-weight: bold;
    font-size: 14px;
    margin: 0 3px;
}

.screen-area-display {
    font-size: 14px;
    color: #67C23A;
    font-weight: 600;
}

.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, #409EFF, transparent);
    margin: 8px 0;
    opacity: 0.3;
}

.dimension-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.dimension-line-vertical-top,
.dimension-line-vertical-bottom {
    width: 2px;
    flex: 1;
    background-color: #FF9800;
    position: relative;
}

.dimension-line-vertical-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    height: 2px;
    width: 10px;
    background-color: #FF9800;
}

.dimension-line-vertical-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    height: 2px;
    width: 10px;
    background-color: #FF9800;
}

.dimension-right > span {
    padding: 5px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .screen-diagram {
        padding: 10px;
    }
    .el-main{
        padding:0;
    }
    .el-card__body{
        padding:5px;
    }
    .screen-box {
        padding: 15px 12px;
    }

    .screen-logo {
        margin-bottom: 6px;
    }

    .screen-logo img {
        max-width: 80px;
        max-height: 40px;
    }

    .screen-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .screen-info {
        font-size: 12px;
    }

    .screen-info p {
        margin: 5px 0;
    }

    .screen-size-display,
    .screen-area-display {
        font-size: 13px;
    }

    .dimension-separator {
        font-size: 13px;
    }

    .divider-line {
        margin: 6px 0;
    }

    .dimension-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .screen-box {
        padding: 12px 8px;
    }

    .screen-logo {
        margin-bottom: 5px;
    }

    .screen-logo img {
        max-width: 70px;
        max-height: 35px;
    }

    .screen-title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .screen-info {
        font-size: 11px;
    }

    .screen-info p {
        margin: 4px 0;
    }

    .screen-size-display,
    .screen-area-display {
        font-size: 12px;
    }

    .dimension-separator {
        font-size: 12px;
    }

    .divider-line {
        margin: 5px 0;
    }
}
