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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #f5f5f5;
}

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

/* 头部样式 */
.header {
	text-align: center;
	margin-bottom: 30px;
	padding: 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	font-weight: 700;
}

.header p {
	font-size: 1.1rem;
	opacity: 0.9;
}

/* 主内容区域 */
.main-content {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 30px;
	min-height: 600px;
}

/* 左侧面板 */
.left-panel {
	background: white;
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	height: fit-content;
}

.email-generator h2 {
	margin-bottom: 20px;
	color: #333;
	font-size: 1.5rem;
}

.email-display {
	margin-bottom: 20px;
}

.email-input-group {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding: 12px;
	border: 2px solid #e1e5e9;
	border-radius: 6px;
	background-color: #f8f9fa;
}

.email-input-group:focus-within {
	border-color: #667eea;
}

.email-input-group input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 1rem;
	outline: none;
}

.email-separator {
	font-weight: 600;
	color: #667eea;
	font-size: 1.1rem;
}

.domain-select {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 1rem;
	outline: none;
	color: #333;
	cursor: pointer;
}

.email-display input[readonly] {
	width: 100%;
	padding: 12px;
	border: 2px solid #e1e5e9;
	border-radius: 6px;
	font-size: 1rem;
	margin-bottom: 10px;
	background-color: #f8f9fa;
}

.email-display input[readonly]:focus {
	outline: none;
	border-color: #667eea;
}

.email-input-with-copy {
	position: relative;
	display: flex;
	align-items: center;
}

.email-input-with-copy input {
	flex: 1;
	padding-right: 40px;
}

.copy-btn {
	position: absolute;
	right: 8px;
	top: 40%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	color: #666;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.copy-btn:active {
	background-color: #e0e0e0;
}

.email-url-display {
	margin-top: 10px;
}

.email-url-display label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	color: #333;
}

.url-input-with-copy {
	position: relative;
	display: flex;
	align-items: center;
}

.url-input-with-copy input {
	width: 100%;
	padding: 8px 40px 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background-color: #f8f9fa;
	color: #666;
}

.email-actions-row {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.email-actions {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.email-info {
	background-color: #f8f9fa;
	padding: 15px;
	border-radius: 6px;
	border-left: 4px solid #667eea;
}

.email-info p {
	margin-bottom: 5px;
	font-size: 0.9rem;
	color: #666;
}

/* 右侧面板 */
.right-panel {
	background: white;
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}

.inbox-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #e1e5e9;
}

.inbox-header h2 {
	color: #333;
	font-size: 1.5rem;
}

.inbox-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

.email-count {
	background-color: #667eea;
	color: white;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

.auto-refresh-status {
	background-color: #28a745;
	color: white;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 5px;
}

.refresh-indicator {
	width: 8px;
	height: 8px;
	background-color: #fff;
	border-radius: 50%;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

.inbox-content {
	flex: 1;
	overflow-y: auto;
}

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

.inbox-empty p {
	font-size: 1.1rem;
}

/* 邮件列表 */
.inbox-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.email-item {
	background-color: #f8f9fa;
	border: 1px solid #e1e5e9;
	border-radius: 8px;
	padding: 15px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.email-item:hover {
	background-color: #e9ecef;
	border-color: #667eea;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.email-item.unread {
	background-color: #e3f2fd;
	border-color: #2196f3;
}

.email-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 8px;
}

.email-subject {
	font-weight: 600;
	color: #333;
	font-size: 1rem;
}

.email-time {
	font-size: 0.8rem;
	color: #666;
	white-space: nowrap;
}

.email-from {
	color: #667eea;
	font-size: 0.9rem;
	margin-bottom: 5px;
}

.email-preview {
	color: #666;
	font-size: 0.9rem;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.email-attachments {
	margin-top: 8px;
}

.attachment-badge {
	display: inline-block;
	background-color: #ff9800;
	color: white;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.7rem;
	margin-right: 5px;
}

/* 按钮样式 */
.btn {
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
	background-color: #5a6fd8;
	transform: translateY(-1px);
}

.btn-secondary {
	background-color: #6c757d;
	color: white;
}

.btn-secondary:hover:not(:disabled) {
	background-color: #5a6268;
	transform: translateY(-1px);
}

.btn-danger {
	background-color: #dc3545;
	color: white;
	padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.btn-danger:hover:not(:disabled) {
	background-color: #c82333;
	transform: translateY(-1px);
}

/* 模态框样式 */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-content {
	background: white;
	border-radius: 10px;
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	background-color: #f8f9fa;
	border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
	margin: 0;
	color: #333;
}

.close-btn {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-btn:hover {
	color: #333;
}

.modal-body {
	padding: 20px;
	max-height: 60vh;
	overflow-y: auto;
}

.email-details {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.email-meta {
	background-color: #f8f9fa;
	padding: 15px;
	border-radius: 6px;
}

.email-meta p {
	margin-bottom: 8px;
}

.email-content {
	border: 1px solid #e1e5e9;
	border-radius: 6px;
	padding: 20px;
	background-color: white;
}

/* 刷新图标按钮样式 */
.refresh-icon-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	color: #666;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 8px;
	vertical-align: middle;
}

.refresh-icon-btn:hover {
	background-color: #f0f0f0;
	color: #333;
}

.refresh-icon-btn:active {
	background-color: #e0e0e0;
}

.refresh-icon-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.refresh-icon-btn:disabled:hover {
	background-color: transparent;
	color: #666;
}

/* 旋转动画 */
.refresh-icon-btn.rotating svg {
	animation: rotate 1s linear infinite !important;
	transform-origin: center !important;
}

.refresh-icon-btn.rotating {
	pointer-events: none;
}

@keyframes rotate {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* 响应式设计 */
@media (max-width: 768px) {
	.main-content {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.container {
		padding: 10px;
	}
	
	.header h1 {
		font-size: 2rem;
	}
	
	.left-panel,
	.right-panel {
		padding: 20px;
	}
	
	.email-actions {
		flex-direction: column;
	}
	
	.email-actions-row {
		flex-direction: column;
	}
	
	.email-input-group {
		flex-direction: column;
		gap: 5px;
	}
	
	.email-separator {
		display: none;
	}
	
	.inbox-controls {
		flex-direction: column;
		gap: 10px;
		align-items: stretch;
	}
	
	.modal-content {
		width: 95%;
		margin: 10px;
	}
}

/* 加载动画 */
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* 滚动条样式 */
.inbox-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
	width: 6px;
}

.inbox-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.inbox-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.inbox-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}
	