/* ============================================
   trashbox.click - Pink Theme CSS
   ============================================ */
:root {
    /* Colors - Pink Theme */
    --bg-primary: #0f0a0c;
    --bg-secondary: #1a1215;
    --bg-tertiary: #241a1e;
    --bg-card: rgba(236, 72, 153, 0.03);
    --bg-card-hover: rgba(236, 72, 153, 0.08);
    
    --text-primary: #fdf2f8;
    --text-secondary: #f9a8d4;
    --text-muted: #9d7a8c;
    
    --accent-primary: #ec4899;
    --accent-secondary: #f472b6;
    --accent-dark: #be185d;
    --accent-gradient: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #fb7185 100%);
    
    --border-color: rgba(236, 72, 153, 0.15);
    --border-color-hover: rgba(236, 72, 153, 0.3);
    
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    
    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(236, 72, 153, 0.15);
    --shadow-glow-strong: 0 0 80px rgba(236, 72, 153, 0.25);
    
    /* Animation */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(236, 72, 153, 0.2), transparent),
        radial-gradient(ellipse 80% 50% at 100% 50%, rgba(244, 114, 182, 0.1), transparent),
        radial-gradient(ellipse 60% 50% at 0% 80%, rgba(251, 113, 133, 0.08), transparent);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   Layout
   ============================================ */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header
   ============================================ */
.header {
    padding: 32px 0 24px;
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.5));
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

/* ============================================
   Ad Containers
   ============================================ */
.ad-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 24px;
}

.ad-placeholder {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.ad-banner .ad-placeholder {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.ad-sidebar .ad-placeholder {
    width: 100%;
    height: 280px;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    padding: 20px 0 40px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

/* ============================================
   Email Generator Card
   ============================================ */
.email-generator {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.email-generator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.email-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-weight: 600;
}

.email-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.email-input-group {
    flex: 1;
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.email-input-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 18px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    outline: none;
    min-width: 0;
}

.email-input::placeholder {
    color: var(--text-muted);
}

.domain-select {
    background: var(--bg-tertiary);
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 16px 36px 16px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f9a8d4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--transition-fast);
}

.domain-select:hover {
    background-color: rgba(236, 72, 153, 0.1);
}

.domain-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.email-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
}

.email-meta svg {
    width: 16px;
    height: 16px;
    color: var(--accent-secondary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-icon {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: var(--radius-lg);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(236, 72, 153, 0.5);
}

.btn-ghost {
    background: transparent;
    border: none;
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
}

.btn-danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* ============================================
   Inbox
   ============================================ */
.inbox-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, transparent 100%);
}

.inbox-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.inbox-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.inbox-badge {
    background: var(--accent-gradient);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.inbox-list {
    min-height: 400px;
    max-height: 550px;
    overflow-y: auto;
}

.inbox-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.inbox-empty svg {
    width: 56px;
    height: 56px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.inbox-empty p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.inbox-empty span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Email Item */
.email-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.email-item:hover {
    background: var(--bg-card-hover);
}

.email-item:last-child {
    border-bottom: none;
}

.email-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.email-content {
    flex: 1;
    min-width: 0;
}

.email-from {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-subject {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.inbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.refresh-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   Email Detail Page
   ============================================ */
.email-detail-page {
    display: none;
}

.email-detail-page.active {
    display: block;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.back-btn:hover {
    color: var(--accent-primary);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.email-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.email-detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, transparent 100%);
}

.email-detail-subject {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.email-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.email-detail-meta strong {
    color: var(--text-muted);
    font-weight: 500;
}

.email-detail-body {
    padding: 28px;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 200px;
}

.email-detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: 28px 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .inbox-list {
        min-height: 350px;
        max-height: 500px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 20px 0 16px;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .tagline {
        font-size: 12px;
    }
    
    .ad-banner {
        padding: 8px 16px;
    }
    
    .ad-banner .ad-placeholder {
        height: 60px;
        font-size: 10px;
    }
    
    .email-generator {
        padding: 18px;
        border-radius: var(--radius-xl);
    }
    
    .email-label {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .email-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .email-input-group {
        flex-direction: column;
        border-radius: var(--radius-md);
    }
    
    .email-input {
        padding: 14px 16px;
        font-size: 15px;
        text-align: center;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
    
    .domain-select {
        border-left: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        padding: 14px 36px 14px 16px;
        text-align: center;
        background-position: right 16px center;
    }
    
    .action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .btn-icon {
        width: 100%;
        height: 50px;
    }
    
    .email-meta {
        justify-content: center;
        font-size: 12px;
    }
    
    .inbox-card {
        border-radius: var(--radius-lg);
    }
    
    .inbox-header {
        padding: 14px 16px;
    }
    
    .inbox-title {
        font-size: 14px;
        gap: 8px;
    }
    
    .inbox-title svg {
        width: 18px;
        height: 18px;
    }
    
    .inbox-list {
        min-height: 300px;
        max-height: 400px;
    }
    
    .email-item {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .email-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .email-from {
        font-size: 13px;
    }
    
    .email-subject {
        font-size: 12px;
    }
    
    .inbox-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
    }
    
    .inbox-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .refresh-info {
        text-align: center;
    }
    
    .inbox-empty {
        padding: 40px 20px;
    }
    
    .inbox-empty svg {
        width: 44px;
        height: 44px;
    }
    
    .inbox-empty p {
        font-size: 14px;
    }
    
    .inbox-empty span {
        font-size: 12px;
    }
    
    /* Email Detail Mobile */
    .back-btn {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .email-detail-card {
        border-radius: var(--radius-lg);
    }
    
    .email-detail-header {
        padding: 18px 16px;
    }
    
    .email-detail-subject {
        font-size: 17px;
        margin-bottom: 12px;
    }
    
    .email-detail-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
    
    .email-detail-body {
        padding: 20px 16px;
        font-size: 14px;
        min-height: 150px;
    }
    
    .email-detail-actions {
        padding: 16px;
    }
    
    .email-detail-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer {
        padding: 20px 16px;
        font-size: 11px;
    }
    
    .toast {
        left: 16px;
        right: 16px;
        transform: translateY(100px);
        text-align: center;
    }
    
    .toast.show {
        transform: translateY(0);
    }
}
