/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    /* box-sizing: border-box; */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #4c4e50;
    --white-color: #ffffff;
    --transition: all 0.3s ease;
}

body {
    line-height: 1.6;
    color: var(--light-color);
    background-color: var(--dark-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    background-color: #db5705;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #db5705;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #2667cc;
    transform: translateY(-2px);
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--white-color);
}

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--dark-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 首页横幅样式 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(100, 99, 99, 0.5), rgba(0, 0, 0, 0.5)), url('/image/back.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    padding-top: 70px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 800;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    animation: titleAnimation 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes titleAnimation {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    60% {
        opacity: 0.9;
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* 移动端背景图片适配 */
@media (max-width: 768px) {
    .hero {
        background-size: contain;
        background-position: top center;
        background-repeat: no-repeat;
        height: auto;
        min-height: 100vh;
        padding-top: 50px;
        background-color: #000; /* 添加背景色确保图片下方区域不突兀 */
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-top: 150px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* 关于我样式 */
.about-content {
    display: grid;
    grid-template-columns: auto auto;
    gap: 3rem;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--light-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white-color);
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.4);
}

.social-links a.github:hover,
.social-links a.twitter:hover,
.social-links a.linkedin:hover,
.social-links a.codepen:hover {
    background-color: var(--dark-color);
}

/* 文章列表样式 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.post-card {
    position: relative;
}

.post-img {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
}

.post-content {
    padding: 2rem;
    padding-left: 55px;
}

.category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 1rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    color: var(--primary-color);
}

.post-card:hover .post-title {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.read-more i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* 联系部分样式 */
.contact {
    background-color: rgba(58, 134, 255, 0.05);
}

.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .contact-form textarea {
        min-height: 120px;
    }
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    /* width: 100%; */
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 社交图标样式 */
.social-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white-color);
    transition: var(--transition);
}

.social-links .github {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.social-links .csdn {
    background-image: url("/image/icon/csdn.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #ffffff;
}

.social-links .twitter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.social-links .linkedin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z'%3E%3C/path%3E%3Crect x='2' y='9' width='4' height='12'%3E%3C/rect%3E%3Ccircle cx='4' cy='4' r='2'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.social-links .codepen {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* 阅读更多箭头 */
.read-more .arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover .arrow {
    transform: rotate(45deg) translateX(3px);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-about p {
    color: #ccc;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #ccc;
}

/* 小工具样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: #2a2a3e;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.tool-icon {
    margin-bottom: 1.5rem;
}

.tool-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.tool-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tool-excerpt {
    color: var(--light-color);
    margin-bottom: 1.5rem;
}

/* Excel转SQL工具样式 */
.excel-to-sql-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background-color: #2a2a3e;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.config-panel,
.result-panel {
    background-color: #1e1e2f;
    border-radius: 8px;
    padding: 1.5rem;
}

.config-panel h3,
.result-panel h3 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* 文件上传区域 */
.file-upload {
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    background-color: rgba(58, 134, 255, 0.1);
}

.upload-area img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.upload-area .hint {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 文件预览 */
.file-preview {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #3a3a4e;
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: space-between;
}

.file-preview.show {
    display: flex;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.file-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.file-name {
    color: var(--white-color);
    font-size: 0.9rem;
    flex: 1;
    text-align: left;
}

.remove-file {
    padding: 0.4rem 0.8rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.remove-file:hover {
    background-color: #c0392b;
}

/* 表单组 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--white-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #3a3a4e;
    color: var(--white-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

/* 列字段映射 */
#column-mappings {
    margin-bottom: 1rem;
}

.mapping-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.mapping-row input {
    flex: 1;
}

.mapping-row button {
    padding: 0 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.mapping-row button:hover {
    background-color: #c0392b;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-buttons .btn {
    flex: 1;
}

/* 结果面板 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.result-actions .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.sql-result {
    background-color: #1a1a2e;
    border-radius: 5px;
    padding: 1rem;
    max-height: 700px;
    overflow-y: auto;
}

.sql-result pre {
    color: var(--light-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .excel-to-sql-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .mapping-row {
        flex-direction: column;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background-color: var(--white-color);
        width: 80%;
        height: calc(100vh - 70px);
        transition: var(--transition);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        padding: 2rem;
    }

    .nav-links.show {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .contact-form-container {
        padding: 1.5rem;
    }
}

.inputIcon{
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 1.5rem;
}