/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 登录页面 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: #667eea;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-info h3 {
    color: #333;
    margin-bottom: 15px;
}

.login-info ul {
    list-style: none;
}

.login-info li {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.login-info i {
    color: #4CAF50;
    margin-right: 8px;
}

/* 应用主界面 */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.app-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 首页样式 */
.sign-container {
    text-align: center;
    padding: 30px 0;
}

.time-display {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    font-weight: 500;
}

.sign-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 20px rgba(76,175,80,0.3);
    transition: transform 0.3s;
}

.sign-btn:hover {
    transform: scale(1.05);
}

.sign-btn i {
    font-size: 60px;
    margin-bottom: 10px;
}

.sign-btn span {
    font-size: 24px;
    font-weight: 600;
}

.last-sign {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.last-sign p {
    color: #666;
    margin-bottom: 5px;
}

#last-sign-time {
    color: #333;
    font-weight: 600;
    font-size: 18px;
}

.stats-container {
    margin-top: 40px;
}

.stats-container h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 邮箱页面样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    font-size: 24px;
}

.add-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.email-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.email-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.email-info {
    flex: 1;
}

.email-address {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.template-name {
    color: #666;
    font-size: 14px;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    color: #333;
    font-size: 20px;
}

.template-list {
    display: grid;
    gap: 15px;
}

.template-item {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.template-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-template-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.delete-template-btn {
    background: #ff4757;
}

.template-subject {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.template-content {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* 设置页面样式 */
.settings-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.settings-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
}

.save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    min-width: 150px;
}

.form-buttons .save-btn {
    margin-top: 0;
}

.logout-full-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

/* 底部导航 */
.app-nav {
    background: white;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 20px;
}

.close {
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0 10px;
}

.modal-form {
    padding: 20px;
}

.modal-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.modal-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    margin-top: 20px;
}

.error-message {
    color: #ff4757;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #ffeaea;
    border-radius: 5px;
    border-left: 3px solid #ff4757;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}



/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        min-height: 100vh;
    }

    .sign-btn {
        width: 150px;
        height: 150px;
    }

    .sign-btn i {
        font-size: 40px;
    }

    .sign-btn span {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }

    .app-header {
        padding: 15px;
    }

    .app-main {
        padding: 15px;
    }
}

/* SMTP配置相关样式 */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.test-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    min-width: 150px;
}





/* 响应式调整 */
@media (max-width: 768px) {
    .form-buttons {
        flex-direction: column;
    }
}
