/* 变量和基础样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 12px 16px;
    color: var(--dark-color);
}

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

/* 通用按钮样式 */
.icon-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2em;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* ========================================
   操作按钮组 - 现代化设计
   ======================================== */
.action-btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* 所有操作按钮统一使用主题渐变色 */
.action-btn.copy-btn,
.action-btn.save-btn,
.action-btn.word-btn,
.action-btn.md-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.action-btn.copy-btn:hover,
.action-btn.save-btn:hover,
.action-btn.word-btn:hover,
.action-btn.md-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* 按钮激活状态 */
.action-btn:active {
    transform: translateY(0) scale(0.97);
}

/* 按钮图标 */
.action-btn .btn-icon {
    font-size: 1em;
    line-height: 1;
}

/* 按钮文字 */
.action-btn .btn-text {
    font-size: 0.9em;
}

/* 按钮光泽效果 */
.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

/* 按钮涟漪效果 */
.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.action-btn:active::after {
    width: 200px;
    height: 200px;
}

/* 表单元素通用样式 */
textarea {
    width: 100%;
    padding: 10px;
    border: 1.5px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 通用动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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