/**
 * 🪁 纸鸢工具集页面插件 - 前端样式
 *
 * @package ShirokiTools
 * @author 白木
 * @link https://gl.baimu.live/
 */

/* 🎨 CSS变量定义 */
:root {
    /* ☀️ 亮色模式变量 */
    --tk-bg: #ffffff;
    --tk-bg-soft: #f8f9fa;
    --tk-text: #1a1a1a;
    --tk-text-2: #666666;
    --tk-border: rgba(0, 0, 0, 0.08);
    --tk-primary: #2f78ff;
    --tk-primary-light: rgba(47, 120, 255, 0.08);
    --tk-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    --tk-shadow-hover: 0 10px 24px rgba(47, 120, 255, 0.25);
}

/* 🌆 暗色模式变量 */
[data-bs-theme="dark"] .shiroki-tool-page,
.dark .shiroki-tool-page {
    --tk-bg: #1a1a1a;
    --tk-bg-soft: #2d2d2d;
    --tk-text: #ffffff;
    --tk-text-2: #aaaaaa;
    --tk-border: rgba(255, 255, 255, 0.1);
}

/* 📄 工具页面主容器 */
.shiroki-tool-page {
    padding: 40px 0;
    min-height: 70vh;
}

/* 🏷️ 工具标题区域 */
.shiroki-tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.shiroki-tool-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--tk-text);
    margin-bottom: 12px;
}

.shiroki-tool-description {
    font-size: 1rem;
    color: var(--tk-text-2);
    max-width: 600px;
    margin: 0 auto;
}

