/* 自定义美化样式 */

/* 全局样式优化 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* 添加背景装饰元素 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

/* 深色模式支持 */
[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

[data-theme="dark"] .container {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
}

[data-theme="dark"] #myTabs li {
    background: #1e293b;
}

[data-theme="dark"] #myTabs li.active {
    background: #334155;
}

[data-theme="dark"] #myTabs a {
    color: #cbd5e1;
}

[data-theme="dark"] #myTabs a:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #myTabs li.active a {
    color: #93c5fd !important;
}

[data-theme="dark"] .input-group-addon {
    background: #3b82f6;
}

[data-theme="dark"] select.form-control, 
[data-theme="dark"] textarea.form-control {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] select.form-control:focus, 
[data-theme="dark"] textarea.form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .form-group.focused textarea.form-control {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .input-group.focused .form-control {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .layui-layer-molv .layui-layer-content {
    background: #1e293b !important;
    color: #e2e8f0;
}

[data-theme="dark"] code {
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] blockquote {
    background: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] blockquote footer {
    color: #93c5fd;
}

/* Logo样式 */
img[src="./my.png"] {
    border-radius: 50%;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

img[src="./my.png"]:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h1, h2, h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

/* 标签页样式 */
#myTabs {
    border-bottom: none;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
}

#myTabs li {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    max-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

#myTabs li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

#myTabs li:hover::before {
    left: 100%;
}

#myTabs li.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

#myTabs a {
    color: #6c757d;
    font-weight: 600;
    border: none !important;
    padding: 15px 20px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
    font-size: 14px;
    letter-spacing: 0.5px;
}

#myTabs a:hover {
    color: #495057;
    background: transparent !important;
    transform: scale(1.05);
}

#myTabs li.active a {
    color: #ffffff !important;
    background: transparent !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.input-group-addon {
    background: #667eea;
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 18px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

select.form-control, textarea.form-control, .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #495057;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

select.form-control::placeholder, textarea.form-control::placeholder, .form-control::placeholder {
    color: #adb5bd;
    font-size: 14px;
}

select.form-control:focus, textarea.form-control:focus, .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    background: #ffffff;
}

/* 表单输入动画 */
.form-group.focused textarea.form-control {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.input-group.focused .form-control {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
}

/* 按钮样式 */
.btn {
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

/* 按钮波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(6);
        opacity: 0;
    }
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4291 100%);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    box-shadow: 0 6px 20px rgba(102, 187, 106, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #5cb85c 0%, #3d8b40 100%);
    box-shadow: 0 10px 30px rgba(102, 187, 106, 0.45);
}

.btn-warning {
    background: linear-gradient(135deg, #ffca28 0%, #ffc107 100%);
    box-shadow: 0 6px 20px rgba(255, 202, 40, 0.3);
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffb74d 0%, #ffa000 100%);
    box-shadow: 0 10px 30px rgba(255, 202, 40, 0.45);
}

.btn-pink {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.btn-pink:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.45);
}

.btn-cyan {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.btn-cyan:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.45);
}

.btn-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.3);
}

.btn-purple:hover {
    background: linear-gradient(135deg, #5a32a3 0%, #6f42c1 100%);
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.45);
}

/* 结果弹窗样式 */
.layui-layer-molv {
    border-radius: 12px !important;
    overflow: hidden;
}

.layui-layer-molv .layui-layer-title {
    background: #667eea !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

.layui-layer-molv .layui-layer-content {
    padding: 20px !important;
    background: #f8f9fa !important;
}

/* 回到顶部按钮 */
.rollbar {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.rollbar:hover {
    opacity: 1;
}

.rollbar a {
    background: #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.rollbar a:hover {
    background: #5a6fd8;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 配置按钮样式 */
.config-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
}

.config-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    transform: translateY(-2px);
    color: white;
}

.config-btn i {
    margin-right: 5px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .container {
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 15px;
    }
    
    #myTabs li {
        margin: 0 2px;
    }
    
    #myTabs a {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-pane {
    animation: fadeInUp 0.5s ease;
}

/* 代码展示样式 */
code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    display: block;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* 分割线样式 */
hr {
    border-top: 2px solid #667eea;
    opacity: 0.3;
}

/* 关于页面样式 */
blockquote {
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 0 8px 8px 0;
}

blockquote footer {
    color: #667eea;
    font-weight: 600;
}