/* pSEO Toolbox - styles.css */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Inter', sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* Header */
.glass-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -24px; /* Align with header border */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Glass Panels (Cards) */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s, box-shadow 0.2s;

    /* --- 新增的核心代码 --- */
    display: flex;           /* 1. 开启弹性布局 */
    flex-direction: column;  /* 2. 让内容垂直排列 */
    height: 100%;            /* 3. 强制卡片撑满格子的高度 */
}

/* --- 新增：专门修理按钮的代码 --- */
.glass-panel .btn {
    margin-top: auto;        /* 4. 自动把按钮“顶”到最下面 */
    width: 100%;             /* 5. 让按钮宽度拉满（看起来更整齐） */
}

.glass-panel:hover {
    border-color: rgba(148, 163, 184, 0.2);
}

/* Grids */
.grid {
    display: grid;
    gap: 2rem;
}

/* 默认移动端：1列 */
.grid-3 {
    grid-template-columns: 1fr;
}

/* 平板/中屏：2列 */
@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 电脑大屏：强制3列 (解决你的错位问题) */
@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* Typography */
h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
.text-gradient {
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Inputs & Forms */
.input-field, input[type="text"], input[type="url"], select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus, input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .glass-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a.active::after {
        bottom: -5px;
    }

    h1 { font-size: 2rem; }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Ad Slot Placeholder */
.ad-slot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}