/* 🛠️ 工具内容区域 */
.shiroki-tool-content {
    background: var(--tk-bg);
    border-radius: 16px;
    padding: 32px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ✨ 向上渐显动画 */
@keyframes tk-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tk-animate-fade-in-up {
    animation: tk-fade-in-up 0.5s ease-out forwards;
}

/* 🔄 加载/刷新动画 */
.tk-loading-pulse {
    animation: tk-fade-in-up 0.4s ease-out;
}

/* 🏷️ 标签按钮基础样式 */
.tk-emoji-lib__tab {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 🎯 按钮背景从中间扩散动画 - 使用子元素实现 */
.tk-ripple-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* 🌊 激活状态的扩散动画 */
.tk-emoji-lib__tab.is-active .tk-ripple-bg {
    animation: tk-ripple-expand 0.5s ease-out forwards;
}

/* 🎬 扩散动画关键帧 */
@keyframes tk-ripple-expand {
    0% {
        width: 0;
        height: 0;
    }
    100% {
        width: 300%;
        height: 300%;
    }
}

/* 📋 内容切换渐显动画 */
.tk-content-fade-in {
    animation: tk-fade-in-up 0.3s ease-out;
}

/* ©️ 版权信息 */
.shiroki-tool-copyright {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tk-border);
    font-size: 13px;
    color: var(--tk-text-2);
}

.shiroki-tool-copyright a {
    color: var(--tk-primary);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.shiroki-tool-copyright a:hover {
    background: rgba(47, 120, 255, 0.15);
    color: var(--tk-primary);
}

/* ============================================
   😊 Emoji表情库样式
   ============================================ */

/* 😊 Emoji表情库/符号库/MD语法库共用样式 */
.tk-emoji-lib {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 24px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 🔎 搜索栏 */
.tk-emoji-lib__searchbar {
    width: 100%;
    max-width: 900px;
    display: grid;
    justify-items: center;
}

.tk-emoji-lib__search {
    height: 44px;
    width: min(480px, 90vw);
    border-radius: 14px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: var(--tk-bg);
    color: var(--tk-text);
    caret-color: var(--tk-primary);
    padding: 0 18px;
    box-shadow: var(--tk-shadow);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    font-size: 14px;
}

.tk-emoji-lib__search::placeholder {
    color: var(--tk-text-2);
}

.tk-emoji-lib__search:hover,
.tk-emoji-lib__search:focus {
    box-shadow: var(--tk-shadow-hover);
    border-color: rgba(47, 120, 255, 0.35);
    outline: none;
}

/* 🏷️ 工具栏 */
.tk-emoji-lib__toolbar {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
}

.tk-emoji-lib__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.tk-emoji-lib__tab {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--tk-border);
    background: var(--tk-bg-soft);
    color: var(--tk-text);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: max-content;
    flex: 0 0 auto;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tk-emoji-lib__tab:hover {
    background: var(--tk-primary-light);
    border-color: rgba(47, 120, 255, 0.35);
}

.tk-emoji-lib__tab.is-active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

/* 📋 表情/符号网格 */
.tk-emoji-lib__grid {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    justify-content: start;
}

.tk-emoji-lib__item {
    display: grid;
    justify-items: center;
    gap: 0;
    padding: 12px;
    min-height: 100px;
    border-radius: 14px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: var(--tk-bg);
    box-shadow: var(--tk-shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    will-change: transform;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.tk-emoji-lib__item:hover {
    box-shadow: 0 10px 24px var(--tk-hover-shadow-color);
    border-color: var(--tk-hover-border-color);
    transform: scale(1.04);
}

.tk-emoji-lib__item:active {
    transform: scale(0.99);
}

.tk-emoji-lib__content {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    height: 100%;
    position: relative;
    z-index: 2;
}

.tk-emoji-lib__topbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    background: linear-gradient(90deg, var(--tk-topbar-color-1), var(--tk-topbar-color-2));
    box-shadow: 0 0 8px var(--tk-topbar-glow), 0 0 16px var(--tk-topbar-glow);
    z-index: 2;
}

.tk-emoji-lib__char {
    font-size: 28px;
}

.tk-emoji-lib__name {
    font-size: 12px;
    color: var(--tk-text-2);
}

/* 🔔 Toast提示 */
.tk-toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: grid;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
}

.tk-toast {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #0b3;
    background: rgba(16, 180, 80, 0.12);
    border: 1px solid rgba(16, 180, 80, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ============================================
   💰 折扣计算器样式
   ============================================ */

.shiroki-tool-discount .tool-container {
    max-width: 500px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

/* 🎯 上浮标签输入框 */
.shiroki-tool-discount .floating-input-group {
    position: relative;
}

.shiroki-tool-discount .floating-input-group input {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 16px 16px 0;
    font-size: 18px;
    font-weight: 500;
    box-shadow: var(--tk-shadow);
    transition: all 0.25s ease;
    outline: none;
}

.shiroki-tool-discount .floating-input-group input:hover {
    border-color: rgba(47, 120, 255, 0.4);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.12);
}

.shiroki-tool-discount .floating-input-group input:focus {
    border-color: var(--tk-primary);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.2), 0 0 0 4px rgba(47, 120, 255, 0.1);
}

.shiroki-tool-discount .floating-input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tk-text-2);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.25s ease;
    background: var(--tk-bg);
    padding: 0 4px;
}

/* 🎯 输入时标签上浮 */
.shiroki-tool-discount .floating-input-group input:focus + label,
.shiroki-tool-discount .floating-input-group input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: var(--tk-primary);
    font-weight: 500;
}

.shiroki-tool-discount .floating-input-group input:not(:focus):not(:placeholder-shown) + label {
    color: var(--tk-text-2);
}

/* 🏷️ 折扣方式选择 */
.shiroki-tool-discount .discount-type {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shiroki-tool-discount .radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.shiroki-tool-discount .radio-label:hover {
    border-color: rgba(47, 120, 255, 0.4);
    background: rgba(47, 120, 255, 0.05);
}

.shiroki-tool-discount .radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--tk-primary);
    cursor: pointer;
}

.shiroki-tool-discount .radio-label:has(input[type="radio"]:checked) {
    border-color: var(--tk-primary);
    background: linear-gradient(135deg, rgba(47, 120, 255, 0.1), rgba(47, 120, 255, 0.05));
    box-shadow: 0 4px 16px rgba(47, 120, 255, 0.15);
}

