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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 头部导航 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover, nav a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 主内容区域 */
main {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
}

/* 英雄区域 */
.hero {
    text-align: center;
    color: white;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.security-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.status, .protocol, .backend {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 特性网格 */
.features {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

/* 演示区域 */
.demo {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#security-status {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.1rem;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a6fd8;
}

/* 关于页面样式 */
.about-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content h2 {
    margin: 2rem 0 1rem;
    color: #667eea;
}

.about-content ul, .about-content ol {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.tech-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.tech-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* 联系页面样式 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-details {
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.security-notice {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8f5e8;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
}

#form-security-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #4caf50;
    font-weight: 500;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    color: white;
    margin-top: 4rem;
}

/* OPAQUE DEMO 特定样式 */

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #333;
}

.auth-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.auth-form input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.auth-form button {
    width: 100%;
    margin-bottom: 1rem;
}

.auth-form p {
    text-align: center;
    margin-top: 1rem;
}

.auth-form a {
    color: #667eea;
    text-decoration: none;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* 演示区域样式 */
.demo-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.demo-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.demo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.demo-card {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.demo-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.demo-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.demo-btn {
    margin-top: 1rem;
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.demo-btn:hover {
    background: #5a6fd8;
}

/* 用户信息面板 */
.user-info {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.user-info h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.dashboard {
    display: flex;
    justify-content: center;
}

.user-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.user-card h3 {
    margin-bottom: 1.5rem;
    color: #667eea;
}

.user-details {
    text-align: left;
    margin-bottom: 2rem;
}

.user-details p {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

/* 消息提示样式 */
.message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .security-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        flex-direction: column;
        gap: 1rem;
    }
    
    .demo-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}