/* ================= 基础样式 ================= */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    z-index: 5;
}

/* ================= 顶部区域 ================= */
.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.logo {
    height: 2rem;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.hitokoto-text {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 10;
    max-width: 100%;
    text-align: right;
}

.hitokoto-text:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* ================= 主内容区 ================= */
.content-container {
    min-height: calc(100vh - 300px);
    padding-bottom: 200px;
}

.home-container {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    max-width: 600px;
    z-index: 1;
    margin-bottom: 200px;
}

.home-container h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home-container form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.home-container input {
    width: 70%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.3s ease;
}

.home-container input:focus {
    background: white;
    color: #333;
}

.home-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.home-container button {
    padding: 12px 20px;
    background: rgba(69, 125, 212, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 25px 25px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-container button:hover {
    background: rgba(15, 110, 190, 0.8);
    transform: scale(1.05);
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 150%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3px);
    border-radius: 17px;
    padding: 12px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
    min-width: 400px;
    z-index: 1;
}

.home-content h1 {
    margin-bottom: 20px;
}

.home-content p {
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
}

/* ================= 背景 ================= */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background-image 0.5s ease, background 0.5s ease;
}

/* ================= Dock栏 ================= */
.bottom-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 20;
}

.dock {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 17px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
    display: flex;
    align-items: center;
    position: relative;
}

.dock-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.dock-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: white;
}

.dock-icon:hover {
    transform: scale(1.2) translateY(-10px);
    background: white;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.logo-dock-container {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 17px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.logo-dock-container:hover {
    background: rgba(255, 255, 255, 1);
}

.dock-logo {
    height: 55px;
    width: 55px;
    object-fit: contain;
}

/* ================= 时间显示 ================= */
.time-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 17px;
    padding: 12px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
    min-width: 120px;
}

#current-time {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 2px;
}

#current-date {
    font-size: 1rem;
    opacity: 0.9;
}

/* ================= 指示器 ================= */
.dock-indicator {
    position: absolute;
    justify-content: center;
    bottom: 180px;
    left: 0;
    right: 0;
    margin: 0 auto;
    color: white;
    font-size: 1.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 8px;
    display: none;
    animation: blink 2s infinite;
    z-index: 21;
    width: fit-content;
}

.dock-indicator.desktop {
    display: block;
}

.dock-indicator.mobile {
    display: none;
}

/* ================= 信息面板 ================= */
.info-panel,
.basic-info,
.personal-strength,
.interests,
.development-history,
.footer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    z-index: 5;
}

.info-panel {
    bottom: -100%;
}

.basic-info {
    bottom: -200%;
}

.personal-strength {
    bottom: -300%;
}

.interests {
    bottom: -400%;
}

.development-history {
    bottom: -640%;
}

.footer {
    bottom: -800%;
    padding-bottom: 30%;
}

.info-title,
.basic-info-title,
.personal-strength-title,
.interests-title,
.development-history-title,
.footer-title {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    margin: 0;
    padding: 5px 0px;
    text-align: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 6;
}

