/* 首页 index.php 样式 - 小红书封面 */

:root {
    --header-bg: #1A473C;
    --main-bg: #366C63;
    --card-bg: #FFFFFF;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--main-bg);
    margin: 0;
    padding: 0;
}

.page-header {
    background: var(--header-bg);
    color: #fff;
    padding: 2.5rem 1rem 2rem;
    position: relative;
}

.page-header .phase-tag {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 0.02em;
}

.page-header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    color: rgba(255,255,255,0.95);
}

.tools-section {
    padding: 2rem 0 3rem;
}

.tool-card {
    background: var(--card-bg);
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: 0;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    color: inherit;
}

.tool-card .card-top-bar {
    height: 5px;
    width: 100%;
}

.tool-card .card-body {
    padding: 1.25rem 1.25rem 1.5rem;
    position: relative;
}

.tool-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-card .card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.tool-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

.tool-card .card-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

.tool-card .arrow-icon {
    color: #495057;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bar-yellow { background: linear-gradient(90deg, #f0b429, #e8a317); }
.bar-orange { background: linear-gradient(90deg, #e67e22, #d35400); }
.bar-red { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.bar-blue { background: linear-gradient(90deg, #3498db, #2980b9); }
.bar-teal { background: linear-gradient(90deg, #1abc9c, #16a085); }
.bar-dark { background: linear-gradient(90deg, #34495e, #2c3e50); }

.icon-yellow { background: rgba(240,180,41,0.15); color: #c9920f; }
.icon-orange { background: rgba(230,126,34,0.15); color: #b85a0a; }
.icon-red { background: rgba(231,76,60,0.15); color: #a93226; }
.icon-blue { background: rgba(52,152,219,0.15); color: #2471a3; }
.icon-teal { background: rgba(26,188,156,0.15); color: #138d75; }
.icon-dark { background: rgba(52,73,94,0.15); color: #2c3e50; }

.template-previews {
    padding: 2rem 0 2.5rem;
}

.template-previews .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.25rem;
    text-align: center;
}

.template-preview-card {
    display: block;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.template-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: inherit;
}

.template-preview-card .preview-thumb {
    aspect-ratio: 3/4;
    background: #e8eeed;
    position: relative;
    overflow: hidden;
}

.template-preview-card .preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.template-preview-card .preview-label {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
}

.page-footer {
    background: var(--header-bg);
    color: rgba(255,255,255,0.85);
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
}

.page-footer a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
}

.page-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ========== 工具页 inc/header.php 共用样式 ========== */

.tool-page-header {
    background: var(--header-bg);
    color: #fff;
    padding: 1rem 1rem 1.25rem;
    position: relative;
}

.tool-page-header a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.tool-page-header a:hover {
    color: #fff;
}

.tool-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.tool-page-header .subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
    margin-top: 0.25rem;
}

.tool-section {
    padding: 1.5rem 0 2rem;
}

/* 工具页内容区卡片（与首页 .tool-card 区分：首页为 .tools-section 内链接卡片） */
.tool-section .tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--header-bg);
    background: rgba(26,71,60,0.06);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone .icon {
    font-size: 2.5rem;
    color: #64748b;
}

.preview-wrap {
    text-align: center;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 10px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-wrap canvas,
.preview-wrap img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.btn-primary-tool {
    background: var(--header-bg);
    border-color: var(--header-bg);
    color: #fff;
}

.btn-primary-tool:hover {
    background: #234a40;
    border-color: #234a40;
    color: #fff;
}

.form-label {
    font-weight: 500;
    color: #334155;
}

/* 封面模板总页 template.php 分类列表 */
.cover-category-section {
    padding-bottom: 0.5rem;
}
.cover-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--header-bg);
}
.preview-placeholder {
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eeed;
    color: #94a3b8;
    font-size: 2rem;
}
