* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.page {
    min-height: 100vh;
}

/* Login Page */
.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 100px auto;
}

.card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    width: 100%;
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.error-message {
    color: #ef4444;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

/* Login Progress */
.login-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

/* Header */
.header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Email List */
.email-list {
    margin-top: 20px;
}

.email-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.email-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.email-from {
    font-weight: 600;
    color: #667eea;
}

.email-date {
    color: #999;
    font-size: 14px;
}

.email-subject {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.email-preview {
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Email Detail */
.email-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.email-detail-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.email-detail-subject {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.email-detail-meta {
    display: flex;
    gap: 30px;
    color: #666;
    font-size: 14px;
}

.email-detail-body {
    line-height: 1.6;
    color: #333;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 邮件内容样式 - 支持 HTML 内容 */
.email-detail-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.email-detail-body a {
    color: #667eea;
    text-decoration: none;
}

.email-detail-body a:hover {
    text-decoration: underline;
}

.email-detail-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.email-detail-body table td,
.email-detail-body table th {
    padding: 8px;
    border: 1px solid #e0e0e0;
}

.email-detail-body button,
.email-detail-body .button,
.email-detail-body input[type="button"],
.email-detail-body input[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.email-detail-body p {
    margin: 10px 0;
}

.email-detail-body ul,
.email-detail-body ol {
    margin: 10px 0;
    padding-left: 30px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h2 {
    margin-bottom: 10px;
}
