/* ===== 全局重置 & 变量 ===== */
:root {
    --primary: #f97316;
    --primary-dark: #d97706;
    --primary-light: #fb923c;
    --secondary: #1e293b;
    --secondary-light: #334155;
    --accent: #f59e0b;
    --bg: #fefce8;
    --bg-light: #fff7ed;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-sm);
}

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

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 15px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(249, 115, 22, 0.5);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-lg {
    padding: 14px 36px;
    font-size: 17px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    padding: 12px 0;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary);
    color: white;
}

.join-btn {
    padding: 8px 22px !important;
    font-size: 14px !important;
}

.hamburger {
    display: none;
    font-size: 26px;
    color: var(--text);
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #f97316 100%);
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-light);
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 16px !important;
    opacity: 0.7 !important;
    margin-bottom: 30px !important;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== Section 通用 ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 4px;
}

.section-header p {
    color: var(--text-light);
    font-size: 17px;
}

/* ===== 品牌故事 ===== */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--secondary);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.about-features span {
    background: var(--bg);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.about-features i {
    color: var(--primary);
}

/* ===== 加盟优势 ===== */
.advantages {
    background: var(--bg-light);
}

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

.advantage-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.advantage-card .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

.advantage-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--secondary);
}

.advantage-card p {
    color: var(--text-light);
    font-size: 15px;
}

/* ===== 加盟流程 ===== */
.franchise-process {
    background: var(--white);
}

.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.step {
    background: var(--bg-light);
    padding: 32px 28px;
    border-radius: var(--radius);
    text-align: center;
    flex: 1;
    min-width: 160px;
    max-width: 220px;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.step-num {
    display: inline-block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 8px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--secondary);
}

.step p {
    font-size: 14px;
    color: var(--text-light);
}

.step-arrow {
    font-size: 24px;
    color: var(--primary);
    padding: 0 12px;
    opacity: 0.5;
}

/* ===== 门店展示 ===== */
.stores {
    background: var(--bg-light);
}

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

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

.store-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.store-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.store-card .store-info {
    padding: 20px;
}

.store-card .store-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--secondary);
}

.store-card .store-info p {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-card .store-info i {
    color: var(--primary);
    width: 16px;
}

/* ===== 新闻动态 ===== */
.news {
    background: var(--white);
}

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

.news-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card .news-body {
    padding: 20px;
}

.news-card .news-body .date {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.news-card .news-body h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: var(--secondary);
    line-height: 1.4;
}

.news-card .news-body p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 联系我们 ===== */
.contact {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info .info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.contact-info .info-item i {
    font-size: 24px;
    color: var(--primary);
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.contact-info .info-item h4 {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.contact-info .info-item p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-form {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form .form-group {
    margin-bottom: 18px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    transition: var(--transition);
    background: var(--bg);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249,115,22,0.1);
}

.contact-form .full {
    grid-column: 1 / -1;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: white;
}

.footer-brand h3 i {
    color: var(--primary);
}

.footer-brand p {
    font-size: 14px;
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 38px;
    margin-right: 10px;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-links h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-links a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 6px;
}

.footer-contact h4 {
    color: white;
    margin-bottom: 16px;
}

.footer-contact p {
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

.footer-bottom a {
    color: var(--primary-light);
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249,115,22,0.4);
    transition: var(--transition);
    display: none;
    z-index: 999;
}

.back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(249,115,22,0.5);
}

/* ===== 后台管理样式 ===== */
.admin-body {
    background: #f1f5f9;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #334155);
}

.login-card {
    background: white;
    padding: 48px 40px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 400px;
    max-width: 90vw;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 48px;
    color: var(--primary);
}

.login-logo h2 {
    margin-top: 12px;
    font-size: 22px;
    color: var(--secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249,115,22,0.1);
    outline: none;
}

.form-error {
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 12px;
    display: none;
}

/* 后台仪表盘 */
.admin-header {
    background: var(--secondary);
    color: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-logo i {
    color: var(--primary);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 20px 0;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    padding: 14px 24px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    border-left: 3px solid transparent;
}

.admin-sidebar li:hover {
    background: var(--bg-light);
    color: var(--text);
}

.admin-sidebar li.active {
    background: var(--bg-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.admin-main {
    flex: 1;
    padding: 30px;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tab-header h2 {
    font-size: 24px;
    color: var(--secondary);
}

/* 表格 */
.table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th {
    background: var(--secondary);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.admin-table tr:hover td {
    background: var(--bg-light);
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.admin-table .actions button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2000;
}

.modal.active {
    display: block;
}

.modal-close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal h3 {
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--secondary);
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.modal input,
.modal textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.modal input:focus,
.modal textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.modal-overlay.active {
    display: block;
}

.settings-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    line-height: 2;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stores-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .navbar .nav-links.open {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .join-btn {
        display: none;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .hero-stats {
        gap: 30px;
    }
    .stat-num {
        font-size: 32px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .process-steps {
        flex-direction: column;
        gap: 20px;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
    .stores-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .section {
        padding: 60px 0;
    }
    .section-header h2 {
        font-size: 28px;
    }

    .admin-container {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .admin-sidebar ul {
        display: flex;
        gap: 4px;
    }
    .admin-sidebar li {
        flex: 1;
        justify-content: center;
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-content h1 {
        font-size: 26px;
    }
    .hero-buttons .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }
    .login-card {
        padding: 32px 24px;
    }
}