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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 300;
}

.stats-bar {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.stats-item {
    display: inline-block;
    margin: 0 1.5rem;
    text-align: center;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.version-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.email-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.email-generator {
    text-align: center;
    margin-bottom: 2rem;
}

.email-display {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #4a5568;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.email-display.has-email {
    background: #eef8ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.copy-btn {
    position: absolute;
    right: 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.copy-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.btn-refresh {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-refresh:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-debug {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-debug:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.inbox {
    margin-top: 2rem;
}

.inbox h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.loading i {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.email-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.email-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.email-subject {
    font-weight: 600;
    color: #111827;
    font-size: 1.1rem;
}

.email-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.email-from {
    color: #3b82f6;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.email-body {
    color: #4b5563;
    line-height: 1.6;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
}

.email-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-small.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-small.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-small.btn-print {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.no-emails {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.no-emails i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fefbf2;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 1rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.debug-info {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}

.debug-info pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 0.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.raw-email-content {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .email-card {
        padding: 1.5rem;
    }
    
    .email-header {
        flex-direction: column;
        align-items: start;
    }
    
    .stats-bar {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-item {
        margin: 0.5rem;
        display: block;
        margin-bottom: 1rem;
    }
    
    .stats-item:last-child {
        margin-bottom: 0;
    }
    
    .version-info {
        position: static;
        display: block;
        text-align: center;
        margin-bottom: 1rem;
        border-radius: 10px;
    }
} 