/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    background: var(--white);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    list-style: none;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Social Links */
.nav-social {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.nav-social a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-social a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Email Generator */
.email-generator {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.email-display {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.email-display input {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
}

.email-buttons {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    font-size: 1.1rem;
}

.btn-icon:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Copy Notification */
.copy-notification {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inbox Section */
.inbox-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.inbox-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
}

.inbox-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Auto Refresh Toggle */
.auto-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    display: none;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inbox Container */
.inbox-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.inbox-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.inbox-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.inbox-empty .small {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Message List */
.message-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.message-item:hover {
    background: var(--light-bg);
}

.message-item.unread {
    background: #f0f9ff;
    border-left: 3px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-from {
    font-weight: 600;
    color: var(--text-dark);
}

.message-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.message-subject {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.message-preview {
    color: var(--text-light);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.modal-btn:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.message-meta {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.message-meta p {
    margin: 0.5rem 0;
}

.message-content {
    line-height: 1.8;
}

.message-content pre {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: var(--white);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 12px;
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.step h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.step p {
    color: var(--text-light);
}

/* SEO Article Section */
.seo-article {
    padding: 4rem 0;
    background: var(--light-bg);
}

.article-wrapper {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow);
}

.article-content h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.article-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--white);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.faq-item {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.7;
}

/* User Guide */
.user-guide {
    padding: 4rem 0;
    background: var(--primary-color);
    color: var(--white);
}

.guide-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guide-box h2 {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guide-box h2 i {
    font-size: 2rem;
}

.guide-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guide-list li {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--white);
}

.guide-list strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    margin-bottom: 1rem;
}

.footer-logo p {
    color: var(--text-light);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-social h4 {
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-social {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-social {
        margin: 2rem 0 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .inbox-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .email-display {
        flex-direction: column;
    }
    
    .email-buttons {
        justify-content: center;
    }
    
    .guide-list {
        grid-template-columns: 1fr;
    }
    
    .article-wrapper {
        padding: 1.5rem;
    }
}