/* Reset and Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --secondary: #1f2937;
    --text: #374151;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-gray: #f9fafb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gray);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 48px 0;
    text-align: center;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Step Section */
.step-section {
    margin-bottom: 40px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
}

/* Addresses Box */
.addresses-box {
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.addresses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.addresses-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.addresses-list {
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: var(--text);
    line-height: 1.8;
    word-break: break-all;
}

.copy-success {
    display: none;
    padding: 12px 20px;
    background: #ecfdf5;
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
}

.copy-success.show {
    display: block;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 24px;
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-gray);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* Accounts Grid */
.accounts-grid {
    display: grid;
    gap: 20px;
}

/* Account Card */
.account-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.account-header:hover {
    background: var(--border);
}

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

.account-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.account-details h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2px;
}

.account-details span {
    font-size: 12px;
    color: var(--text-muted);
}

.account-toggle {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.account-toggle.open {
    transform: rotate(180deg);
}

.account-emails {
    display: none;
    padding: 0;
}

.account-emails.open {
    display: block;
}

.no-emails {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Email Item - NOT CLICKABLE */
.email-item {
    display: grid;
    grid-template-columns: 200px 1fr 120px;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.email-item:last-child {
    border-bottom: none;
}

.email-sender {
    min-width: 0;
}

.email-from {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-address {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.email-subject {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.email-preview {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.email-time {
    font-size: 12px;
    color: var(--text-muted);
}

.email-category {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.category-inbox {
    background: #ecfdf5;
    color: var(--success);
}

.category-spam {
    background: #fef2f2;
    color: var(--danger);
}

.category-promotions {
    background: #fffbeb;
    color: var(--warning);
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-box {
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    text-align: center;
}

.stat-count {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-box.inbox .stat-count {
    color: var(--success);
}

.stat-box.spam .stat-count {
    color: var(--danger);
}

.stat-box.promotions .stat-count {
    color: var(--warning);
}

/* Ad Banner */
.ad-banner {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    margin-top: 40px;
}

.ad-content {
    color: white;
}

.ad-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.ad-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ad-contact {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ad-contact:hover {
    color: #f87171;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-brand .logo-text {
    color: white;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .email-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .email-meta {
        flex-direction: row;
        align-items: center;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
}