* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f5f5dc 0%, #e8e8d0 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* 亚麻布纹理效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 119, 101, 0.03) 2px, rgba(139, 119, 101, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 119, 101, 0.03) 2px, rgba(139, 119, 101, 0.03) 4px);
    pointer-events: none;
    z-index: 1;
}

/* 底部晕染效果 */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: radial-gradient(ellipse at bottom, rgba(139, 119, 101, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    color: #5a4a3a;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: #7a6a5a;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.email-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #8b7765 0%, #6d5d4d 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9d8977 0%, #7f6f5f 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #a8956f 0%, #8d7a5a 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #baa781 0%, #9f8c6c 100%);
}

.btn-outline {
    background: transparent;
    color: #7a6a5a;
    border: 2px solid #a8956f;
}

.btn-outline:hover {
    background: rgba(168, 149, 111, 0.1);
    border-color: #8d7a5a;
}

.btn-icon {
    font-size: 1.2rem;
}

.email-info {
    margin-top: 30px;
    background: rgba(245, 245, 220, 0.5);
    padding: 25px;
    border-radius: 15px;
    animation: fadeIn 0.5s ease-out;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row label {
    font-weight: 600;
    color: #5a4a3a;
    min-width: 100px;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.email-display span {
    color: #2c5f2d;
    font-weight: 600;
    font-size: 1.1rem;
    word-break: break-all;
}

.btn-icon-small {
    background: #8b7765;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-icon-small:hover {
    background: #9d8977;
    transform: scale(1.1);
}

.email-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out;
}

.email-list {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-out;
}

.email-list h3 {
    color: #5a4a3a;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

#emailContent {
    max-height: 500px;
    overflow-y: auto;
}

.email-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #8b7765;
    transition: all 0.3s ease;
}

.email-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.email-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #5a4a3a;
}

.email-subject {
    font-size: 1.1rem;
    color: #2c5f2d;
    margin-bottom: 10px;
}

.email-body {
    color: #666;
    line-height: 1.6;
    padding: 15px;
    background: rgba(245, 245, 220, 0.3);
    border-radius: 10px;
    margin-top: 10px;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 119, 101, 0.3);
    border-top-color: #8b7765;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #5a4a3a;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    background: #2c5f2d;
}

.toast.error {
    background: #8b4545;
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #7a6a5a;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 滚动条样式 */
#emailContent::-webkit-scrollbar {
    width: 8px;
}

#emailContent::-webkit-scrollbar-track {
    background: rgba(245, 245, 220, 0.3);
    border-radius: 10px;
}

#emailContent::-webkit-scrollbar-thumb {
    background: #a8956f;
    border-radius: 10px;
}

#emailContent::-webkit-scrollbar-thumb:hover {
    background: #8d7a5a;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 25px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .email-actions {
        flex-direction: column;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-row label {
        min-width: auto;
    }
}
