/**
 * PW DNS 统一视觉主题样式
 * 设计规范基于 Privacy.html 和 Terms of Service.html
 */

/* ==================== CSS变量定义 ==================== */
:root {
    /* 主色调 */
    --primary: #ff6b9d;
    --primary-hover: #ff8c00;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* 协议页面特色色 */
    --accent-pink: #ff6b9d;
    --accent-cyan: #ff8c00;
    --accent-magenta: #FF6EAA;
    --accent-purple: #ff6b9d;
    --accent-purple-dark: #ff8c00;
    
    /* 背景色 */
    --bg-gradient-start: #f1f4f9;
    --bg-gradient-end: #dff1ff;
    --bg-white: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-hover: rgba(255, 255, 255, 0.3);
    
    /* 文字色 */
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --text-dark: #0a1628;
    
    /* 边框和阴影 */
    --border-glass: rgba(255, 255, 255, 0.5);
    --border-glass-light: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
    
    /* 间距 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 35px;
    
    /* 字体 - 与协议页面保持一致 */
    --font-family: 'Poppins', sans-serif;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 22px;
    --font-size-xl: clamp(28px, 6vw, 36px);
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
}

/* ==================== 背景系统 ==================== */
.pwdns-bg {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    padding: 20px;
    padding-top: 120px;
}

.pwdns-bg .bg-color {
    position: absolute;
    filter: blur(150px);
    width: clamp(300px, 80vw, 600px);
    height: clamp(300px, 80vw, 600px);
    pointer-events: none;
}

.pwdns-bg .bg-color:nth-child(1) {
    top: -350px;
    background: rgba(255, 53, 155, 0.5);
}

.pwdns-bg .bg-color:nth-child(2) {
    bottom: -150px;
    left: 100px;
    background: #fffd87;
}

.pwdns-bg .bg-color:nth-child(3) {
    bottom: 50px;
    right: 100px;
    background: #ff8c00;
}

/* ==================== 导航栏 ==================== */
.pwdns-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--border-glass);
    gap: 20px;
}

.pwdns-navbar .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 2px;
    text-decoration: none;
}

.pwdns-navbar .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    list-style: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* 下拉菜单 */
.pwdns-navbar .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 160px;
    z-index: 1001;
    list-style: none;
    margin-top: 5px;
}

.pwdns-navbar .nav-links a {
    position: relative;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid var(--border-glass);
    border-right: 1px solid var(--border-glass-light);
    border-bottom: 1px solid var(--border-glass-light);
    border-radius: var(--radius-xl);
    color: var(--accent-pink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.pwdns-navbar .nav-links a:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pwdns-navbar .nav-links a.btn-primary {
    background: #fff;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 下拉菜单 */
.pwdns-navbar .dropdown {
    position: relative;
}

.pwdns-navbar .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 160px;
    z-index: 1001;
    list-style: none;
    margin-top: 5px;
}

.pwdns-navbar .dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
}

.pwdns-navbar .dropdown-menu a:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.pwdns-navbar .dropdown:hover .dropdown-menu {
    display: block;
}

/* ==================== 内容容器 ==================== */
.pwdns-content {
    position: relative;
    background: var(--bg-white);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-glass);
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

/* ==================== 页面标题 ==================== */
.pwdns-page-title {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent-cyan);
}

.pwdns-page-title h1 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.pwdns-page-title .subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ==================== 卡片组件 ==================== */
.pwdns-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--accent-pink);
}

.pwdns-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* 功能特色卡片 */
#features .pwdns-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 4px solid var(--accent-pink);
}

#features .pwdns-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

#features .pwdns-card h3 .feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

#features .pwdns-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== 按钮组件 ==================== */
.pwdns-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pwdns-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pwdns-btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.pwdns-btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ==================== 表单组件 ==================== */
.pwdns-form-group {
    margin-bottom: var(--space-md);
}

.pwdns-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.pwdns-form-group input,
.pwdns-form-group select,
.pwdns-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pwdns-form-group input:focus,
.pwdns-form-group select:focus,
.pwdns-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(98, 237, 217, 0.2);
}

/* ==================== 页脚 ==================== */
.pwdns-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.pwdns-footer a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.2s;
}

.pwdns-footer a:hover {
    color: var(--accent-purple-dark);
    text-decoration: underline;
}

/* ==================== 浮动方块装饰 ==================== */
.pwdns-squares {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.pwdns-squares .square {
    position: absolute;
    backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    animation: float 10s linear infinite;
    animation-delay: calc(-1s * var(--i));
    width: clamp(30px, 15vw, 120px);
    height: clamp(30px, 15vw, 120px);
}

@keyframes float {
    0%, 100% { transform: translateY(-20px); }
    50% { transform: translateY(20px); }
}

/* ==================== 响应式布局 ==================== */
/* 移动端导航栏由 user_dashboard.html 内联样式控制（侧边栏抽屉模式），
   此处仅保留非导航栏的响应式基础样式 */
@media (max-width: 768px) {
    .pwdns-bg {
        padding-top: 120px;
        padding: 10px;
        padding-top: 100px;
    }

    .pwdns-content {
        padding: 16px;
    }

    .pwdns-page-title h1 {
        font-size: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pwdns-navbar {
        padding: 10px 20px;
    }

    .pwdns-navbar .nav-links a {
        padding: 6px 10px;
        font-size: 12px;
    }
}
