/* 全局样式 */
body {
    background: rgb(11, 11, 11);
    color: var(--text-color);
    font-family: var(--font-family);
}

/* 技能部分样式 */
.section {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-color);
}

.skills-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    padding: clamp(2rem, 4vw, 3rem);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: start;
    overflow: visible;
    margin-bottom: 3rem;
}

.skill-card {
    width: 100%;
    max-width: 416px;
    aspect-ratio: 8 / 10;
    background: rgba(17, 17, 17, 0.8);
    border-radius: 50%;
    padding: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

.skill-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.skill-card.animate-out {
    opacity: 0;
    transform: translateY(50px);
}

.skill-card:nth-child(2) {
    transition-delay: 0.2s;
}

.skill-card:nth-child(3) {
    transition-delay: 0.4s;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    border-radius: 50%;
}

.skill-card::after {
    content: '点击查看详情';
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 15px;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(25, 25, 25, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.skill-card:hover .skill-content {
    transform: scale(0.98);
}

.skill-content {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 0;
}

.skill-card i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.skill-card:hover i {
    transform: scale(1.1);
    opacity: 1;
    color: var(--secondary-color);
}

.skill-card h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.6rem;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.skill-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.skill-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    padding: 0 2rem;
    overflow-y: auto;
    font-weight: 300;
    letter-spacing: 0.2px;
    flex: 1;
    text-align: justify;
    max-height: calc(100% - 130px);
}

.skill-card p::-webkit-scrollbar {
    width: 5px;
}

.skill-card p::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.skill-card p::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* 跑马灯样式 */
.logo-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: transparent;
    margin-bottom: 40px;
}

.logo-slide-track {
    display: flex;
    animation: marquee 30s linear infinite;
    will-change: transform;
    margin-bottom: 20px;
}

.logo-slide {
    width: 120px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-slide img {
    width: 100%;
    height: auto;
    max-width: 45px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(40%);
}

.logo-slide:hover img {
    opacity: 1;
    transform: scale(1.1);
    filter: grayscale(0%);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-75%); }
}

.logo-slide-track:hover {
    animation-play-state: paused;
}

/* 响应式设计 */
@media (min-width: 1200px) {
    .skills-grid-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        max-width: 1400px;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .skills-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
        max-width: 1200px;
    }

    .skill-card {
        max-width: 364px;
    }
}

@media (max-width: 768px) {
    .skills-grid-new {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .skill-card {
        padding: 2rem;
        max-width: 325px;
        margin: 0 auto;
    }

    .skill-card i {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
        margin-top: 1.2rem;
    }

    .skill-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.5rem;
    }

    .skill-card p {
        font-size: 0.85rem;
        padding: 0 1.5rem;
        max-height: calc(100% - 110px);
    }

    .logo-slide {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .skills-grid-new {
        padding: 1rem;
        gap: 1.5rem;
    }

    .skill-card {
        padding: 1.8rem;
        max-width: 260px;
        margin: 0 auto;
    }

    .skill-card i {
        font-size: 1.6rem;
        margin-top: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .skill-card h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.4rem;
    }

    .skill-card h3::after {
        width: 30px;
        height: 1.5px;
    }

    .skill-card p {
        font-size: 0.8rem;
        padding: 0 1rem;
        max-height: calc(100% - 90px);
        line-height: 1.5;
    }

    .skill-card::after {
        font-size: 0.8rem;
        bottom: 1rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 1600px) {
    .logo-slide {
        width: 100px;
    }
}

/* 技能模态框样式 */
.skill-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.skill-modal .modal-content {
    position: relative;
    background: rgba(25, 25, 25, 0.95);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    color: #fff;
    transform: translateY(0);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    max-height: 80vh;
    overflow-y: auto;
}

.skill-modal .modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-modal .modal-header i {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--accent-color);
}

.skill-modal .modal-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--accent-color);
}

.skill-modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.skill-modal .close-btn:hover {
    transform: rotate(90deg);
}

.skill-modal .modal-body {
    font-size: 1rem;
    line-height: 1.6;
}

.skill-modal .modal-description {
    margin-bottom: 1.5rem;
    white-space: pre-line;
    line-height: 1.8;
}

.skill-modal .modal-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-modal .modal-skills span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-modal .modal-skills span:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 样式化项目符号和缩进 */
.modal-description ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.modal-description li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.5rem;
}

.modal-description li:before {
    content: "•";
    position: absolute;
    left: 0.5em;
    color: var(--accent-color);
}

/* 添加动画效果 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-modal .modal-content {
    animation: modalFadeIn 0.3s ease forwards;
}

/* 添加模态框样式 */
.skill-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.skill-modal.show {
    opacity: 1;
    visibility: visible;
}

.skill-modal-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.skill-modal.show .skill-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: white;
}

.skill-modal h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.skill-modal-body {
    color: rgba(255, 255, 255, 0.9);
}

.skill-modal-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.skill-modal-body h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 1.5rem 0 1rem;
}

.skill-modal-body ul {
    list-style: none;
    padding: 0;
}

.skill-modal-body li {
    font-size: 1.1rem;
    margin: 1rem 0;
    padding-left: 1.8rem;
    position: relative;
}

.skill-modal-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .skill-modal-content {
        padding: 2rem;
        width: 95%;
    }

    .skill-modal h2 {
        font-size: 1.8rem;
    }

    .skill-modal-body p {
        font-size: 1rem;
    }

    .skill-modal-body li {
        font-size: 1rem;
    }
}
