@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap'); /* Global Styles & Resets */ *, *::before, *::after { box-sizing: border-box; } :root { --primary-purple: #6d28d9; --light-purple: #8b5cf6; --dark-purple: #5b21b6; --light-grey: #f3f4f6; --medium-grey: #e5e7eb; --dark-grey: #4b5563; --text-light: #ffffff; --text-dark: #1f2937; --border-radius: 12px; --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); } body { margin: 0; font-family: 'Inter', sans-serif; background-color: #ffffff; color: var(--text-dark); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; /* Prevent horizontal scrolling */ } /* App Container */ #app { display: flex; flex-direction: column; align-items: center; min-height: 100vh; width: 100%; box-sizing: border-box; } #app-main { width: 100%; max-width: 1400px; padding: 0 2rem; margin-bottom: 2rem; } /* Header */ .app-header { width: 100%; max-width: 1400px; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; box-sizing: border-box; } .logo { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); } .nav-links a { text-decoration: none; color: var(--dark-grey); font-weight: 500; transition: color 0.3s ease; } .nav-links a:hover { color: var(--primary-purple); } /* Hero Section */ .hero-section { width: 100%; /* max-width is handled by app-main */ background-color: var(--primary-purple); color: var(--text-light); padding: 4rem 2rem; border-radius: var(--border-radius); text-align: center; margin-bottom: 2rem; box-sizing: border-box; } .hero-section h1 { font-size: 2.5rem; margin-top: 0; margin-bottom: 1rem; } .hero-section p { font-size: 1.125rem; opacity: 0.9; margin-bottom: 2rem; } .input-group { display: flex; justify-content: center; gap: 0.5rem; } .input-wrapper { position: relative; display: flex; flex: 1; max-width: 400px; } .email-input { flex: 1; /* top, right, bottom, left */ padding: 0.75rem 3rem 0.75rem 1rem; border: 1px solid transparent; border-radius: 8px; font-size: 1rem; width: 100%; } .btn-copy { position: absolute; top: 50%; right: 0.5rem; transform: translateY(-50%); background: transparent; border: none; cursor: pointer; color: var(--dark-grey); display: flex; align-items: center; justify-content: center; padding: 0.5rem; border-radius: 6px; } .btn-copy:hover { background-color: var(--medium-grey); } .btn-copy span { color: var(--primary-purple); font-weight: bold; } .email-input:focus { outline: none; border-color: var(--light-purple); } .btn { padding: 0.75rem 1.5rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.3s ease; } .btn-primary { background-color: var(--light-purple); color: var(--text-light); } .btn-primary:hover { background-color: var(--dark-purple); } .btn-secondary { background-color: rgba(255, 255, 255, 0.2); color: var(--text-light); } .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.3); } .btn-danger { background-color: #ef4444; /* a nice red */ color: var(--text-light); } .btn-danger:hover { background-color: #dc2626; /* a darker red */ } /* Inbox Section */ .inbox-section { width: 100%; /* max-width is handled by app-main */ background-color: var(--light-grey); border-radius: var(--border-radius); padding: 1.5rem; box-shadow: var(--card-shadow); box-sizing: border-box; } .inbox-container { display: flex; gap: 1.5rem; min-height: 400px; } .message-list { width: 35%; background-color: #ffffff; border: 1px solid #d1d5db; border-radius: var(--border-radius); padding: 1.5rem; box-sizing: border-box; } .message-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .message-list-header h2 { margin: 0; font-size: 1.25rem; } .header-actions { display: flex; gap: 0.5rem; } .header-actions button { background: none; border: none; cursor: pointer; color: var(--dark-grey); padding: 0.25rem; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease, color 0.3s ease; } .header-actions button:hover:not(:disabled) { background-color: var(--medium-grey); color: var(--primary-purple); } .header-actions button:disabled { color: #ccc; cursor: not-allowed; } .header-actions .el-icon { font-size: 1.25rem; } .message-item { padding: 1rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; border-left: 4px solid transparent; transition: background-color 0.3s ease, border-color 0.3s ease; } .message-item:hover { background-color: var(--medium-grey); } .message-item.selected { background-color: #ffffff; border-left-color: var(--primary-purple); } .message-item .from { font-weight: 700; word-break: break-all; } .message-item .subject { color: var(--dark-grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .message-detail { width: 65%; background-color: #ffffff; border: 1px solid #d1d5db; border-radius: var(--border-radius); padding: 1.5rem; box-sizing: border-box; } .empty-state, .loading-state { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; color: var(--dark-grey); } .message-content-header { margin-bottom: 1rem; } .message-content-header h3 { margin: 0 0 0.5rem 0; } .message-content-header p { margin: 0; color: var(--dark-grey); word-break: break-all; } .message-body { background-color: #ffffff; padding: 1rem; border-radius: 8px; border: 1px solid #d1d5db; white-space: pre-wrap; word-wrap: break-word; height: 300px; overflow-y: auto; } /* Modal Styles */ .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; } .modal-content { background-color: #ffffff; padding: 2rem; border-radius: var(--border-radius); width: 90%; max-width: 500px; box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); position: relative; } .modal-content h3 { margin-top: 0; color: var(--primary-purple); } .modal-content ol { padding-left: 1.5rem; line-height: 1.8; font-size: 1.05rem; color: var(--dark-grey); } .modal-content code { background-color: var(--light-purple); color: var(--text-light); padding: 0.3em 0.6em; border-radius: 6px; font-family: monospace; font-weight: 500; } .close-btn { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.75rem; cursor: pointer; color: var(--dark-grey); } /* Responsive */ @media (max-width: 768px) { body { -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */ } #app-main { padding: 0 1rem; } .app-header { padding: 1rem; /* Adjust padding for mobile */ /* Keep flex row layout for alignment */ display: flex; justify-content: space-between; align-items: center; } .nav-links { margin-left: 0; /* Reset margin for mobile */ } .nav-links a { margin: 0 0 0 1rem; /* Space out the links */ } .hero-section { padding: 2rem 1.5rem; margin-bottom: 1.5rem; text-align: center; /* Ensure content is centered on mobile */ } .hero-section h1 { font-size: 1.8rem; } .hero-section p { font-size: 1rem; } .input-group { flex-direction: column; align-items: stretch; gap: 0.75rem; } .email-input { max-width: none; /* Remove max-width on mobile */ } .inbox-section { min-width: 0; /* Reset min-width */ padding: 1rem; } .inbox-container { flex-direction: column; min-height: auto; gap: 1rem; } .message-list, .message-detail { width: 100%; border-right: none; padding-right: 0; } .message-list { border-bottom: 1px solid var(--medium-grey); padding-bottom: 1rem; } .message-detail .empty-state { padding: 2rem 0; } .message-body { height: auto; /* Adjust height for mobile */ max-height: 400px; } .modal-content { width: 95%; padding: 1.5rem; } } /* 方案二优化版:现代渐变风格 */ ::-webkit-scrollbar { width: 8px; /* 保持一个舒适的宽度 */ height: 8px; } ::-webkit-scrollbar-track { background: var(--light-grey); /* 轨道颜色与背景融为一体 */ } ::-webkit-scrollbar-thumb { background: linear-gradient(45deg, var(--light-purple), var(--primary-purple)); /* 调整渐变角度 */ border-radius: 4px; /* 圆角调整为一半的宽度 */ border: 2px solid var(--light-grey); /* 使用轨道颜色作为边框,营造内边距效果 */ } ::-webkit-scrollbar-thumb:hover { background: linear-gradient(45deg, var(--primary-purple), var(--dark-purple)); /* 悬停时加深渐变 */ }