/* Linux工具箱样式表 - 夏日清新主题 */

/* CSS变量定义 - 夏日配色方案 */
:root {
    --bt-green: #2e8b57;          /* 海绿色 - 呼应稻田 */
    --bt-dark-green: #228b22;      /* 森林绿 */
    --bt-light-green: #90ee90;     /* 浅绿色 */
    --bt-white: #ffffff;
    --bt-bg-light: rgba(255, 255, 255, 0.92);  /* 半透明白色 - 确保文字可读 */
    --bt-bg-green: rgba(144, 238, 144, 0.15);  /* 半透明浅绿 */
    --bt-text: #2d4a3e;            /* 深绿色文字 */
    --bt-text-light: #5a7a6a;      /* 浅绿色文字 */
    --bt-shadow: rgba(46, 139, 87, 0.2);        /* 绿色阴影 */
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面背景设置 - 夏日主题 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 夏日背景图片 - 固定位置 */
    background-image: url('background.jpg');
    background-size: cover;                    /* 覆盖整个视口 */
    background-position: center center;        /* 居中显示 */
    background-attachment: fixed;              /* 固定背景，不随滚动 */
    background-repeat: no-repeat;              /* 不重复 */
    min-height: 100vh;                       /* 最小高度100vh */
    color: var(--bt-text);
    line-height: 1.8;
    position: relative;
}

/* 添加渐变遮罩层 - 确保文字可读 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(144, 238, 144, 0.65) 100%
    );
    z-index: -1;  /* 确保内容在遮罩层之上 */
    pointer-events: none;  /* 不阻止交互 */
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;  /* 确保内容在遮罩层之上 */
}

/* ============================================
   页头样式 - 清新夏日风
   ============================================ */
.header {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(
        135deg, 
        rgba(46, 139, 87, 0.95) 0%, 
        rgba(34, 139, 34, 0.95) 50%,
        rgba(46, 139, 87, 0.95) 100%
    );
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 15px 50px var(--bt-shadow);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* 页头装饰元素 */
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(10%, 10%);
    }
}

.header h1 {
    font-size: 2.8em;
    color: var(--bt-white);
    margin-bottom: 12px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15em;
    position: relative;
    z-index: 1;
}

/* ============================================
   安装命令区域
   ============================================ */
.install-section {
    background: var(--bt-bg-light);
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: 0 8px 30px var(--bt-shadow);
    border: 2px solid var(--bt-green);
    backdrop-filter: blur(15px);
}

.install-section h2 {
    font-size: 1.9em;
    margin-bottom: 22px;
    color: var(--bt-green);
    position: relative;
}

.install-box {
    background: linear-gradient(135deg, var(--bt-bg-green), rgba(255, 255, 255, 0.9));
    padding: 22px 35px;
    border-radius: 12px;
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--bt-text);
    word-break: break-all;
    margin-bottom: 22px;
    border: 2px dashed var(--bt-green);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 复制按钮 */
.copy-btn {
    background: linear-gradient(135deg, var(--bt-green), var(--bt-dark-green));
    color: var(--bt-white);
    border: none;
    padding: 16px 45px;
    font-size: 1.15em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px var(--bt-shadow);
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 35px var(--bt-shadow);
}

.copy-btn:active {
    transform: translateY(-1px);
}

.copy-success {
    color: var(--bt-green);
    font-weight: bold;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-success.show {
    opacity: 1;
}

/* ============================================
   功能分类区域
   ============================================ */
.category-section {
    margin-bottom: 35px;
}

.category-title {
    font-size: 1.7em;
    color: var(--bt-green);
    margin-bottom: 22px;
    padding-left: 18px;
    border-left: 5px solid var(--bt-green);
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-title svg {
    width: 32px;
    height: 32px;
    fill: var(--bt-green);
}

.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.function-card {
    background: var(--bt-bg-light);
    border-radius: 18px;
    padding: 28px;
    transition: all 0.35s ease;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* 卡片光效动画 */
.function-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(46, 139, 87, 0.08) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.35s;
}

.function-card:hover {
    transform: translateY(-8px);
    background: var(--bt-bg-light);
    border-color: var(--bt-green);
    box-shadow: 0 15px 40px var(--bt-shadow);
}

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

.function-card h3 {
    color: var(--bt-green);
    font-size: 1.25em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.function-card p {
    color: var(--bt-text-light);
    font-size: 0.98em;
    position: relative;
    z-index: 1;
}

.function-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--bt-green), var(--bt-dark-green));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px var(--bt-shadow);
}

