/*
Theme Name: APPBS 在线工具
Theme URI: https://appbs.cn
Description: 仿sc.appbs.cn的在线图片生成工具WordPress主题，支持后端管理所有工具和轮播图
Version: 1.0.0
Author: APPBS
Author URI: https://appbs.cn
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: appbs
Tags: one-column, custom-menu, custom-logo, theme-options
*/

/* ==================== CSS Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== Header ==================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
}

.site-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), #9b59b6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.site-description {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ==================== Hero Banner / Carousel ==================== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--dark-color);
}

.hero-slider {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.hero-slide .slide-text {
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    color: var(--white);
    font-size: 20px;
    font-weight: 500;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-dots {
    position: absolute;
    bottom: 15px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dots .dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: var(--transition);
    opacity: 0;
}

.hero-banner:hover .hero-nav {
    opacity: 1;
}

.hero-nav:hover {
    background: rgba(255,255,255,0.6);
}

.hero-nav.prev { left: 15px; }
.hero-nav.next { right: 15px; }

/* ==================== Tool Grid ==================== */
.tools-section {
    padding: 30px 0;
}

.tools-section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 25px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.tool-card-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 48px;
}

.tool-card-icon svg {
    width: 56px;
    height: 56px;
    fill: var(--white);
}

.tool-card-name {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    background: var(--white);
}

