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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}

/* 英雄区域 */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
}

.hero-content {
    flex: 1;
    padding-right: 3rem;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.tagline {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ai-avatar {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

/* 通用区域样式 */
.section {
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.bg-light {
    background: #f8f9fa;
}

/* 卡片样式 */
.about-content, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-card, .feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

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

.about-card i, .feature-icon i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
}

/* 主人指令区域 */
.master-instruction {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.instruction-card, .owner-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.verification-form {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.input-field {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
}

.hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.owner-info ul {
    list-style: none;
    margin-top: 1rem;
}

.owner-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 3rem 2rem;
}

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

.footer-links a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 0.5rem 0;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

/* 登录页面样式 */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.login-tagline {
    opacity: 0.9;
    margin-top: 0.5rem;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

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

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

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
}

.btn-login-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-login-submit:hover {
    opacity: 0.9;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.admin-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.login-info {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.login-info ul {
    list-style: none;
    margin-top: 1rem;
}

.login-info li {
    padding: 0.3rem 0;
    opacity: 0.9;
}

.back-home {
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 仪表板样式 */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.sidebar-header h2 {
    color: #3498db;
    font-size: 1.5rem;
}

.user-info {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #34495e;
}

.user-avatar i {
    font-size: 3rem;
    color: #3498db;
    margin-right: 1rem;
}

.user-details h4 {
    margin-bottom: 0.3rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: #34495e;
    color: white;
}

.nav-item i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.nav-divider {
    padding: 1rem 1.5rem 0.5rem;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #34495e;
    margin-top: auto;
}

.btn-logout {
    width: 100%;
    padding: 0.8rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 主内容区 */
.main-content {
    flex: 1;
    background: #f5f5f5;
}

.topbar {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.topbar-left h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

#currentTime {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-dropdown img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* 仪表板内容 */
.dashboard-content {
    padding: 2rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.bg-blue { background: #3498db; }
.bg-green { background: #2ecc71; }
.bg-orange { background: #e67e22; }
.bg-purple { background: #9b59b6; }

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* 主人控制台 */
.master-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.badge-master {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

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

.control-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
}

.control-card textarea {
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: monospace;
    resize: vertical;
}

.btn-master {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.permission-list {
    margin-top: 1rem;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.owner-identity {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.identity-info {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 5px;
}

.btn-refresh {
    background: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 系统信息 */
.system-info {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.status-online {
    color: #2ecc71;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .master-instruction {
        grid-template-columns: 1fr;
    }
    
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .main-content {
        min-height: calc(100vh - 400px);
    }
}