/* ========================================
   轻量化工具分享站 - 前端样式
   风格：明亮温暖 · 珊瑚橙渐变 · 柔和卡片
   与后台暗色风格完全不同
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}

body{
    font-family:'Nunito',-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    font-size:15px;line-height:1.7;color:#3d2c2e;
    background:linear-gradient(135deg,#fff5f0 0%,#fff0e8 30%,#ffe8e0 60%,#fde8f0 100%);
    background-attachment:fixed;
    min-height:100vh;
    -webkit-font-smoothing:antialiased;
}

/* 背景装饰气泡 */
body::before,body::after{
    content:'';position:fixed;border-radius:50%;z-index:0;pointer-events:none;
}
body::before{
    top:-100px;right:-100px;width:400px;height:400px;
    background:radial-gradient(circle,rgba(255,138,101,0.15) 0%,transparent 70%);
    animation:floatBubble 15s ease-in-out infinite;
}
body::after{
    bottom:-150px;left:-150px;width:500px;height:500px;
    background:radial-gradient(circle,rgba(255,183,213,0.15) 0%,transparent 70%);
    animation:floatBubble 20s ease-in-out infinite reverse;
}
@keyframes floatBubble{
    0%,100%{transform:translate(0,0) scale(1)}
    50%{transform:translate(40px,30px) scale(1.1)}
}

