:root {
    --primary-bg: #2b343b;      /* Dark Header Background  0c161e */
    --secondary-bg: #354048;    /* Slightly lighter dark for Navbar */
    --accent-color: #00bfa5;    /* Teal/Green Accent */
    --accent-hover: #009688;
    --text-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #777777;
    --bg-light: #f4f6f7;        /* Main body background */
    --border-color: #e0e0e0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* NAVBAR */
.navbar {
    background-color: var(--secondary-bg);
    color: var(--text-white);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    height: 28px;
    margin-right: 10px;
    fill: var(--accent-color);
}

.nav-links a {
    color: #b0bec5;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
}

/* HERO SECTION */
.hero {
    background-color: var(--primary-bg);
    padding: 60px 0 80px;
    text-align: center;
    color: var(--text-white);
}

.email-box-wrapper {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto 20px;
    backdrop-filter: blur(5px);
}

/* Email Input Area */
.email-input-container {
    display: flex;
    background: #fff;
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

#address-display {
    flex: 1;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    color: #444;
    outline: none;
    background: transparent;
    font-family: monospace; /* Looks more like technical data */
    font-weight: bold;
}

.copy-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
}

.copy-btn:hover {
    background-color: var(--accent-hover);
}

/* Action Buttons Row */
.actions-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: all 0.3s;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: currentColor;
}

.action-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.action-btn.delete:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #ff8a80;
    border-color: #ff8a80;
}

.expiry-text {
    font-size: 14px;
    color: #90a4ae;
    margin-top: 10px;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-top: -40px; /* Overlap effect */
    padding-bottom: 60px;
}

.main-content-maring-0 {
    margin-top: 0;
}

/* INBOX */
.inbox-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 40px;
    min-height: 300px;
}

.inbox-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.inbox-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    fill: var(--text-muted);
}

.refresh-hint {
    font-size: 12px;
    color: #999;
    animation: blink 2s infinite;
}

@keyframes blink { 50% { opacity: 0.5; } }

/* Inbox List */
.inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.empty-state {
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Email Items (When added by JS) */
.email-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
}
.email-item:hover { background: #f9f9f9; }
.email-sender { font-weight: bold; color: #333; }
.email-subject { color: #555; }
.email-body { display: none; padding: 20px; background: #fafafa; border-bottom: 1px solid #ddd; }
.email-item.open .email-body { display: block; }

/* INFO GRID (SEO Text) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.info-card h3 {
    color: var(--primary-bg);
    margin-top: 0;
    font-size: 18px;
}

.info-card p, .info-card li {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

/* FOOTER */
footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .email-input-container {
        flex-direction: column;
        border-radius: 8px;
        background: transparent;
        box-shadow: none;
    }
    #address-display {
        background: white;
        border-radius: 4px;
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* --- Content Page Styles (About, Terms, Privacy, Contact) --- */

/* The white card container */
.legal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Soft premium shadow */
    max-width: 800px; /* Optimal reading width */
    margin: 0 auto; /* Center the card */
    color: #4a5568; /* Soft dark gray, easier to read than black */
}

/* Typography */
.legal-content h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0; /* Subtle divider line */
}

.legal-content h2:first-child {
    margin-top: 0; /* Remove space for the first title */
}

.legal-content p {
    font-size: 1rem;
    line-height: 1.7; /* Makes large blocks of text readable */
    margin-bottom: 20px;
}

/* Styled Lists */
.legal-content ul {
    background-color: #f8fafc; /* Very light gray background */
    border-radius: 8px;
    padding: 20px 20px 20px 40px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff; /* Blue accent bar on the left */
}

.legal-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legal-content li:last-child {
    margin-bottom: 0;
}

/* Links and Emails */
.highlight-link {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.highlight-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Contact Page Specific */
.contact-highlight {
    font-size: 1.1rem;
    background: #e6f2ff;
    color: #0066cc;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-content {
        padding: 25px;
    }
}

/* --- Blog Section Styles --- */

.blog-header {
    text-align: center;
    padding: 50px 0 30px;
}

.blog-header h1 {
    color: #2d3748;
    font-size: 2.5rem;
}

/* The Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); /* Creates responsive two columns */
    gap: 30px;
    padding-bottom: 60px;
}

/* The Article Card */
.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;

}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-content {
    padding: 25px;
    flex: 1; /* Takes available space */
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title:hover {
    text-decoration: underline;
}

.article-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit excerpt to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: 15px;
}

