/* 基础样式 */
:root {
    /* 韩风配色方案 */
    --primary-color: #FF8FA3;
    --primary-light: #FFD6E0;
    --secondary-color: #B6E3E9;
    --secondary-light: #D6F5F9;
    --accent-color: #FFDDAA;
    --background-color: #F8F9FA;
    --text-color: #495057;
    --text-light: #868E96;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.highlight {
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: var(--primary-light);
    z-index: -1;
    border-radius: 4px;
}

/* 头部样式 */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo h1 span {
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-left: 5px;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn-login,
.btn-signup {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-signup {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--white);
}

.btn-login:hover {
    background-color: var(--primary-light);
}

.btn-signup:hover {
    background-color: #ff7a93;
}

/* 英雄区域样式 */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--secondary-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background-color: var(--primary-light);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 200px;
    height: 200px;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    background-color: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
}

.search-box button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 1.5rem;
    font-size: 1.2rem;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: #ff7a93;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    max-width: 500px;
}

/* 分类区域样式 */
.categories {
    padding: 5rem 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 工具区域样式 */
.featured-tools,
.new-tools {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    color: #ff7a93;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tool-image {
    height: 180px;
    overflow: hidden;
}

.tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.tool-card:hover .tool-image img {
    transform: scale(1.05);
}

.tool-content {
    padding: 1.5rem;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag:nth-child(2) {
    background-color: var(--secondary-light);
    color: #5EADB9;
}

.tool-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.tool-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating i {
    color: #FFD700;
    font-size: 0.8rem;
}

/* 新闻通讯区域样式 */
.newsletter {
    padding: 5rem 0;
    background-color: var(--secondary-light);
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: var(--primary-light);
    border-radius: 50%;
    opacity: 0.5;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border-radius: 50px;
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-family: 'Noto Sans KR', sans-serif;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: #ff7a93;
}

/* 页脚样式 */
footer {
    background-color: var(--white);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-light);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background-color: #ddd;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .search-box {
        margin: 0 auto;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
        word-break: keep-all;
        line-height: 1.4;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        word-break: keep-all;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .search-box input {
        width: 100%;
        border-radius: 16px 16px 0 0;
        text-align: center;
    }
    
    .search-box button {
        width: 100%;
        padding: 12px;
        border-radius: 0 0 16px 16px;
    }
    
    .newsletter-form {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .newsletter-form input {
        width: 100%;
        border-radius: 16px 16px 0 0;
        text-align: center;
    }
    
    .newsletter-form button {
        width: 100%;
        border-radius: 0 0 16px 16px;
    }
    
    .user-actions {
        gap: 0.5rem;
    }
    
    .btn-login, .btn-signup {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-links a:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo h1 span {
        font-size: 1rem;
    }
}

/* 韩风特色动画效果 */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.category-icon {
    animation: float 3s ease-in-out infinite;
}

.category-card:nth-child(odd) .category-icon {
    animation-delay: 0.5s;
}

.category-card:nth-child(even) .category-icon {
    animation-delay: 1s;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.modal-content {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
}

.modal-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.modal-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #333;
}
