/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

/* ==================== ANIMATED GRADIENT BACKGROUND ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ==================== ADVANCED PARTICLE SYSTEM ==================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.particle:nth-child(even) {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, rgba(139, 92, 246, 0) 70%);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 4s; animation-duration: 20s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: 3s; animation-duration: 19s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 60%; animation-delay: 5s; animation-duration: 17s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-delay: 2.5s; animation-duration: 21s; }
.particle:nth-child(8) { width: 5px; height: 5px; left: 80%; animation-delay: 4.5s; animation-duration: 15s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-delay: 1.5s; animation-duration: 18s; }
.particle:nth-child(10) { width: 6px; height: 6px; left: 15%; animation-delay: 3.5s; animation-duration: 20s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        transform: translateY(75vh) translateX(30px) rotate(90deg) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(50vh) translateX(-20px) rotate(180deg) scale(1.5);
        opacity: 1;
    }
    75% {
        transform: translateY(25vh) translateX(50px) rotate(270deg) scale(1);
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20vh) translateX(-30px) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* ==================== CONTAINER ==================== */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: 100vh;
}

/* ==================== PREMIUM HEADER ==================== */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.logo-container::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    filter: blur(30px);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.logo-container i {
    font-size: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.5));
    position: relative;
    z-index: 1;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== PREMIUM SEARCH SECTION ==================== */
.search-section {
    margin-bottom: 3rem;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.search-card {
    background: var(--glass);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 30px 90px rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(99, 102, 241, 0.1),
        transparent 30%
    );
    animation: rotateGlow 6s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-card.focused {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(99, 102, 241, 0.5) inset,
        0 40px 120px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.search-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

#emailInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem 1.8rem;
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

#emailInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#emailInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        0 10px 30px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.check-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.check-btn:hover::before {
    width: 400px;
    height: 400px;
}

.check-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-loader {
    display: none;
}

.check-btn.loading .btn-text {
    display: none;
}

.check-btn.loading .btn-loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.allowed-domains {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.allowed-domains i {
    color: var(--success);
    font-size: 1.2rem;
    animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== STATUS MESSAGE ==================== */
.status-message {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    animation: slideInFromLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.status-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    animation: heightGrow 0.5s ease-out;
}

@keyframes heightGrow {
    from { height: 0; }
    to { height: 100%; }
}

.status-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #fecaca;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

.status-message.error::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.status-message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #a7f3d0;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.status-message.success::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.status-message i {
    font-size: 1.5rem;
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== LOADING INDICATOR ==================== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    animation: fadeIn 0.4s ease-out;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.15);
    border-top: 5px solid #ffffff;
    border-right: 5px solid rgba(102, 126, 234, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.loading-indicator p {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ==================== RESULTS SECTION ==================== */
.results-section {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.results-header {
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
}

.results-header h2 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconRotate 3s ease-in-out infinite;
}

@keyframes iconRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.results-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    font-weight: 500;
}

.results-header strong {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ==================== EMAIL LIST ==================== */
.email-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
}

.email-card {
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.email-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(102, 126, 234, 0.5) inset,
        0 0 50px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.email-card:hover::before {
    opacity: 1;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.email-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 0 0 4px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.email-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent 30%
    );
    animation: iconRotate 3s linear infinite;
}

.email-card:hover .email-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.6),
        0 0 0 6px rgba(102, 126, 234, 0.3);
}

@keyframes iconRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.email-info {
    flex: 1;
    min-width: 0;
}

.email-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    color: var(--white);
    font-weight: 700;
    line-height: 1.4;
    word-wrap: break-word;
}

.email-from {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

.email-from i {
    color: rgba(102, 126, 234, 0.8);
}

.email-card-body {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.email-preview {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid;
    border-image: linear-gradient(180deg, #667eea 0%, #764ba2 100%) 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.email-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.email-meta span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.email-meta i {
    color: rgba(102, 126, 234, 0.8);
}

.html-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
    }
}

.email-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-view::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-view:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.btn-view:hover::before {
    width: 300px;
    height: 300px;
}

.btn-view:active {
    transform: translateY(-1px) scale(1.02);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    max-width: 900px;
    width: 92%;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    pointer-events: none;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.3);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.4rem;
    color: #fecaca;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
    position: relative;
    z-index: 1;
}

.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin: 10px 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #818cf8 0%, #8b5cf6 100%);
}

.email-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    animation: slideInLeft 0.4s ease-out backwards;
}

.detail-row:nth-child(1) { animation-delay: 0.05s; }
.detail-row:nth-child(2) { animation-delay: 0.1s; }
.detail-row:nth-child(3) { animation-delay: 0.15s; }
.detail-row:nth-child(4) { animation-delay: 0.2s; }
.detail-row:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.detail-row strong {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.detail-row span {
    color: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    word-break: break-word;
    font-weight: 500;
}

.message-label {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    animation: slideInLeft 0.4s ease-out 0.3s backwards;
}

.message-label strong {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.html-badge-modal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    margin-bottom: 0.5rem;
    animation: slideInLeft 0.4s ease-out 0.35s backwards;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    animation: slideInLeft 0.4s ease-out 0.4s backwards;
}

.detail-body pre {
    color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.plain-text-message {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-body-html {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideInLeft 0.4s ease-out 0.4s backwards;
}

.html-render {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    background: white;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.html-render iframe {
    display: block;
}

.html-actions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-action {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 1rem 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-action:hover::before {
    width: 300px;
    height: 300px;
}

.btn-action i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.btn-action span {
    position: relative;
    z-index: 1;
}

.html-source-code {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 16px;
    padding: 2rem;
    max-height: 550px;
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) inset;
}

.html-source-code code {
    color: #a5f3fc;
    font-size: 0.9rem;
    line-height: 1.7;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.modal-footer {
    padding: 2rem 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ==================== SHAKE ANIMATION ==================== */
.shake {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-12px); }
    20%, 40%, 60%, 80% { transform: translateX(12px); }
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    margin-top: 5rem;
    padding: 2.5rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.6), transparent);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .email-list {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .logo-container i {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .search-card {
        flex-direction: column;
        padding: 2rem 1.5rem;
    }
    
    #emailInput {
        width: 100%;
    }
    
    .check-btn {
        width: 100%;
        padding: 1.2rem 2rem;
    }
    
    .email-list {
        grid-template-columns: 1fr;
    }
    
    .email-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 92vh;
        border-radius: 24px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
    
    .html-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    
    .html-render iframe {
        min-height: 400px !important;
    }
    
    .results-header h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .header {
        margin-bottom: 3rem;
    }
    
    .logo-container i {
        font-size: 2.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .results-header {
        padding: 1.5rem;
    }
    
    .results-header h2 {
        font-size: 1.4rem;
    }
    
    .email-card {
        padding: 1.5rem;
    }
    
    .email-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .email-info h4 {
        font-size: 1.1rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .close-btn {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .bg-animation,
    .search-section,
    .footer,
    .check-btn,
    .btn-view,
    .btn-action,
    .close-btn,
    .particle {
        display: none !important;
    }
    
    body::before {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
    }
    
    .email-card,
    .modal-content {
        break-inside: avoid;
        border: 1px solid #ddd;
    }
}

/* ==================== UTILITY ANIMATIONS ==================== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    }
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid rgba(10, 14, 39, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #818cf8 0%, #8b5cf6 100%);
}