.shiroki-tool-discount .radio-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--tk-text);
}

.shiroki-tool-discount .calculate-btn {
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
    transition: filter 0.2s ease;
}

.shiroki-tool-discount .calculate-btn:hover {
    filter: brightness(1.05);
}

.shiroki-tool-discount .result-panel {
    background: var(--tk-bg-soft);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    gap: 12px;
}

.shiroki-tool-discount .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shiroki-tool-discount .result-item.highlight {
    padding-top: 12px;
    border-top: 1px solid var(--tk-border);
}

.shiroki-tool-discount .result-item.highlight .result-value {
    color: var(--tk-primary);
    font-size: 1.2em;
    font-weight: 600;
}

/* ============================================
   🔐 密码生成器样式
   ============================================ */

.shiroki-tool-password .tool-container {
    max-width: 500px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.shiroki-tool-password .input-group {
    display: grid;
    gap: 8px;
}

.shiroki-tool-password .input-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.shiroki-tool-password input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(47, 120, 255, 0.25), rgba(47, 120, 255, 0.5));
    appearance: none;
}

.shiroki-tool-password input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2f78ff;
    box-shadow: 0 4px 12px rgba(47, 120, 255, 0.35);
}

.shiroki-tool-password .password-options {
    display: grid;
    gap: 12px;
}

.shiroki-tool-password .password-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.shiroki-tool-password .generate-btn {
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

.shiroki-tool-password .password-result {
    display: flex;
    gap: 8px;
}

.shiroki-tool-password .password-result input {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 0 16px;
    font-family: monospace;
    font-size: 16px;
}

.shiroki-tool-password .copy-btn {
    height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    border: 0;
    background: var(--tk-primary);
    color: #fff;
    cursor: pointer;
}

.shiroki-tool-password .password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shiroki-tool-password .strength-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.shiroki-tool-password .strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

/* ============================================
   🎨 颜色选择器样式
   ============================================ */

.shiroki-tool-colorwheel .tool-container {
    max-width: 400px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
    justify-items: center;
}

.shiroki-tool-colorwheel .color-picker-wrapper {
    width: 100%;
    display: grid;
    place-items: center;
}

.shiroki-tool-colorwheel input[type="color"] {
    width: 200px;
    height: 200px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.shiroki-tool-colorwheel .color-values {
    width: 100%;
    display: grid;
    gap: 12px;
}

.shiroki-tool-colorwheel .color-value-item {
    display: grid;
    gap: 6px;
}

.shiroki-tool-colorwheel .color-value-item label {
    font-size: 14px;
    color: var(--tk-text-2);
}

.shiroki-tool-colorwheel .value-input-group {
    display: flex;
    gap: 8px;
}

.shiroki-tool-colorwheel .value-input-group input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 0 16px;
    font-family: monospace;
}

.shiroki-tool-colorwheel .copy-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    cursor: pointer;
}

.shiroki-tool-colorwheel .color-preview {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.shiroki-tool-colorwheel .preview-box {
    width: 100%;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* ============================================
   📐 宽高比换算样式
   ============================================ */

.shiroki-tool-aspectratio .tool-container {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.shiroki-tool-aspectratio .preset-ratios {
    display: grid;
    gap: 12px;
}

.shiroki-tool-aspectratio .ratio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shiroki-tool-aspectratio .ratio-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: rgba(47, 120, 255, 0.08);
    color: var(--tk-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.shiroki-tool-aspectratio .ratio-btn:hover {
    filter: brightness(1.05);
}

.shiroki-tool-aspectratio .ratio-btn.active {
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    border-color: transparent;
}

/* 🎬 分辨率选择区域 */
.shiroki-tool-aspectratio .resolution-section .ratio-btn,
.shiroki-tool-aspectratio .dci-section .ratio-btn {
    background: linear-gradient(135deg, rgba(47, 120, 255, 0.12), rgba(47, 120, 255, 0.06));
    border: 1px solid rgba(47, 120, 255, 0.3);
    font-weight: 500;
}

.shiroki-tool-aspectratio .resolution-section .ratio-btn:hover,
.shiroki-tool-aspectratio .dci-section .ratio-btn:hover {
    background: linear-gradient(135deg, rgba(47, 120, 255, 0.2), rgba(47, 120, 255, 0.1));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 120, 255, 0.15);
}

.shiroki-tool-aspectratio .dci-section .ratio-btn {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.12), rgba(138, 43, 226, 0.06));
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.shiroki-tool-aspectratio .dci-section .ratio-btn:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(138, 43, 226, 0.1));
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.15);
}