a{color:#ff6b6b;text-decoration:none;transition:all .2s}
a:hover{color:#ee5a52}
img{max-width:100%;display:block}
ul,ol{list-style:none}

.container{max-width:1140px;margin:0 auto;padding:0 20px;position:relative;z-index:1}

/* ===== 导航栏 ===== */
.site-header{
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
    border-bottom:1px solid rgba(255,224,210,0.5);
    position:sticky;top:0;z-index:1000;
    box-shadow:0 2px 20px rgba(255,138,101,0.08);
}
.site-header .container{display:flex;align-items:center;justify-content:space-between;height:68px}

.logo{
    font-size:22px;font-weight:900;
    background:linear-gradient(135deg,#ff6b6b,#ee5a52,#ff8a65);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;
    display:flex;align-items:center;gap:8px;
}
.logo:hover{text-decoration:none;opacity:.85}

.nav{display:flex;gap:8px;align-items:center}
.nav a{
    color:#8b6f72;font-weight:600;font-size:15px;
    padding:8px 18px;border-radius:20px;transition:all .25s;
}
.nav a:hover,.nav a.active{
    background:linear-gradient(135deg,#ff6b6b,#ff8a65);
    color:#fff !important;text-decoration:none;
    box-shadow:0 4px 14px rgba(255,107,107,0.3);
}

/* ===== 公告栏 ===== */
.announcement{
    background:linear-gradient(90deg,#fff3e0,#ffe8e0);
    border-bottom:1px solid rgba(255,183,77,0.2);
    font-size:14px;padding:10px 0;
}
.announcement .container{display:flex;align-items:center;gap:10px}
.announcement-label{
    background:linear-gradient(135deg,#ffa726,#ff8a65);
    color:#fff;font-weight:700;font-size:12px;
    padding:3px 12px;border-radius:20px;flex-shrink:0;
}
#site-announcement{color:#8d6e63;font-weight:500}

/* ===== Hero 横幅 ===== */
.hero-banner{
    background:linear-gradient(135deg,#ff6b6b 0%,#ff8a65 40%,#ffa726 100%);
    padding:60px 0 50px;position:relative;overflow:hidden;
}
.hero-banner::before{
    content:'';position:absolute;top:-50%;right:-10%;
    width:400px;height:400px;border-radius:50%;
    background:rgba(255,255,255,0.1);
}
.hero-banner::after{
    content:'';position:absolute;bottom:-30%;left:-5%;
    width:300px;height:300px;border-radius:50%;
    background:rgba(255,255,255,0.08);
}
.hero-content{
    position:relative;z-index:1;text-align:center;
    max-width:640px;margin:0 auto;
}
.hero-title{
    font-size:44px;font-weight:900;color:#fff;
    line-height:1.2;margin-bottom:14px;
    letter-spacing:-1px;
}
.gradient-text{
    background:linear-gradient(135deg,#fff,#fff5f0);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;
}
.hero-subtitle{
    font-size:17px;color:rgba(255,255,255,0.9);
    margin-bottom:28px;font-weight:600;
}
.hero-search{
    display:flex;gap:8px;max-width:520px;margin:0 auto 20px;
    background:rgba(255,255,255,0.25);
    backdrop-filter:blur(10px);
    border-radius:16px;padding:6px;
}
.hero-search input{
    flex:1;padding:14px 20px;border:none;
    background:rgba(255,255,255,0.9);
    border-radius:12px;font-size:16px;outline:none;
    color:#3d2c2e;font-family:inherit;
}
.hero-search input::placeholder{color:#c4a8a8}
.hero-search button{
    padding:14px 28px;
    background:#fff;color:#ff6b6b;
    border:none;border-radius:12px;
    font-size:15px;font-weight:800;cursor:pointer;
    transition:all .25s;font-family:inherit;
    box-shadow:0 4px 14px rgba(0,0,0,0.1);
}
.hero-search button:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 24px rgba(0,0,0,0.15);
}
.hero-tags{
    display:flex;justify-content:center;gap:10px;flex-wrap:wrap;
}
.hero-tag{
    padding:6px 16px;
    background:rgba(255,255,255,0.2);
    backdrop-filter:blur(10px);
    border:1px solid rgba(255,255,255,0.3);
    border-radius:20px;
    font-size:13px;font-weight:600;color:#fff;
}

/* ===== 主布局 ===== */
.main-layout{
    display:grid;grid-template-columns:1fr 300px;gap:24px;
    padding-top:28px;padding-bottom:48px;
}
.content-main{min-width:0}

/* ===== 搜索栏 ===== */
.search-bar{
    display:flex;gap:10px;margin-bottom:28px;
    background:rgba(255,255,255,0.7);
    backdrop-filter:blur(10px);
    border:1px solid rgba(255,224,210,0.6);
    border-radius:16px;padding:6px;
    box-shadow:0 4px 24px rgba(255,138,101,0.08);
}
.search-bar input{
    flex:1;padding:12px 18px;border:none;
    background:transparent;font-size:15px;outline:none;
    color:#3d2c2e;font-family:inherit;
}
.search-bar input::placeholder{color:#c4a8a8}
.search-bar button{
    padding:12px 28px;
    background:linear-gradient(135deg,#ff6b6b,#ff8a65);
    color:#fff;border:none;border-radius:12px;
    font-size:15px;font-weight:700;cursor:pointer;
    transition:all .25s;font-family:inherit;
    box-shadow:0 4px 14px rgba(255,107,107,0.3);
}
.search-bar button:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 24px rgba(255,107,107,0.4);
}
.search-bar button:active{transform:translateY(0)}

/* ===== 广告位 ===== */
.ad-slot{
    background:rgba(255,255,255,0.5);
    border:2px dashed rgba(255,183,77,0.3);
    border-radius:16px;padding:20px;margin-bottom:24px;
    text-align:center;min-height:80px;
    display:flex;align-items:center;justify-content:center;
    transition:all .2s;
}
.ad-slot:hover{border-color:rgba(255,138,101,0.4);background:rgba(255,255,255,0.6)}
.ad-placeholder{
    color:#d4a574;font-size:13px;font-weight:600;
    text-transform:uppercase;letter-spacing:1px;
}
.ad-sidebar{padding:14px;min-height:120px}
.ad-top{min-height:70px}
.ad-bottom{min-height:70px}
.ad-in-content{margin:20px 0}

/* ===== 标题 ===== */
.section-title{
    font-size:22px;font-weight:900;color:#3d2c2e;
    margin-bottom:18px;display:flex;align-items:center;gap:10px;
}
.section-title::before{
    content:'';width:6px;height:26px;
    background:linear-gradient(to bottom,#ff6b6b,#ff8a65);
    border-radius:3px;
}

/* ===== 分类标签 ===== */
.categories{margin-bottom:28px}
.category-list{display:flex;flex-wrap:wrap;gap:10px}
.category-item{
    padding:8px 18px;
    background:rgba(255,255,255,0.8);
    border:2px solid rgba(255,224,210,0.5);
    border-radius:24px;font-size:14px;font-weight:600;
    cursor:pointer;transition:all .25s;color:#8b6f72;
    user-select:none;
}
.category-item:hover{
    border-color:#ff6b6b;color:#ff6b6b;
    transform:translateY(-2px);
    box-shadow:0 4px 14px rgba(255,107,107,0.15);
}
.category-item.active{
    background:linear-gradient(135deg,#ff6b6b,#ff8a65);
    border-color:transparent;color:#fff;
    box-shadow:0 4px 14px rgba(255,107,107,0.35);
}

/* ===== 工具网格 ===== */
.tools-section{margin-bottom:24px}
.tool-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
    gap:18px;
}

.tool-card{
    background:rgba(255,255,255,0.85);
    border:1px solid rgba(255,224,210,0.4);
    border-radius:20px;padding:22px;
    transition:all .3s cubic-bezier(0.4,0,0.2,1);
    cursor:pointer;text-decoration:none;color:inherit;
    display:flex;flex-direction:column;position:relative;overflow:hidden;
    box-shadow:0 2px 12px rgba(255,138,101,0.06);
}
.tool-card::before{
    content:'';position:absolute;top:0;left:0;width:100%;height:4px;
    background:linear-gradient(90deg,#ff6b6b,#ff8a65,#ffb74d);
    transform:scaleX(0);transform-origin:left;transition:transform .3s;
}
.tool-card:hover{
    border-color:rgba(255,107,107,0.3);
    box-shadow:0 12px 40px rgba(255,138,101,0.15);
    transform:translateY(-6px);text-decoration:none;
}
.tool-card:hover::before{transform:scaleX(1)}

.tool-card .tool-icon{
    font-size:36px;margin-bottom:12px;
    width:64px;height:64px;
    background:linear-gradient(135deg,#fff5f0,#ffe8e0);
    border-radius:16px;
    display:flex;align-items:center;justify-content:center;
    transition:transform .3s;
}
.tool-card:hover .tool-icon{transform:scale(1.1) rotate(-5deg)}

.tool-card .tool-name{
    font-size:16px;font-weight:800;color:#3d2c2e;
    margin-bottom:6px;
}
.tool-card .tool-desc{
    font-size:13px;color:#8b6f72;line-height:1.6;flex:1;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden;
}
.tool-card .tool-stats{
    display:flex;gap:14px;margin-top:14px;font-size:12px;color:#c4a8a8;
    padding-top:12px;border-top:1px dashed rgba(255,224,210,0.5);
    font-weight:600;
}
.tool-card .tool-stats span{display:flex;align-items:center;gap:4px}

/* ===== 侧边栏 ===== */
.sidebar{display:flex;flex-direction:column;gap:18px}
.widget{
    background:rgba(255,255,255,0.8);
    border:1px solid rgba(255,224,210,0.3);
    border-radius:20px;padding:20px;
    box-shadow:0 2px 12px rgba(255,138,101,0.06);
    transition:all .3s;
}
.widget:hover{box-shadow:0 8px 28px rgba(255,138,101,0.1)}
.widget h3{
    font-size:16px;font-weight:800;margin-bottom:14px;
    color:#3d2c2e;display:flex;align-items:center;gap:8px;
}
.stat-row{
    display:flex;justify-content:space-between;align-items:center;
    padding:8px 0;font-size:14px;color:#8b6f72;
    border-bottom:1px dashed rgba(255,224,210,0.3);
}
.stat-row:last-child{border-bottom:none}
.stat-row span:last-child{
    font-weight:800;font-size:16px;
    background:linear-gradient(135deg,#ff6b6b,#ff8a65);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;
}

.hot-list .hot-item{
    display:flex;align-items:center;
    padding:10px 0;border-bottom:1px dashed rgba(255,224,210,0.3);
    font-size:14px;transition:all .2s;
}
.hot-list .hot-item:last-child{border-bottom:none}
.hot-list .hot-item:hover{padding-left:6px}
.hot-rank{
    display:inline-flex;align-items:center;justify-content:center;
    width:24px;height:24px;border-radius:8px;
    font-size:12px;font-weight:800;color:#fff;
    margin-right:10px;flex-shrink:0;
    background:#e0e0e0;
}
.hot-rank.top1{background:linear-gradient(135deg,#ff6b6b,#ee5a52)}
.hot-rank.top2{background:linear-gradient(135deg,#ffa726,#ff8a65)}
.hot-rank.top3{background:linear-gradient(135deg,#66bb6a,#42a5f5)}
.hot-name{flex:1;color:#3d2c2e;font-weight:600}
.hot-stats{color:#c4a8a8;font-weight:700;font-size:13px}

/* ===== 页脚 ===== */
.site-footer{
    background:rgba(255,255,255,0.6);
    backdrop-filter:blur(10px);
    border-top:1px solid rgba(255,224,210,0.3);
    padding:28px 0;text-align:center;
}
.site-footer p{color:#8b6f72;font-size:14px;margin-bottom:6px}
.footer-links a{color:#ff6b6b;font-weight:600;margin:0 6px}

/* ===== 加载 ===== */
.loading{
    text-align:center;color:#c4a8a8;padding:60px 20px;
    font-size:15px;font-weight:600;
}
.loading::before{
    content:'⏳';display:block;font-size:40px;margin-bottom:12px;
    animation:spin 2s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== 工具详情页 ===== */
.tool-detail{
    background:rgba(255,255,255,0.8);
    border:1px solid rgba(255,224,210,0.3);
    border-radius:24px;padding:32px;
    box-shadow:0 4px 24px rgba(255,138,101,0.08);
    margin-bottom:24px;
}
.tool-detail .tool-header{display:flex;gap:20px;margin-bottom:20px}
.tool-detail .tool-header .tool-icon{
    font-size:56px;width:96px;height:96px;
    background:linear-gradient(135deg,#fff5f0,#ffe8e0);
    border-radius:24px;
    display:flex;align-items:center;justify-content:center;flex-shrink:0;
    box-shadow:0 4px 16px rgba(255,138,101,0.1);
}
.tool-detail .tool-info h1{
    font-size:26px;font-weight:900;color:#3d2c2e;margin-bottom:8px;
}
.tool-detail .tool-meta{
    font-size:14px;color:#8b6f72;display:flex;flex-wrap:wrap;gap:8px;
}
.tool-detail .tool-meta span{display:flex;align-items:center;gap:4px}
.tool-detail .tool-meta span::after{
    content:'·';margin-left:8px;color:#c4a8a8;
}
.tool-detail .tool-meta span:last-child::after{display:none}

.tool-detail .tool-description{
    background:rgba(255,245,240,0.6);
    border:1px solid rgba(255,224,210,0.3);
    border-radius:16px;padding:24px;
    margin-bottom:20px;line-height:1.8;color:#5d4037;
    font-size:15px;
}

.tool-detail .tool-actions{display:flex;gap:12px;margin-bottom:20px}

.btn{
    display:inline-flex;align-items:center;gap:8px;
    padding:12px 28px;border-radius:14px;
    font-size:15px;font-weight:700;font-family:inherit;
    border:2px solid rgba(255,224,210,0.5);
    background:rgba(255,255,255,0.8);color:#5d4037;
    cursor:pointer;transition:all .25s;text-decoration:none;
}
.btn:hover{
    border-color:#ff6b6b;color:#ff6b6b;text-decoration:none;
    transform:translateY(-2px);box-shadow:0 6px 20px rgba(255,107,107,0.15);
}
.btn-primary{
    background:linear-gradient(135deg,#ff6b6b,#ff8a65);
    color:#fff !important;border:none;
    box-shadow:0 4px 16px rgba(255,107,107,0.3);
}
.btn-primary:hover{
    background:linear-gradient(135deg,#ee5a52,#ff6b6b);
    transform:translateY(-2px);
    box-shadow:0 8px 28px rgba(255,107,107,0.4);
    color:#fff !important;
}

/* 相关工具 */
.related-tools{margin-top:8px}

/* ===== 错误页 ===== */
.error-page{
    min-height:100vh;display:flex;flex-direction:column;align-items:center;
    justify-content:center;text-align:center;padding:40px;
    position:relative;z-index:1;
}
.error-code{
    font-size:128px;font-weight:900;line-height:1;
    background:linear-gradient(135deg,#ff6b6b,#ff8a65,#ffa726);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;
    margin-bottom:8px;
    animation:bounceIn 0.6s ease-out;
}
@keyframes bounceIn{
    0%{opacity:0;transform:scale(0.3)}
    50%{transform:scale(1.1)}
    100%{opacity:1;transform:scale(1)}
}
.error-icon{font-size:64px;margin-bottom:16px;animation:bounceIn 0.6s ease-out 0.2s backwards}
.error-title{
    font-size:28px;font-weight:800;color:#3d2c2e;
    margin-bottom:10px;
}
.error-desc{color:#8b6f72;font-size:16px;margin-bottom:28px}
.error-actions{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}

/* ===== 响应式 ===== */
@media(max-width:900px){
    .main-layout{grid-template-columns:1fr}
    .sidebar{order:-1;display:grid;grid-template-columns:1fr 1fr;gap:14px}
    .sidebar .ad-slot{grid-column:1/-1}
}
@media(max-width:600px){
    .container{padding:0 14px}
    .site-header .container{height:56px}
    .logo{font-size:18px}
    .nav a{padding:6px 12px;font-size:14px}
    .announcement .container{font-size:13px}
    .main-layout{padding-top:20px;padding-bottom:32px;gap:18px}
    .sidebar{grid-template-columns:1fr;order:0}
    .tool-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
    .tool-card{padding:16px}
    .tool-card .tool-icon{font-size:28px;width:52px;height:52px}
    .tool-card .tool-name{font-size:14px}
    .tool-detail{padding:20px}
    .tool-detail .tool-header{flex-direction:column;gap:14px}
    .tool-detail .tool-header .tool-icon{width:72px;height:72px;font-size:40px}
    .tool-detail .tool-info h1{font-size:20px}
    .search-bar{flex-direction:column;padding:10px}
    .search-bar button{width:100%}
    .error-code{font-size:80px}
    .error-title{font-size:22px}
}