.info-title:hover,
.basic-info-title:hover,
.personal-strength-title:hover,
.interests-title:hover,
.development-history-title:hover,
.footer-title:hover {
    background: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

.info-title h2,
.basic-info-title h2,
.personal-strength-title h2,
.interests-title h2,
.development-history-title h2,
.footer-title h2 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.info-content,
.basic-info-content,
.personal-strength-content,
.interests-content,
.development-history-content,
.footer-content {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.basic-info-content {
    text-align: left;
    padding: 25px 30px;
}

.development-history-content {
    padding: 40px;
    overflow-x: auto;
}

/* ================= 列表样式 ================= */
.basic-info-list,
.development-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.basic-info-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    font-size: 1.1rem;
}

.basic-info-list li:last-child {
    border-bottom: none;
}

.basic-info-list li::before {
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.basic-info-list li:hover {
    /*background: rgba(255, 255, 255, 1);*/
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.development-history-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 6px;
    background: white;
    z-index: 1;
}

.development-history-list li {
    position: relative;
    display: grid;
    grid-template-columns: 100px 20px 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, opacity;
    z-index: 2;
}

.development-history-list .date {
    text-align: center;
    color: #8ab4f8;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    background: white;
    border-radius: 7px;
    padding: 4px 8px;
    margin: 5px 2px;
}

.development-history-list a {
    color: white;
    text-decoration: underline;
    font-style: italic;
}

.development-history-list .content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.development-history-list li:hover .date {
    background-color: #8ab4f8;
    color: white;
    transform: scale(1.1);
}

.development-history-list li:hover .content {
    background: rgba(255, 255, 255, 1);
    transform: translateX(5px);
}

.development-history-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.development-history-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.development-history-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.development-history-list li:nth-child(4) {
    animation-delay: 0.4s;
}

.development-history-list li:nth-child(5) {
    animation-delay: 0.5s;
}

.development-history-list li:nth-child(6) {
    animation-delay: 0.6s;
}

.development-history-list li:nth-child(7) {
    animation-delay: 0.7s;
}

.development-history-list li:nth-child(8) {
    animation-delay: 0.8s;
}

.development-history-list li:nth-child(9) {
    animation-delay: 0.9s;
}

.development-history-list li:nth-child(10) {
    animation-delay: 1.0s;
}

.development-history-list li:nth-child(11) {
    animation-delay: 1.1s;
}

.development-history-list li:nth-child(12) {
    animation-delay: 1.2s;
}

.development-history-list li:nth-child(13) {
    animation-delay: 1.3s;
}

.development-history-list li:nth-child(14) {
    animation-delay: 1.4s;
}

.development-history-list li:hover,
.development-history-list li:hover a{
    transform: translateY(-8px) scale(1.05);
    color: #8ab4f8;
    text-shadow: 0 2px 5px rgba(138, 180, 248, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.development-history-list li:last-child {
    margin-bottom: 0;
}

.footer-text a {
    font-style: italic;
    color: white;
}

.footer-text a:hover {
    color: #8ab4f8;
    text-shadow: 0 2px 5px rgba(138, 180, 248, 0.3);
    transition: all 0.3s ease;
}

/* ================= 技能进度条 ================= */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vw, 12px);
    padding: clamp(15px, 2vw, 20px);
    max-width: min(90vw, 600px);
    width: auto;
    margin: 0 auto;
    box-sizing: border-box;
}

.skill-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.skill-name {
    width: 100px;
    font-weight: bold;
    text-align: right;
}

.skill-percent {
    width: 50px;
    text-align: left;
    font-size: 0.9rem;
}

.linear-progress-container {
    width: 100%;
    height: clamp(10px, 1.2vw, 12px);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    max-width: 500px;
}

.linear-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition-delay: var(--animation-delay, 0s);
    animation: none;
    --target-width: 0%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.linear-progress-bar[style*="width"] {
    --target-width: attr(style width);
}

.linear-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shine 2s infinite;
}

/* 进度条配色方案 */
.linear-progress-bar {
    background: linear-gradient(90deg, #00D1B2, #00C4A7, #00B89C);
}

.linear-progress-bar.html {
    background: linear-gradient(90deg, #FF7D4D, #FF6B3C, #FF592B);
}

.linear-progress-bar.css {
    background: linear-gradient(90deg, #4A89DC, #3B7DD8, #2C71D4);
}

.linear-progress-bar.python {
    background: linear-gradient(90deg, #48C6EF, #37B9E6, #26ACDD);
}

.linear-progress-bar.c {
    background: linear-gradient(90deg, #5D6D7E, #4D5D6E, #3D4D5E);
}

.linear-progress-bar.linux {
    background: linear-gradient(90deg, #F6D365, #F5C84F, #F4BE39);
}

.linear-progress-bar:hover {
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

/* ================= 兴趣爱好卡片 ================= */
.interest-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.interest-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition:
        opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.interest-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: cardSubtleBounce 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.interest-card:hover {
    transform: translateY(-8px) scale(1.05) rotate(1deg);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transition:
        transform 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28),
        box-shadow 0.15s ease-out,
        background-color 0.15s ease-out;
}

.interest-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    object-fit: contain;
    transition:
        transform 0.15s ease-out,
        filter 0.15s ease-out;
}

.interest-card:hover .interest-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)) brightness(1.1);
    transform: scale(1.1) rotate(4deg);
}

.interest-text {
    font-size: 16px;
    color: #fff;
    text-align: center;
    transition: transform 0.15s ease-out;
}

.interest-card:hover .interest-text {
    color: #457dd4;
    font-weight: bold;
    transform: scale(1.05);
}

/* ================= 页尾 ================= */
.footer-text {
    padding-bottom: 15px;
    font-size: 16px;
}

.copyright {
    font-size: 1.2rem;
    color: white;
    text-align: center;
    margin-top: 20px;
}

/* ================= 动画定义 ================= */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress-load {
    0% {
        width: 0% !important;
    }

    100% {
        width: var(--target-width) !important;
    }
}

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

    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(69, 125, 212, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(69, 125, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(69, 125, 212, 0);
    }
}

@keyframes lineGrow {
    from {
        height: 0;
    }

    to {
        height: 100%;
    }
}

@keyframes cardSubtleBounce {
    0% {
        transform: translateY(20px) scale(0.95);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= 响应式设计 ================= */
@media (max-width: 768px) {
    .bottom-container {
        gap: 20px;
    }

    .logo-dock-container,
    .dock,
    .time-container {
        height: 50px;
    }

    .logo-dock-container {
        width: 50px;
        padding: 8px;
    }

    .dock-logo {
        height: 35px;
        width: 35px;
    }

    .time-container {
        min-width: 100px;
        padding: 8px 12px;
    }

    #current-time {
        font-size: 1rem;
    }

    #current-date {
        font-size: 0.6rem;
    }

    .home-container {
        top: 25%;
        padding: 0 20px;
    }

    .home-container input {
        width: 60%;
    }

    .dock-indicator.desktop {
        display: none;
    }

    .dock-indicator.mobile {
        display: block;
    }

    .development-history,
    .footer {
        width: 80%;
    }

    .development-history-content {
        padding: 20px;
    }

    .development-history-list li {
        padding: 10px 15px 10px 30px;
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .development-history-list li::before {
        display: none;
    }

    .development-history-list::before {
        display: none;
    }

    .interest-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .interest-card {
        padding: 10px;
    }

    .interest-icon {
        width: 40px;
        height: 40px;
    }

    .footer-title {
        font-size: 1.5rem;
    }

    .footer-content {
        padding: 15px;
    }

    .footer-text {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .skill-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .skill-name,
    .skill-percent {
        width: auto;
        text-align: left;
    }
}

@media (max-height: 600px) {
    .skills-grid {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .skill-row {
        padding: 4px 0;
    }
}