/* 📝 自定义比例区域 - 使用白色背景 */
.shiroki-tool-aspectratio .custom-ratio {
    background: var(--tk-bg-soft);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(47, 120, 255, 0.15);
}

.shiroki-tool-aspectratio .ratio-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

/* 🎯 宽高比输入框 - 白色背景 */
.shiroki-tool-aspectratio .ratio-input input {
    width: 100%;
    height: 56px;
    text-align: center;
    border-radius: 12px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    color: var(--tk-text);
    font-size: 24px;
    font-weight: 600;
    padding: 16px 8px 0;
    box-shadow: var(--tk-shadow);
    transition: all 0.25s ease;
}

.shiroki-tool-aspectratio .ratio-input input:hover {
    border-color: rgba(47, 120, 255, 0.4);
}

.shiroki-tool-aspectratio .ratio-input input:focus {
    border-color: var(--tk-primary);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.15);
    outline: none;
}

.shiroki-tool-aspectratio .ratio-input label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--tk-text-2);
    font-size: 14px;
    pointer-events: none;
    transition: all 0.25s ease;
    background: var(--tk-bg);
    padding: 0 6px;
}

.shiroki-tool-aspectratio .ratio-input input:focus + label,
.shiroki-tool-aspectratio .ratio-input input:not(:placeholder-shown) + label {
    top: 0;
    transform: translate(-50%, -50%) scale(0.85);
    color: var(--tk-primary);
}

.shiroki-tool-aspectratio .ratio-separator {
    color: var(--tk-text-2);
    font-size: 24px;
    font-weight: 600;
}

/* 🎯 宽高比换算 - 上浮标签输入框 */
.shiroki-tool-aspectratio .floating-input-group {
    position: relative;
}

.shiroki-tool-aspectratio .floating-input-group input {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 16px 16px 0;
    font-size: 18px;
    font-weight: 500;
    box-shadow: var(--tk-shadow);
    transition: all 0.25s ease;
    outline: none;
}

.shiroki-tool-aspectratio .floating-input-group input:hover {
    border-color: rgba(47, 120, 255, 0.4);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.12);
}

.shiroki-tool-aspectratio .floating-input-group input:focus {
    border-color: var(--tk-primary);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.2), 0 0 0 4px rgba(47, 120, 255, 0.1);
}

.shiroki-tool-aspectratio .floating-input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tk-text-2);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.25s ease;
    background: var(--tk-bg);
    padding: 0 4px;
}

/* 🎯 输入时标签上浮 */
.shiroki-tool-aspectratio .floating-input-group input:focus + label,
.shiroki-tool-aspectratio .floating-input-group input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: var(--tk-primary);
    font-weight: 500;
}

.shiroki-tool-aspectratio .floating-input-group input:not(:focus):not(:placeholder-shown) + label {
    color: var(--tk-text-2);
}

.shiroki-tool-aspectratio .dimension-calc {
    display: grid;
    gap: 16px;
}

.shiroki-tool-aspectratio .dimension-calc h4 {
    font-size: 16px;
    font-weight: 500;
    color: var(--tk-text);
}