.article-thumbnail {
    width: 180px; /* Fixed width for image part */
    height: 100%;
    object-fit: cover; /* Ensures image covers area without stretching */
    border-left: 1px solid #eee;
}

/* --- Single Article Details Page Styles --- */
.single-article-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 40px auto;
}

.single-article-header h1 {
    color: #2d3748;
    margin-bottom: 10px;
}

.single-article-meta {
    color: #888;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-body {
    line-height: 1.8;
    color: #4a5568;
}

.article-body h2 {
    color: #2d3748;
    margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-grid {
         grid-template-columns: 1fr; /* 1 column on mobile */
    }
    .article-card {
        flex-direction: column-reverse; /* Image on top on mobile */
        height: auto;
    }
    .article-thumbnail {
        width: 100%;
        height: 180px;
        border-left: none;
        border-bottom: 1px solid #eee;
    }
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

/* Hide Hamburger on Desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile Styles (Tablets and Phones) */
@media screen and (max-width: 768px) {
    .navbar {
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        position: relative;
        z-index: 1000;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: #333;
        transition: all 0.3s ease-in-out;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s ease-in-out;
        padding-top: 60px;
    }

    .nav-links.active {
        right: 0;
    }

    /* SEO: Large Tap Targets for Mobile */
    .nav-links a {
        margin: 15px 0;
        font-size: 1.2rem;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- SMART TICKET STYLES (The Kill Feature) --- */

/* Base Ticket Style */
.smart-ticket {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px; /* Pill shape */
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10; /* Ensure it sits above the row click */
    white-space: nowrap;
}

.smart-ticket:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.smart-ticket:active {
    transform: translateY(1px);
}

/* OTP Variant (Green) */
.ticket-otp {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

/* Link Variant (Blue) */
.ticket-link {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
}

/* Icons inside ticket */
.ticket-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Animation for Copy Success */
.ticket-copied {
    background-color: #065f46 !important;
    color: white !important;
    border-color: #065f46 !important;
}

/* Responsive: On mobile, stack the ticket below the subject if needed */
@media (max-width: 600px) {
    .email-summary {
        flex-wrap: wrap;
    }
    .smart-ticket {
        margin-top: 5px;
        margin-left: 0;
    }
}

/* Gmail-like email body */
.email-html-wrapper {
  max-width: 800px;
  margin: auto;
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #202124;
}

/* Normalize email HTML */
.email-html-wrapper img {
  max-width: 100%;
  height: auto;
}

.email-html-wrapper table {
  max-width: 100%;
  border-collapse: collapse;
}

.email-html-wrapper a {
  color: #1a73e8;
  text-decoration: none;
}

.email-html-wrapper blockquote {
  border-left: 3px solid #dadce0;
  padding-left: 12px;
  margin: 8px 0;
  color: #555;
}

/* Prevent ugly overflow */
.email-html-wrapper * {
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Developer Mode Tabs --- */
.view-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.view-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
}

.view-tab.active {
    background-color: #e3f2fd; /* Light Blue */
    color: #0288d1; /* Dark Blue */
    font-weight: bold;
}

.view-tab:hover {
    background-color: #f5f5f5;
}

/* --- JSON Code Block --- */
.json-viewer {
    background-color: #1e1e1e; /* VS Code Dark Background */
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
}

.copy-json-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.copy-json-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}