:root {
    --primary-color: #3498db;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 16px rgba(0,0,0,0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-color);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 80px;
}

.header {
    padding: 25px 20px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.header-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 25px;
    flex: 1;
    align-content: start;
}

@media (min-width: 450px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

.grid-item {
    background: var(--card-bg);
    border-radius: 16px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    overflow: hidden;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.5);
}

.grid-item:active {
    transform: scale(0.96);
}

.grid-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.icon-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 图标样式增强 */
.grid-icon {
    font-size: 2.8rem; /* 增大图标 */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.grid-icon-img {
    width: 64px; /* 增大图片 */
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
}

.grid-text {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin-top: 5px;
    color: #444;
}

.footer {
    padding: 25px;
    text-align: center;
    margin-top: auto;
    background-color: transparent;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    background-color: #ffffff;
    color: #555;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.admin-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    color: var(--primary-color);
}

/* 后台样式优化 */
.admin-toolbar {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Toast 提示样式 */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 24px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: filter 0.2s;
}

.btn:active {
    filter: brightness(0.9);
}

.btn-primary { background-color: var(--primary-color); color: white; box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3); }
.btn-success { background-color: #2ecc71; color: white; box-shadow: 0 2px 6px rgba(46, 204, 113, 0.3); }
.btn-danger { background-color: #ff6b6b; color: white; }
.btn-secondary { background-color: #95a5a6; color: white; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.card-list {
    padding: 10px 20px 100px 20px;
}

.config-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
    border: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.card-title {
    font-weight: 700;
    color: #444;
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background-color: #fcfcfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
}

.icon-type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    color: #555;
}

/* 折叠面板样式 */
.accordion-header {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    transition: background 0.2s;
}

.accordion-header:hover {
    background-color: #f1f3f5;
}

.accordion-content {
    display: none;
    padding: 15px;
    border: 1px solid #eee;
    border-top: none;
    background-color: white;
    border-radius: 0 0 8px 8px;
    margin-top: -2px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.icon-option {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    color: #666;
    transition: all 0.2s;
}

.icon-option:hover {
    background-color: #f0f2f5;
}

.icon-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.preview-img {
    max-width: 80px;
    max-height: 80px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between; /* 改为两端对齐或根据内容调整 */
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.bottom-bar .btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
}