.shiroki-tool-aspectratio .calc-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.shiroki-tool-aspectratio .calculate-btn {
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

.shiroki-tool-aspectratio .result-panel {
    background: var(--tk-bg-soft);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    gap: 12px;
}

/* ============================================
   💱 货币转换器样式
   ============================================ */

.shiroki-tool-currency .tool-container {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

/* 🎯 货币转换器 - 上浮标签输入框 */
.shiroki-tool-currency .floating-input-group {
    position: relative;
}

.shiroki-tool-currency .floating-input-group input {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 16px 16px 0;
    font-size: 18px;
    font-weight: 500;
    box-shadow: var(--tk-shadow);
    transition: all 0.25s ease;
    outline: none;
}

.shiroki-tool-currency .floating-input-group input:hover {
    border-color: rgba(47, 120, 255, 0.4);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.12);
}

.shiroki-tool-currency .floating-input-group input:focus {
    border-color: var(--tk-primary);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.2), 0 0 0 4px rgba(47, 120, 255, 0.1);
}

.shiroki-tool-currency .floating-input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tk-text-2);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.25s ease;
    background: var(--tk-bg);
    padding: 0 4px;
}

/* 🎯 输入时标签上浮 */
.shiroki-tool-currency .floating-input-group input:focus + label,
.shiroki-tool-currency .floating-input-group input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: var(--tk-primary);
    font-weight: 500;
}

.shiroki-tool-currency .floating-input-group input:not(:focus):not(:placeholder-shown) + label {
    color: var(--tk-text-2);
}

.shiroki-tool-currency .currency-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 12px;
}

.shiroki-tool-currency .select-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tk-text-2);
}