/* Tool card color variations */
.tool-card-icon.color-blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.tool-card-icon.color-green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.tool-card-icon.color-purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.tool-card-icon.color-orange { background: linear-gradient(135deg, #e67e22, #d35400); }
.tool-card-icon.color-red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.tool-card-icon.color-yellow { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.tool-card-icon.color-teal { background: linear-gradient(135deg, #1abc9c, #16a085); }
.tool-card-icon.color-pink { background: linear-gradient(135deg, #e91e63, #c2185b); }
.tool-card-icon.color-indigo { background: linear-gradient(135deg, #5d6d7e, #4a5568); }
.tool-card-icon.color-lime { background: linear-gradient(135deg, #7ed321, #6ab04c); }

/* ==================== Footer ==================== */
.site-footer {
    background: var(--dark-color);
    color: rgba(255,255,255,0.7);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    margin-top: 30px;
}

.site-footer a {
    color: rgba(255,255,255,0.9);
}

.site-footer a:hover {
    color: var(--white);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==================== Tool Page (Single Tool) ==================== */
.tool-page {
    padding: 20px 0;
}

.tool-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tool-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
}

.tool-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.tool-page-back:hover {
    background: #27ae60;
}

.tool-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.tool-settings {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.tool-preview {
    width: 375px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

/* Phone Mockup */
.phone-mockup {
    width: 375px;
    background: #000;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.phone-screen {
    background: #ededed;
    min-height: 667px;
    position: relative;
    overflow: hidden;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.settings-tab {
    padding: 10px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.settings-tab:hover {
    color: var(--primary-color);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
    background: var(--white);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* Slider */
.range-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-slider input[type="range"] {
    flex: 1;
    accent-color: var(--primary-color);
}

.range-slider .range-value {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.range-slider .range-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.range-slider .range-btn:hover {
    background: var(--light-bg);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: rgba(52,152,219,0.03);
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload .upload-icon {
    font-size: 36px;
    color: var(--border-color);
    margin-bottom: 8px;
}

.file-upload .upload-text {
    font-size: 13px;
    color: var(--text-light);
}

.file-upload .upload-hint {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
}

/* Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* ==================== WeChat Chat Preview Styles ==================== */
.wx-status-bar {
    background: #000;
    color: #fff;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    height: 30px;
}

.wx-status-bar .status-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wx-status-bar .status-center {
    font-weight: 600;
}

.wx-status-bar .status-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wx-nav-bar {
    background: #ededed;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d9d9d9;
}

.wx-nav-bar .nav-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.wx-nav-bar .nav-back {
    font-size: 20px;
    color: #000;
    cursor: pointer;
}

.wx-chat-area {
    padding: 15px;
    min-height: 500px;
    background: #ededed;
}

.wx-time-divider {
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
    color: #999;
}

.wx-message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
    gap: 10px;
}

.wx-message.sent {
    flex-direction: row-reverse;
}

.wx-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #ccc;
    flex-shrink: 0;
    overflow: hidden;
}

.wx-message .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wx-message .bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    word-break: break-all;
}

.wx-message.received .bubble {
    background: #fff;
    color: #000;
}

.wx-message.sent .bubble {
    background: #95EC69;
    color: #000;
}

.wx-message .bubble.transfer-bubble {
    background: #FA9D3B;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    min-width: 200px;
}

.wx-message .bubble.transfer-bubble .transfer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.wx-message .bubble.transfer-bubble .transfer-amount {
    font-size: 22px;
    font-weight: 700;
}

.wx-message .bubble.transfer-bubble .transfer-desc {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.wx-input-bar {
    background: #f7f7f7;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #d9d9d9;
}

.wx-input-bar .voice-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 22px;
    color: #000;
    cursor: pointer;
}

.wx-input-bar .input-field {
    flex: 1;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 14px;
}

.wx-input-bar .emoji-btn,
.wx-input-bar .plus-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 22px;
    color: #000;
    cursor: pointer;
}

/* ==================== Alipay Transfer Preview ==================== */
.alipay-status-bar {
    background: #1677FF;
    color: #fff;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    height: 30px;
}

.alipay-transfer-card {
    background: #fff;
    margin: 60px 20px;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.alipay-transfer-card .transfer-header {
    text-align: center;
    margin-bottom: 20px;
}

.alipay-transfer-card .transfer-header .amount {
    font-size: 36px;
    font-weight: 700;
    color: #000;
}

.alipay-transfer-card .transfer-header .label {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

.alipay-transfer-card .transfer-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.alipay-transfer-card .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.alipay-transfer-card .info-row .info-label {
    color: #999;
}

.alipay-transfer-card .info-row .info-value {
    color: #333;
    font-weight: 500;
}

.alipay-transfer-card .transfer-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1677FF;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
}

/* ==================== WeChat Transfer Preview ==================== */
.wx-transfer-page {
    background: #ededed;
    min-height: 667px;
}

.wx-transfer-header {
    background: #ededed;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d9d9d9;
}

.wx-transfer-header .back-arrow {
    font-size: 20px;
    margin-right: 10px;
}

.wx-transfer-header .title {
    font-size: 17px;
    font-weight: 600;
}

.wx-transfer-content {
    background: #fff;
    margin: 30px 15px;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
}

.wx-transfer-content .transfer-amount {
    font-size: 42px;
    font-weight: 700;
    color: #000;
    margin: 15px 0;
}

.wx-transfer-content .transfer-label {
    font-size: 14px;
    color: #999;
}

.wx-transfer-content .transfer-message {
    font-size: 15px;
    color: #333;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.wx-transfer-content .transfer-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 25px;
    cursor: pointer;
}

/* ==================== WeChat Red Packet Preview ==================== */
.wx-redpacket-page {
    background: #C83732;
    min-height: 667px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
}

.wx-redpacket-page .rp-opening {
    background: #FA9D3B;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.wx-redpacket-page .rp-sender {
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.wx-redpacket-page .rp-wish {
    font-size: 22px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    text-align: center;
    padding: 0 40px;
}

.wx-redpacket-page .rp-amount {
    text-align: center;
    color: #fff;
}

.wx-redpacket-page .rp-amount .amount-value {
    font-size: 52px;
    font-weight: 700;
}

.wx-redpacket-page .rp-amount .amount-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ==================== WeChat Moments Preview ==================== */
.wx-moments-page {
    background: #fff;
    min-height: 667px;
}

.wx-moments-header {
    background: #ededed;
    padding: 12px 15px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    border-bottom: 1px solid #d9d9d9;
}

.wx-moments-cover {
    height: 280px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
}

.wx-moments-cover .user-info {
    position: absolute;
    bottom: -30px;
    right: 15px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.wx-moments-cover .user-name {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.wx-moments-cover .user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    border: 3px solid #fff;
    overflow: hidden;
    background: #ccc;
}

.wx-moments-post {
    padding: 15px;
    border-bottom: 8px solid #f0f0f0;
}

.wx-moments-post .post-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.wx-moments-post .post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: #ccc;
    flex-shrink: 0;
}

.wx-moments-post .post-name {
    font-size: 15px;
    font-weight: 600;
    color: #576B95;
    margin-bottom: 4px;
}

.wx-moments-post .post-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}

.wx-moments-post .post-images {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.wx-moments-post .post-images.cols-1 { grid-template-columns: 1fr; max-width: 200px; }
.wx-moments-post .post-images.cols-2 { grid-template-columns: 1fr 1fr; max-width: 280px; }
.wx-moments-post .post-images.cols-3 { grid-template-columns: 1fr 1fr 1fr; max-width: 300px; }

.wx-moments-post .post-images .post-img {
    aspect-ratio: 1;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.wx-moments-post .post-time {
    font-size: 12px;
    color: #999;
}

/* ==================== WeChat Profile Preview ==================== */
.wx-profile-page {
    background: #fff;
    min-height: 667px;
}

.wx-profile-header {
    background: #ededed;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d9d9d9;
}

.wx-profile-banner {
    height: 250px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    position: relative;
}

.wx-profile-banner .profile-avatar {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 3px solid #fff;
    overflow: hidden;
    background: #ccc;
}

.wx-profile-info {
    text-align: center;
    padding: 50px 20px 20px;
}

.wx-profile-info .profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 5px;
}

.wx-profile-info .profile-wxid {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.wx-profile-info .profile-region {
    font-size: 13px;
    color: #999;
}

.wx-profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin: 15px;
    background: #fff;
    border-radius: 8px;
}

.wx-profile-stats .stat-item {
    text-align: center;
}

.wx-profile-stats .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.wx-profile-stats .stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* ==================== Admin Styles ==================== */
.appbs-metabox .form-group {
    margin-bottom: 15px;
}

.appbs-metabox .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.appbs-metabox .form-group input,
.appbs-metabox .form-group select,
.appbs-metabox .form-group textarea {
    width: 100%;
    padding: 8px 10px;
}

.appbs-color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.appbs-color-picker input[type="color"] {
    width: 50px;
    height: 35px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.appbs-icon-select {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.appbs-icon-select .icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.appbs-icon-select .icon-option:hover {
    background: #f0f0f0;
}

.appbs-icon-select .icon-option.selected {
    border-color: var(--primary-color);
    background: rgba(52,152,219,0.1);
}

/* ==================== Responsive ==================== */
@media (max-width: 992px) {
    .tool-layout {
        flex-direction: column;
    }

    .tool-preview {
        width: 100%;
        max-width: 375px;
        position: static;
    }

    .phone-mockup {
        width: 100%;
        max-width: 375px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 200px;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .tool-card-icon {
        height: 90px;
        font-size: 36px;
    }

    .tool-card-name {
        padding: 8px;
        font-size: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .tool-settings {
        padding: 15px;
    }

    .settings-tabs {
        overflow-x: auto;
    }

    .settings-tab {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tool-card-icon {
        height: 75px;
        font-size: 30px;
    }

    .tool-card-icon svg {
        width: 36px;
        height: 36px;
    }

    .tool-card-name {
        padding: 6px 4px;
        font-size: 11px;
    }

    .hero-banner {
        height: 160px;
    }

    .hero-slide .slide-text {
        font-size: 16px;
        left: 15px;
        right: 15px;
    }
}

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

.tool-card {
    animation: fadeIn 0.4s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-card:nth-child(8) { animation-delay: 0.4s; }
.tool-card:nth-child(9) { animation-delay: 0.45s; }
.tool-card:nth-child(10) { animation-delay: 0.5s; }
.tool-card:nth-child(11) { animation-delay: 0.55s; }
.tool-card:nth-child(12) { animation-delay: 0.6s; }
.tool-card:nth-child(13) { animation-delay: 0.65s; }
.tool-card:nth-child(14) { animation-delay: 0.7s; }
.tool-card:nth-child(15) { animation-delay: 0.75s; }
.tool-card:nth-child(16) { animation-delay: 0.8s; }
.tool-card:nth-child(17) { animation-delay: 0.85s; }
.tool-card:nth-child(18) { animation-delay: 0.9s; }

/* ==================== 404 Page ==================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.error-404 p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* ==================== Loading ==================== */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

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