body {
    padding: 20px;
    background-color: #f2f2f2;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.header p {
    color: #666;
}

.textarea-wrapper {
    margin-bottom: 20px;
}

.textarea-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.6;
    box-sizing: border-box;
    transition: all .3s;
}

textarea:focus {
    border-color: #1E9FFF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 159, 255, 0.1);
}

.controls {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.custom-dict-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.dict-actions {
    margin: 20px 0;
}

.dict-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    background: #fff;
}

.dict-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    padding: 5px;
    background: #fcfcfc;
    border-radius: 4px;
}

.dict-item:last-child {
    margin-bottom: 0;
}

.dict-item input[type="text"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dict-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dict-item .remove-btn {
    color: #ff5722;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 20px;
    line-height: 1;
}

.dict-item .remove-btn:hover {
    color: #ff0000;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 20px;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.auto-copy-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.auto-copy-label input {
    width: 16px;
    height: 16px;
}

@media screen and (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 15px; }
    .header h1 { font-size: 20px; }
    .tool-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .btn-group { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .btn-group .layui-btn { 
        width: 100%;
        margin: 0;
        padding: 0 5px;
        font-size: 13px;
    }
    .btn-group .layui-btn:nth-child(3) {
        grid-column: span 2;
    }
    
    textarea { height: 120px; }
    .dict-item { flex-wrap: wrap; }
    .dict-item input[type="text"] { min-width: 100px; }
    
    .dict-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 10px 0;
    }
    .dict-actions .layui-btn {
        margin: 0 !important;
        width: 100%;
        float: none !important;
    }
}

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #333;
}
.custom-checkbox input {
    display: none;
}
.custom-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d2d2d2;
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}
.custom-checkbox input:checked + .checkmark {
    background-color: #1E9FFF;
    border-color: #1E9FFF;
}
.custom-checkbox .checkmark:after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}
.custom-checkbox input:checked + .checkmark:after {
    display: block;
}
.custom-checkbox:hover .checkmark {
    border-color: #1E9FFF;
}

.options-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
/* Floating Action Button */
.floating-menu-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
}

.floating-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #009688;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s, background-color 0.3s;
}

.floating-ball:hover {
    background-color: #00796b;
    transform: scale(1.1);
}

.floating-ball i {
    transition: transform 0.3s;
}

.floating-menu-container.active .floating-ball i {
    transform: rotate(45deg);
}

.menu-items {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.floating-menu-container.active .menu-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    transition: all 0.2s;
}

.menu-item:hover {
    background-color: #f2f2f2;
    color: #333;
    transform: scale(1.1);
}

.menu-item .tooltip {
    position: absolute;
    right: 50px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.menu-item:hover .tooltip {
    opacity: 1;
    visibility: visible;
}