.shiroki-tool-currency select {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    background: var(--tk-bg);
    color: var(--tk-text);
    padding: 0 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.shiroki-tool-currency select:hover {
    border-color: rgba(47, 120, 255, 0.4);
}

.shiroki-tool-currency select:focus {
    outline: none;
    border-color: var(--tk-primary);
    box-shadow: 0 8px 24px rgba(47, 120, 255, 0.15);
}

.shiroki-tool-currency .swap-btn {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

.shiroki-tool-currency .convert-btn {
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

.shiroki-tool-currency .loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: var(--tk-text-2);
}

.shiroki-tool-currency .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(47, 120, 255, 0.2);
    border-top-color: var(--tk-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.shiroki-tool-currency .convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shiroki-tool-currency .result-panel {
    background: var(--tk-bg-soft);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.shiroki-tool-currency .result-amount {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--tk-primary);
}

.shiroki-tool-currency .result-time {
    margin-top: 8px;
    font-size: 12px;
    color: var(--tk-text-2);
}

.shiroki-tool-currency .result-rate {
    margin-top: 8px;
    color: var(--tk-text-2);
}

.shiroki-tool-currency .currency-note {
    text-align: center;
    font-size: 12px;
    color: var(--tk-text-2);
}

/* ============================================
   🇯🇵 假名学习样式
   ============================================ */

.shiroki-tool-kana {
    display: grid;
    gap: 24px;
}

.shiroki-tool-kana .kana-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.shiroki-tool-kana .kana-tab {
    height: 40px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: rgba(47, 120, 255, 0.08);
    color: var(--tk-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.shiroki-tool-kana .kana-tab.active {
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    border-color: transparent;
}

.shiroki-tool-kana .kana-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.shiroki-tool-kana .kana-item {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: var(--tk-bg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shiroki-tool-kana .kana-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.15);
}

.shiroki-tool-kana .kana-char {
    font-size: 28px;
}

.shiroki-tool-kana .kana-romaji {
    font-size: 12px;
    color: var(--tk-text-2);
}

/* ============================================
   🖼️ ICO生成器样式
   ============================================ */

.shiroki-tool-icotool .tool-container {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.shiroki-tool-icotool .upload-area {
    position: relative;
    width: 100%;
    border: 2px dashed rgba(47, 120, 255, 0.35);
    border-radius: 14px;
    background: rgba(47, 120, 255, 0.06);
    display: grid;
    place-items: center;
    padding: 48px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shiroki-tool-icotool .upload-area:hover {
    border-color: var(--tk-primary);
    background: rgba(47, 120, 255, 0.1);
}

.shiroki-tool-icotool .upload-content {
    text-align: center;
    pointer-events: none;
}

.shiroki-tool-icotool .upload-content .dashicons {
    font-size: 48px;
    color: var(--tk-primary);
}

.shiroki-tool-icotool .upload-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--tk-text-2);
}

.shiroki-tool-icotool .image-preview {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.shiroki-tool-icotool .image-preview img {
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.shiroki-tool-icotool .remove-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 0;
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    cursor: pointer;
}

.shiroki-tool-icotool .size-options {
    display: grid;
    gap: 12px;
}

.shiroki-tool-icotool .size-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.shiroki-tool-icotool .size-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(47, 120, 255, 0.25);
    background: rgba(47, 120, 255, 0.08);
    cursor: pointer;
}

.shiroki-tool-icotool .generate-btn {
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

.shiroki-tool-icotool .generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shiroki-tool-icotool .download-area {
    text-align: center;
    padding: 24px;
    background: var(--tk-bg-soft);
    border-radius: 12px;
}

.shiroki-tool-icotool .download-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tk-primary), #2f78ff);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(47, 120, 255, 0.25);
}

/* ============================================
   📱 响应式设计
   ============================================ */

@media (max-width: 768px) {
    .shiroki-tool-page {
        padding: 16px;
    }

    .shiroki-tool-content {
        padding: 16px;
        border-radius: 12px;
    }

    .tk-emoji-lib {
        gap: 16px;
        padding: 12px;
    }

    .tk-emoji-lib__search {
        height: 40px;
        font-size: 14px;
        width: 100%;
    }

    .tk-emoji-lib__toolbar {
        max-width: 100%;
        overflow-x: visible;
    }

    .tk-emoji-lib__tabs {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 0;
    }

    .tk-emoji-lib__tab {
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .tk-emoji-lib__grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
        max-width: 100%;
    }

    .tk-emoji-lib__item {
        padding: 10px 4px;
        min-height: 70px;
        border-radius: 10px;
    }

    .tk-emoji-lib__char {
        font-size: 20px;
    }

    .tk-emoji-lib__name {
        font-size: 10px;
    }

    .shiroki-tool-currency .currency-selectors {
        grid-template-columns: 1fr;
    }

    .shiroki-tool-currency .swap-btn {
        justify-self: center;
    }

    .shiroki-tool-aspectratio .ratio-inputs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .shiroki-tool-aspectratio .ratio-separator {
        display: none;
    }

    .shiroki-tool-aspectratio .calc-inputs {
        grid-template-columns: 1fr;
    }

    .shiroki-tool-kana .kana-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .shiroki-tool-kana .kana-char {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .shiroki-tool-page {
        padding: 8px;
    }

    .shiroki-tool-title {
        font-size: 1.3rem;
    }

    .shiroki-tool-description {
        font-size: 0.85rem;
    }

    .shiroki-tool-content {
        padding: 12px 8px;
        border-radius: 10px;
    }

    .tk-emoji-lib {
        gap: 12px;
        padding: 8px;
    }

    .tk-emoji-lib__search {
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }

    .tk-emoji-lib__tabs {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tk-emoji-lib__tab {
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
        border-radius: 6px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .tk-emoji-lib__grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 6px;
        max-width: 100%;
    }

    .tk-emoji-lib__item {
        padding: 6px 2px;
        min-height: 55px;
        border-radius: 6px;
    }

    .tk-emoji-lib__char {
        font-size: 16px;
    }

    .tk-emoji-lib__name {
        font-size: 9px;
        word-break: break-all;
        text-align: center;
        line-height: 1.2;
    }

    .shiroki-tool-colorwheel input[type="color"] {
        width: 140px;
        height: 140px;
    }
}
