/* ===== TempMail Styles ===== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --accent: #00CEC9;
    --danger: #FF6B6B;
    --danger-dark: #EE5A5A;
    --bg: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-hover: #222240;
    --text: #E8E8F0;
    --text-muted: #8888AA;
    --border: #2A2A45;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent);
}

.logo small {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-light);
}

/* Hero */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Email Generator */
.email-generator {
    position: relative;
    margin-bottom: 30px;
}

.email-display {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.email-address-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.email-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    word-break: break-all;
}

.email-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.timer {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timer.warning {
    color: var(--danger);
    font-weight: 600;
}

.email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.15);
}

.btn-back {
    margin-bottom: 20px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

/* Inbox */
.inbox-section {
    text-align: left;
    animation: fadeIn 0.3s ease;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.inbox-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateX(4px);
}

.email-item-info {
    flex: 1;
    min-width: 0;
}

.email-item-sender {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-subject {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    margin-left: 16px;
}

.email-item-actions {
    margin-left: 12px;
}

.empty-inbox {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-inbox i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--border);
}

.empty-inbox p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-inbox small {
    font-size: 0.85rem;
}

/* Email View */
.email-view {
    padding: 30px 0;
}

.email-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.email-header-info {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.email-header-info h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.email-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.email-body-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.email-body {
    padding: 24px;
    min-height: 200px;
    overflow-x: auto;
}

.email-body iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    background: white;
    border-radius: 8px;
}

/* How Section */
.how-section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.how-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 24px;
}

.step {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.2s;
}

.step:hover {
    transform: translateY(-4px);
}

.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .email-text {
        font-size: 1rem;
    }

    .email-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .email-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 1rem;
    }

    .email-detail {
        flex-direction: column;
        gap: 6px;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .header .container {
        flex-direction: column;
        gap: 10px;
    }
}
