/* 全局样式 */
:root {
    --primary-color: #6a4c93;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --dark-color: #292f36;
    --light-color: #f7f7f7;
    --text-color: #333;
    --text-light: #777;
    --border-color: #e0e0e0;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.section-header p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

section {
    padding: 80px 0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: #5a3d83;
    color: white;
}

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

.btn-secondary:hover {
    background-color: #ff5252;
    color: white;
}

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

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

/* 导航栏 */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-menu {
    display: flex;
}

.main-menu li {
    margin-left: 25px;
}

.main-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-menu a:hover,
.main-menu a.active {
    color: var(--primary-color);
}

.main-menu a.active::after,
.main-menu a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.language-selector {
    position: relative;
    display: inline-block;
}

.language-selector .current-lang {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.language-selector .current-lang i {
    margin-left: 5px;
}

.language-selector .lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: 4px;
    padding: 5px 0;
    min-width: 120px;
    z-index: 1001;
    display: none;
}

.language-selector:hover .lang-dropdown {
    display: block;
}

.language-selector .lang-dropdown a {
    display: block;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.language-selector .lang-dropdown a:hover,
.language-selector .lang-dropdown a.active {
    color: var(--primary-color);
    background-color: var(--light-color);
}

/* 英雄区域 */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

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

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.app-buttons {
    display: flex;
    gap: 15px;
}

/* 特点区域 */
.features {
    background-color: var(--light-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.8rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--text-light);
}

/* 热门发型 */
.hairstyles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.hairstyle-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hairstyle-card:hover {
    transform: translateY(-10px);
}

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

.hairstyle-card h3 {
    padding: 15px 15px 5px;
    color: var(--dark-color);
}

.hairstyle-card p {
    padding: 0 15px 15px;
    color: var(--text-light);
}

.view-more {
    text-align: center;
    margin-top: 40px;
}

/* 用户评价 */
.testimonials {
    background-color: var(--light-color);
}

.testimonials-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.testimonials-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.testimonial {
    flex: 0 0 calc(50% - 15px);
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.rating {
    color: #ffc107;
}

/* 下载区域 */
.download-app {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8a65c5 100%);
    color: white;
}

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

.download-content {
    flex: 1;
    padding-right: 50px;
}

.download-image {
    flex: 1;
    text-align: center;
}

.download-app h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.download-app p {
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.download-app .btn-primary:hover {
    background-color: var(--light-color);
}

.download-app .btn-secondary {
    background-color: transparent;
    border: 2px solid white;
}

.download-app .btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* 博客预览 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: white;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-10px);
}

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

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-block;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* 页脚 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links h4,
.footer-contact h4,
.footer-newsletter h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

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

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
}

.newsletter-form button {
    border-radius: 0 30px 30px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 20px;
}

.footer-bottom-links a:hover {
    color: white;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: white;
}