.function-icon svg {
    width: 26px;
    height: 26px;
    fill: var(--bt-white);
}

/* ============================================
   页脚样式
   ============================================ */
.footer {
    text-align: center;
    padding: 45px 35px;
    background: linear-gradient(
        135deg, 
        rgba(46, 139, 87, 0.95) 0%, 
        rgba(34, 139, 34, 0.95) 50%,
        rgba(46, 139, 87, 0.95) 100%
    );
    border-radius: 25px;
    margin-top: 35px;
    margin-bottom: 35px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.footer-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--bt-white);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    margin-bottom: 18px;
    object-fit: cover;
}

.footer h3 {
    color: var(--bt-white);
    font-size: 1.4em;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 10px;
}

.footer a {
    color: var(--bt-white);
    text-decoration: underline;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ffd700;
}

.footer-copyright {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-copyright p {
    font-size: 0.92em;
    margin-bottom: 6px;
}

/* ============================================
   弹窗样式
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bt-white);
    padding: 42px;
    border-radius: 22px;
    max-width: 520px;
    width: 92%;
    text-align: center;
    border: 3px solid var(--bt-green);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.modal-content h3 {
    color: var(--bt-green);
    font-size: 1.6em;
    margin-bottom: 22px;
}

.modal-content p {
    margin-bottom: 28px;
    color: var(--bt-text);
    line-height: 1.8;
}

.modal-close {
    background: linear-gradient(135deg, var(--bt-green), var(--bt-dark-green));
    color: var(--bt-white);
    border: none;
    padding: 14px 35px;
    border-radius: 28px;
    cursor: pointer;
    font-size: 1.05em;
    transition: all 0.3s;
    box-shadow: 0 5px 18px var(--bt-shadow);
}

.modal-close:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--bt-shadow);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 40px 25px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .function-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;  /* 移动端使用滚动背景 */
    }

    .header h1 {
        font-size: 1.9em;
    }

    .header p {
        font-size: 1em;
    }

    .install-box {
        font-size: 1.05em;
        padding: 18px 22px;
    }

    .function-grid {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 1.4em;
    }

    .install-section,
    .function-card {
        padding: 22px;
    }

    .footer {
        padding: 35px 25px;
    }

    .footer-logo {
        width: 75px;
        height: 75px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .header {
        padding: 30px 18px;
        border-radius: 18px;
    }

    .header h1 {
        font-size: 1.6em;
        letter-spacing: 1px;
    }

    .function-card {
        padding: 20px;
        border-radius: 15px;
    }

    .copy-btn {
        padding: 14px 35px;
        font-size: 1em;
    }

    .install-section h2 {
        font-size: 1.5em;
    }

    .modal-content {
        padding: 28px;
        margin: 15px;
    }
}

/* ============================================
   动画效果
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(144, 238, 144, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--bt-green), var(--bt-dark-green));
    border-radius: 6px;
    border: 2px solid rgba(144, 238, 144, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bt-dark-green);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bt-green) rgba(144, 238, 144, 0.2);
}

/* ============================================
   辅助类
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 隐藏音频播放器 - 后台播放 */
.hidden-audio {
    position: fixed;
    bottom: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   打印样式 - 确保打印时内容清晰
   ============================================ */
@media print {
    body {
        background: white !important;
        background-image: none !important;
    }

    body::before {
        display: none;
    }

    .function-card,
    .install-section,
    .header,
    .footer {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}
