.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.text-item {
    display: flex;
    flex-direction: column;
    gap: 1em;
    font-family: var(--font-simple);
    margin-bottom: 1.2em;
}

.text-item .input-group {
    display: flex;
    align-items: center;
    justify-content: start;
    position: relative;
    width: 100%;
    gap: 0 10px;
}

.text-item .input-group label {
    min-width: 60px;
    text-align: right;
}

.text-item .input-group svg {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #667;
}

.text-item .input-group input:hover ~ svg {
    color: #5d4ff8;
}

.custom-select {
    position: relative;
}

.custom-select button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    height: 40px;
    gap: 0 6px;
    box-shadow: none;
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    white-space: nowrap;
}

.select-dropdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 3px 5px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 13.7px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.select-dropdown li:hover,
.select-dropdown li[aria-selected="true"] {
    background-color: #f5f5f5;
}

.select-dropdown li .check-icon {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    opacity: 0;
    display: block !important;
}

.select-dropdown li[aria-selected="true"] .check-icon {
    opacity: 1;
}

/*文本框样式*/
.input-text {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    display: flex;
    flex: 1;
    min-width: 100px;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
}

.input-text:focus {
    border-color: #5a4df8;
    background-color: #f8f7fd;
    box-shadow: inset 0 1px 4px rgba(90, 77, 248, 0.2), /* 主题色内影 */ 0 0 0 2px rgba(90, 77, 248, 0.1); /* 外发光点缀（可选） */
}

/*日期选择器*/
.date-input {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    display: flex;
    flex: 1;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
    cursor: pointer;
}

.date-input:hover {
    border-color: #5a4df8;
    background-color: #f8f7fd;
    box-shadow: 0 0 0 2px rgba(90, 77, 248, 0.1);
}

.date-input:hover::placeholder {
    color: #5a4df8;
}

.calendar-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #5d4ff8;
    font-size: 1.3rem;
    pointer-events: none;
}

.open-btn {
    background: rgb(93 79 248 / 85%);
    color: white;
    border: none;
    padding: 18px 45px;
    font-size: 1.1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(93, 79, 248, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.open-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(93, 79, 248, 0.3);
}

.open-btn:active {
    transform: translateY(0);
}

/* 日期选择弹窗样式 */
.datepicker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 27, 31, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.datepicker-container {
    background-color: white;
    border-radius: 24px;
    width: 95%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(45, 45, 84, 0.15);
    animation: slideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.datepicker-header {
    background: rgb(93 79 248 / 85%);
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
}

.datepicker-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.datepicker-current {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.datepicker-body {
    padding: 20px;
}

/* 改进的年月选择器 */
.year-month-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background: #fafbff;
    padding: 5px 40px;
    border-radius: 14px;
    border: 1px solid #e2e6ff;
}

.selector-btn {
    background: none;
    border: none;
    color: rgb(93 79 248 / 85%);
    font-size: 1.5rem;
    padding: 5px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.selector-btn:hover {
    background-color: #f0f2ff;
}

.month-year-display {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c2c54;
    cursor: pointer;
    padding: 4px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    user-select: none;
}

.month-year-display:hover {
    background-color: #f0f2ff;
}

/* 下拉选择器 */
.dropdown-selector {
    display: none;
    position: absolute;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(45, 45, 84, 0.15);
    padding: 20px;
    z-index: 10;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e6ff;
    animation: fadeIn 0.2s ease;
}

.year-selector, .month-selector {
    display: none;
}

.year-selector.active, .month-selector.active {
    display: block;
}

.dropdown-title {
    font-size: 1.1rem;
    color: #5d4ff8;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.year-grid, .month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.year-item, .month-item {
    padding: 12px 5px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.year-item:hover, .month-item:hover {
    background-color: #f0f2ff;
}

.year-item.selected, .month-item.selected {
    background: linear-gradient(to right, #5d4ff8, #7b6efa);
    color: white;
    font-weight: 600;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #7a7a9d;
    font-size: 0.95rem;
}

.weekday {
    padding: 12px 0;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.day:hover {
    background-color: #f0f2ff;
}

.day.other-month {
    color: #c2c4d8;
}

.day.today {
    background-color: #e9ebff;
    color: rgb(93 79 248 / 85%);
    font-weight: 700;
}

.day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgb(93 79 248 / 85%);
}

.day.selected {
    background: rgb(93 79 248 / 85%);
    color: white;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(93, 79, 248, 0.2);
}

.datepicker-footer {
    padding: 20px 25px;
    background-color: #fafbff;
    border-top: 1px solid #e2e6ff;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.action-btn {
    padding: 10px 28px;
    border-radius: 9px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    flex: 1;
}

.cancel-btn {
    background-color: white;
    color: #7a7a9d;
    border: 1px solid #e2e6ff;
}

.cancel-btn:hover {
    background-color: #f5f7ff;
    border-color: #d5d9f0;
}

.today-btn {
    background-color: white;
    color: rgb(93 79 248 / 85%);
    border: 1px solid #e2e6ff;
}

.today-btn:hover {
    background-color: #f5f7ff;
    border-color: rgb(93 79 248 / 85%);
}

.confirm-btn {
    background-color: rgb(93 79 248 / 85%);
    color: white;
}

.confirm-btn:hover {
    box-shadow: 0 8px 20px rgba(93, 79, 248, 0.3);
    transform: translateY(-2px);
}

/*按钮样式*/
.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    font-family: var(--font-simple);
}

.btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

.btn-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 85%);
    border-width: 0;
    fill: #fff;
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: #22c55e;
    fill: #fff;
}

.btn-red {
    color: #fff;
    background-color: rgb(242 55 55 / 95%);
    border-color: rgb(255 31 31);
    fill: #fff;
}

/*结果样式*/
.text-result {
    margin-top: 0.6em;
}

.text-result > label {
    margin-bottom: 10px;
    display: block;
    font-family: var(--font-simple);
}

.text-result table td {
    background-color: #fff;
}

.text-result table td:nth-child(1) {
    width: 150px;
    text-align: center;
    font-weight: normal;
    background-color: var(--main-bg);
}

.process {
    width: 100%;
    height: 36px;
    background-color: #ddd;
    border-radius: 5px;
}

.process .percentage {
    line-height: 36px;
    color: #fff;
    border-radius: 5px;
    text-align: center;
    background-color: #4caf50;
    float: left;
}

.tips {
    margin-left: -6px;
    margin-top: 3px;
    font-size: 13.5px;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }
}