:root {
    --primary: #ff0050;
    --primary-dark: #cc0040;
    --dark: #121212;
    --darker: #0a0a0a;
    --light: #f5f5f5;
    --gray: #2a2a2a;
    --gray-light: #3a3a3a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray);
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff0050, #ff8a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    margin: 10px;
    background: linear-gradient(90deg, #ff0050, #ff8a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #aaa;
    font-size: 1.1rem;
}

.category {
    margin-bottom: 40px;
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

/* 卡片链接样式 */
.tool-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.tool-card {
    background: var(--gray);
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

/* 移除原有的按钮样式 */
.tool-link {
    display: none;
}

/* 悬停效果 */
.tool-card-link:hover .tool-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 80, 0.2);
    background: var(--gray-light);
}

.tool-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.tool-desc {
    color: #bbb;
    font-size: 0.9rem;
}

 #textContainer {
            white-space: pre-wrap; /* 保留空白和换行 */
            font-family: monospace; /* 使用等宽字体保持格式 */
            margin: 10px;
            padding: 10px;
            border: 1px solid #ddd;
            background-color: #121212;
        }

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid var(--gray);
    color: #777;
    font-size: 0.9rem;
}

/* 响应式布局 */
/* 默认情况下（大屏幕）显示3列 */
.tools-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* 中等屏幕（如平板）显示2列 */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 小屏幕（如手机）显示1列 */
@media (max-width: 500px) {
  .tools-grid {
    grid-template-columns: (2, 1fr);
  }
  
  h1 {
      font-size: 2rem;
  }
}

/* Password Protection Styles */
.password-protection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.password-box {
    background: var(--darker);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--primary);
}

.password-box h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.password-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: none;
    background: var(--gray);
    color: white;
}

.password-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
}

.password-box button:hover {
    background: var(--primary-dark);
}

.error-message {
    color: #ff4d4d;
    margin-top: 10px;
    font-size: 0.9rem;
}