/* 时光邮局 - 样式文件 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a6fa5;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #4a6fa5;
}

.user-info {
    color: #4a6fa5;
    font-weight: 500;
    margin-left: 1rem;
}

/* 主内容区域 */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #4a6fa5;
    color: white;
}

.btn-primary:hover {
    background: #385d8a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 警告框 */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 首页英雄区域 */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #4a6fa5;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 功能展示 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature h3 {
    color: #4a6fa5;
    margin-bottom: 1rem;
}

/* 使用步骤 */
.how-it-works {
    text-align: center;
    margin-bottom: 3rem;
}

.how-it-works h2 {
    color: #4a6fa5;
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #4a6fa5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* 表单样式 */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    color: #4a6fa5;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.form-footer a {
    color: #4a6fa5;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 仪表板样式 - 增强版 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #4a6fa5;
}

.dashboard-header h2 {
    color: #4a6fa5;
    margin: 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #dee2e6;
}

.dashboard-stat-card h3 {
    color: #4a6fa5;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.dashboard-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4a6fa5;
    margin-bottom: 0.5rem;
}

.dashboard-stat-label {
    color: #666;
    font-size: 0.9rem;
}

.email-list-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
}

.email-list-container h3 {
    color: #4a6fa5;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #4a6fa5;
}

.email-list {
    background: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
}

.email-item {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.email-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.email-subject {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    flex: 1;
    min-width: 200px;
}

.email-time {
    color: #6c757d;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.email-content {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #4a6fa5;
}

.email-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.email-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-sent {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.no-emails {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

/* 写邮件页面 - 增强版 */
.compose-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 2px solid #4a6fa5;
}

.compose-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4a6fa5;
}

.compose-header h2 {
    color: #4a6fa5;
    margin: 0;
}

.compose-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
}

.form-section h3 {
    color: #4a6fa5;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.schedule-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.schedule-option {
    flex: 1;
}

.schedule-option input[type="radio"] {
    display: none;
}

.schedule-option label {
    display: block;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.schedule-option input[type="radio"]:checked + label {
    background: #4a6fa5;
    color: white;
    border-color: #4a6fa5;
}

.schedule-datetime {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

/* 管理页面 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #dee2e6;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4a6fa5;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
}

/* 404页面 */
.page-404 {
    text-align: center;
    padding: 4rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-404 h1 {
    font-size: 6rem;
    color: #4a6fa5;
    margin-bottom: 1rem;
}

.page-404 p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* 页脚 */
footer {
    background: white;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

footer p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .steps {
        gap: 2rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .email-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .email-time {
        align-self: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .schedule-options {
        flex-direction: column;
    }
    
    .email-actions {
        flex-wrap: wrap;
    }
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4a6fa5;
    color: #4a6fa5;
}

.btn-outline:hover {
    background: #4a6fa5;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

/* 输入框组样式 */
.input-group {
    display: flex;
    margin-bottom: 1rem;
}

.input-group input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append {
    display: flex;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.card-header h3 {
    margin: 0;
    color: #4a6fa5;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
}

.badge-primary {
    background: #4a6fa5;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-info {
    background: #17a2b8;
    color: white;
}
