/* --- START OF FILE font-changer/style.css --- */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- 1. 核心风格变量 (从主页同步) --- */
:root{
    --blue: #0099ff;
    --blue-light: #40c4ff;
    --green: #00c853;
    --bg: #0a0f1f;
    --card-bg: rgba(29, 41, 62, 0.5); /* 毛玻璃效果 */
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: rgba(56, 78, 114, 0.3);
    --shadow: 0 8px 32px rgba(0,0,0,.25);
    --border-radius: 16px;
}

/* --- 2. 全局与背景样式 --- */
body {
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 153, 255, 0.15), transparent 35%),
                      radial-gradient(circle at 90% 80%, rgba(0, 200, 83, 0.15), transparent 40%);
    color: var(--text);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- 3. 导航栏 (从主页同步) --- */
.main-nav {
    background: rgba(10, 15, 31, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -20px 0 0 -20px; /* 修正body的padding影响 */
    width: 100vw;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--blue-light);
}

/* --- 4. 页面布局与头部 --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 40px; /* 为粘性导航栏留出空间 */
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, var(--muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
header p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- 5. 输入区样式 --- */
#text-input {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    font-size: 1.2rem;
    color: var(--text);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#text-input::placeholder {
    color: var(--muted);
}

#text-input:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(64, 196, 255, 0.25), var(--shadow);
}

/* --- 6. 输出卡片网格 --- */
.outputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.font-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 卡片悬停动态光圈 (从主页同步) */
.font-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: var(--border-radius);
    padding: 1px;
    background: conic-gradient(from 180deg at 50% 50%, var(--blue), var(--green), var(--blue-light), var(--blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: spin 4s linear infinite;
    pointer-events: none; /* 确保不影响点击 */
}
.font-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.font-card:hover::before {
    opacity: 1;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.font-card .title {
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 1rem;
}

.font-card .output-text {
    font-size: 1.6rem;
    min-height: 70px;
    word-wrap: break-word;
    margin-bottom: 20px;
    color: var(--text);
}

/* --- 7. 按钮样式 --- */
.copy-btn {
    align-self: flex-end;
    padding: 10px 20px;
    border: none;
    background: var(--blue);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.2);
}

.copy-btn:hover {
    background-color: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 196, 255, 0.3);
}

.copy-btn.copied {
    background-color: var(--green);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.2);
}

/* --- 8. 页脚 --- */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
    color: var(--muted);
    font-size: .9rem;
    border-top: 1px solid var(--border);
    background: #141c2f;
    width: 100vw;
    margin-left: -20px;
    margin-bottom: -20px;
}
footer a {
    color: var(--blue);
    text-decoration: none;
    margin: 0 10px;
}
footer a:hover {
    text-decoration: underline;
}