:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary: #00cec9;
    --dark: #2d3436;
    --light: #f5f6fa;
    --gray: #636e72;
    --success: #00b894;
    --warning: #fdcb6e;
    --error: #d63031;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(108, 92, 231, 0.15);
    bottom: -160px;
    border-radius: 50%;
    animation: square 25s infinite;
    transition-timing-function: linear;
}

.bg-bubbles li:nth-child(1) {
    left: 10%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
    animation-duration: 17s;
}

.bg-bubbles li:nth-child(2) {
    left: 20%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bg-bubbles li:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
}

.bg-bubbles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.bg-bubbles li:nth-child(5) {
    left: 70%;
    animation-delay: 0s;
}

.bg-bubbles li:nth-child(6) {
    left: 80%;
    width: 120px;
    height: 120px;
    animation-delay: 3s;
}

.bg-bubbles li:nth-child(7) {
    left: 32%;
    width: 30px;
    height: 30px;
    animation-delay: 7s;
}

.bg-bubbles li:nth-child(8) {
    left: 55%;
    width: 20px;
    height: 20px;
    animation-delay: 15s;
    animation-duration: 20s;
}

.bg-bubbles li:nth-child(9) {
    left: 25%;
    width: 10px;
    height: 10px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bg-bubbles li:nth-child(10) {
    left: 90%;
    width: 50px;
    height: 50px;
    animation-delay: 11s;
}

@keyframes square {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.8s ease-out;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-radius: 22px;
    pointer-events: none;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 120px at var(--mouse-x) var(--mouse-y),
        rgba(108, 92, 231, 0.08),
        transparent 80%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.card:hover::before {
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.2);
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    box-shadow: 
        inset 0 0 15px rgba(108, 92, 231, 0.05),
        0 5px 20px rgba(0, 0, 0, 0.1);
}

.email-section,
.inbox-section,
.email-detail,
.confirm-content,
.api-content,
.settings-content,
.send-content {
    position: relative;
    overflow: hidden;
}

.email-section::before,
.inbox-section::before,
.email-detail::before,
.confirm-content::before,
.api-content::before,
.settings-content::before,
.send-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.email-section::after,
.inbox-section::after,
.email-detail::after,
.confirm-content::after,
.api-content::after,
.settings-content::after,
.send-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 120px at var(--mouse-x) var(--mouse-y),
        rgba(108, 92, 231, 0.08),
        transparent 80%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.email-section:hover::before,
.inbox-section:hover::before,
.email-detail:hover::before,
.confirm-content:hover::before,
.api-content:hover::before,
.settings-content:hover::before,
.send-content:hover::before {
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.2);
}

.email-section:hover::after,
.inbox-section:hover::after,
.email-detail:hover::after,
.confirm-content:hover::after,
.api-content:hover::after,
.settings-content:hover::after,
.send-content:hover::after {
    opacity: 1;
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: pulse 8s infinite alternate;
}

.header::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: pulse 12s infinite alternate;
}

.title-with-version {
    position: relative;
    display: inline-block;
    padding-right: 140px;
    font-size: 1.8rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: slideInDown 0.6s ease-out;
}

.version {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 0.6em;
    color: rgba(255,255,255,0.7);
    font-weight: normal;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease-out;
}

.main-content {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.left-panel {
    flex: 1;
    min-width: 0;
}

.right-panel {
    flex: 1;
    min-width: 0;
}

.email-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    height: calc(100% - 30px);
}

.email-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.email-display {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--light);
    padding: 15px 25px;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    position: relative;
    transition: all 0.3s ease;
}

.email-display:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-light);
}

.email-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(108, 92, 231, 0.05);
    border-radius: 10px;
    font-size: 0.9rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
}

.stat-item i {
    color: var(--primary);
    font-size: 0.9rem;
}

.stat-item span {
    font-weight: 500;
    color: var(--dark);
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #5649c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #00b5ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 206, 201, 0.3);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(214, 48, 49, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.inbox-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
    height: calc(100% - 30px);
}

.inbox-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.inbox-title {
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
    min-width: 200px;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 8px 30px 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.9rem;
}

.email-count {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.email-count:hover {
    transform: scale(1.1);
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.email-item {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.email-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.email-item.unread {
    background: rgba(0, 206, 201, 0.1);
    border-left: 4px solid var(--secondary);
}

.email-icon {
    font-size: 1.2rem;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.email-item:hover .email-icon {
    transform: scale(1.2);
}

.email-item.unread .email-icon {
    color: var(--secondary);
}

.email-content {
    flex: 1;
    min-width: 0;
}

.email-sender {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-subject {
    color: var(--dark);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    color: var(--gray);
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: 15px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.status-bar:hover {
    background: rgba(108, 92, 231, 0.2);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    transition: all 0.3s ease;
}

.status-dot.loading {
    background: var(--warning);
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background: var(--error);
}

.status-text {
    flex: 1;
}

.email-detail {
    display: none;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    background: var(--light);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
    grid-column: 1 / -1;
}

.email-detail-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.email-detail-subject {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.email-detail-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.sender-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-detail:hover .sender-avatar {
    transform: rotate(360deg);
}

.sender-details {
    display: flex;
    flex-direction: column;
}

.sender-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.sender-email {
    color: var(--gray);
    font-size: 0.85rem;
}

.email-received {
    color: var(--gray);
    font-size: 0.85rem;
}

.email-detail-body {
    line-height: 1.7;
    color: var(--dark);
    padding: 15px 0;
    white-space: pre-wrap;
    font-size: 0.95rem;
    animation: fadeIn 0.8s ease-out;
}

.email-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.close-detail {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.close-detail:hover {
    background: #5649c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.3);
}

.empty-inbox {
    text-align: center;
    padding: 30px;
    color: var(--gray);
    font-size: 0.95rem;
    animation: fadeIn 1s ease-out;
}

.empty-inbox i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
    opacity: 0.7;
    transition: all 0.5s ease;
}

.empty-inbox:hover i {
    transform: scale(1.2);
    color: var(--primary-light);
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.loader {
    display: none;
    width: 25px;
    height: 25px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.loading .loader {
    display: block;
}

.error-message {
    background: rgba(214, 48, 49, 0.1);
    color: var(--error);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
    font-size: 0.9rem;
    animation: shake 0.5s ease-out;
}

.success-message {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
    font-size: 0.9rem;
    animation: bounceIn 0.6s ease-out;
}

.confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.confirm-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.api-btn, .send-btn {
    position: absolute;
    top: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    white-space: nowrap;
}

.api-btn {
    left: 20px;
}

.send-btn {
    right: 140px;
}

.new-badge {
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    animation: pulse 1.5s infinite;
}

.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.api-btn:hover, .send-btn:hover, .settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.api-dialog, .send-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.api-content, .send-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
    position: relative;
}

.api-content h3, .send-content h3 {
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-info {
    line-height: 1.7;
    margin-bottom: 20px;
}

.api-info h4 {
    color: var(--primary);
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.api-info h5 {
    color: var(--dark);
    margin: 15px 0 8px 0;
    font-size: 1rem;
}

.api-info p {
    margin-bottom: 10px;
    color: var(--gray);
}

.api-info ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.api-info li {
    margin-bottom: 8px;
    color: var(--gray);
}

.api-info code, .api-info pre code {
    background: rgba(108, 92, 231, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--dark);
}

.api-info pre {
    background: rgba(108, 92, 231, 0.05);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.api-info a {
    color: var(--primary);
    text-decoration: none;
}

.api-info a:hover {
    text-decoration: underline;
}

#close-api-dialog {
    display: block;
    margin: 0 auto;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--light);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.form-text {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 0.85rem;
}

.code-input-group {
    display: flex;
    gap: 10px;
}

.code-input-group .form-control {
    flex: 1;
}

.code-input-group .btn {
    white-space: nowrap;
}

.use-current-email-btn {
    margin-top: 8px;
    width: 100%;
}

.send-preview {
    margin-top: 25px;
    padding: 15px;
    background: rgba(108, 92, 231, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.send-preview h4 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.preview-content p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.preview-content strong {
    color: var(--dark);
    margin-right: 5px;
}

.preview-content code {
    background: rgba(108, 92, 231, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}

.send-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.settings-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.settings-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
    position: relative;
}

.settings-content h3 {
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gray);
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--primary);
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.tab-content {
    display: none;
    padding: 10px 0;
}

.tab-content.active {
    display: block;
}

.setting-option {
    margin-bottom: 25px;
}

.setting-option h4 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 1rem;
}

.setting-option p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.theme-colors {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--dark);
    transform: scale(1.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: var(--dark);
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* 深色模式样式 */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .card,
body.dark-mode .email-section,
body.dark-mode .inbox-section,
body.dark-mode .email-detail,
body.dark-mode .confirm-content,
body.dark-mode .api-content,
body.dark-mode .settings-content,
body.dark-mode .send-content {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .email-display,
body.dark-mode .email-item,
body.dark-mode .status-bar,
body.dark-mode .email-detail-body,
body.dark-mode .email-stats,
body.dark-mode .form-control,
body.dark-mode .send-preview {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .email-sender,
body.dark-mode .email-subject,
body.dark-mode .email-detail-subject,
body.dark-mode .sender-name,
body.dark-mode .setting-option h4,
body.dark-mode .stat-item span,
body.dark-mode .form-group label,
body.dark-mode .send-preview h4,
body.dark-mode .preview-content strong,
body.dark-mode .api-info h4,
body.dark-mode .api-info h5 {
    color: #e0e0e0;
}

body.dark-mode .email-time,
body.dark-mode .sender-email,
body.dark-mode .email-received,
body.dark-mode .setting-option p,
body.dark-mode .stat-item,
body.dark-mode .form-text,
body.dark-mode .preview-content,
body.dark-mode .api-info p,
body.dark-mode .api-info li {
    color: #b0b0b0;
}

body.dark-mode .header {
    background: linear-gradient(135deg, #4a3dc0, #7a6ffc);
}

body.dark-mode .empty-inbox {
    color: #b0b0b0;
}

body.dark-mode .empty-inbox i {
    color: #3d3d3d;
}

body.dark-mode .empty-inbox:hover i {
    color: #7a6ffc;
}

body.dark-mode select,
body.dark-mode .search-box input {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #3d3d3d;
}

body.dark-mode .search-box i {
    color: #b0b0b0;
}

body.dark-mode .form-control {
    border-color: #3d3d3d;
}

body.dark-mode .send-preview {
    border-color: #3d3d3d;
    background: #2a2a2a;
}

body.dark-mode .api-info code,
body.dark-mode .api-info pre,
body.dark-mode .api-info pre code {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #3d3d3d;
}

body.dark-mode .color-option.active {
    border-color: #e0e0e0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 响应式设计 */
@media (min-width: 1200px) {
    .header {
        padding: 30px;
    }
    
    .api-btn {
        left: 30px;
    }
    
    .send-btn {
        right: 160px;
    }
    
    .settings-btn {
        right: 30px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .content-wrapper {
        flex-direction: row;
        gap: 20px;
    }
    
    .email-section {
        margin-bottom: 0;
        height: 100%;
    }
    
    .inbox-section {
        height: 100%;
    }
    
    .email-list {
        max-height: 300px;
    }
    
    .header {
        padding: 25px;
    }
    
    .api-btn {
        left: 25px;
    }
    
    .send-btn {
        right: 130px;
    }
    
    .settings-btn {
        right: 25px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .content-wrapper {
        flex-direction: row;
        gap: 20px;
    }
    
    .email-section {
        margin-bottom: 0;
        height: 100%;
    }
    
    .inbox-section {
        height: 100%;
    }
    
    .email-list {
        max-height: 250px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .title-with-version {
        font-size: 1.5rem;
        padding-right: 120px;
    }
    
    .api-btn, .send-btn, .settings-btn {
        top: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .api-btn {
        left: 15px;
    }
    
    .send-btn {
        right: 100px;
    }
    
    .settings-btn {
        right: 15px;
    }
    
    .email-display {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
    
    .actions {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .header {
        padding: 25px 15px;
    }
    
    .title-with-version {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 5px;
        padding-right: 0;
    }
    
    .version {
        position: static;
        margin-top: 5px;
    }
    
    .header-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
        flex-wrap: wrap;
    }
    
    .api-btn, .send-btn, .settings-btn {
        position: static;
        margin: 0;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .email-display {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .email-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .email-received {
        width: 100%;
        text-align: right;
    }
    
    .email-list {
        max-height: 300px;
    }
    
    .email-section, .inbox-section {
        padding: 15px;
    }
    
    .inbox-title {
        font-size: 1.1rem;
    }
    
    .email-detail-subject {
        font-size: 1.1rem;
    }
    
    .api-content, .settings-content, .send-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .search-box {
        width: 100%;
        margin-top: 10px;
        max-width: 100%;
    }
    
    .email-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .code-input-group {
        flex-direction: column;
    }
    
    .code-input-group .btn {
        width: 100%;
        margin-top: 5px;
    }
    
    .settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .send-actions, .settings-actions {
        flex-direction: column;
    }
    
    .send-actions .btn, .settings-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .header {
        padding: 20px 10px;
    }
    
    .title-with-version {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 5px;
        padding-right: 0;
    }
    
    .version {
        position: static;
        margin-top: 5px;
        font-size: 0.7em;
    }
    
    .header p {
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    .header-buttons {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
        flex-wrap: wrap;
    }
    
    .api-btn, .send-btn, .settings-btn {
        position: static;
        margin: 0;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .new-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .email-display {
        font-size: 1rem;
        padding: 10px 15px;
    }
    
    .actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .email-detail-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .email-received {
        width: 100%;
        text-align: right;
        font-size: 0.8rem;
    }
    
    .email-list {
        max-height: 250px;
    }
    
    .email-section, .inbox-section {
        padding: 12px;
    }
    
    .inbox-title {
        font-size: 1rem;
    }
    
    .email-detail-subject {
        font-size: 1.1rem;
    }
    
    .api-content, .settings-content, .send-content {
        padding: 15px 10px;
        max-width: 95%;
        max-height: 90vh;
    }
    
    .search-box {
        width: 100%;
        margin-top: 10px;
        max-width: 100%;
    }
    
    .email-stats {
        flex-direction: column;
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .code-input-group {
        flex-direction: column;
    }
    
    .code-input-group .btn {
        width: 100%;
        margin-top: 5px;
    }
    
    .settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .send-actions, .settings-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-actions .btn, .settings-actions .btn {
        width: 100%;
    }
    
    .theme-colors {
        justify-content: center;
        gap: 10px;
    }
    
    .color-option {
        width: 35px;
        height: 35px;
    }
    
    /* 移动端边框优化 */
    .card::before,
    .email-section::before,
    .inbox-section::before,
    .email-detail::before,
    .confirm-content::before,
    .api-content::before,
    .settings-content::before,
    .send-content::before {
        border-width: 1px;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
    }
    
    .card:hover::before,
    .email-section:hover::before,
    .inbox-section:hover::before,
    .email-detail:hover::before,
    .confirm-content:hover::before,
    .api-content:hover::before,
    .settings-content:hover::before,
    .send-content:hover::before {
        box-shadow: 0 0 8px rgba(108, 92, 231, 0.15);
    }
    
    /* 移动端触摸优化 */
    .btn, .api-btn, .send-btn, .settings-btn, .tab-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .email-item {
        padding: 12px;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}