/* Bot detection popup */

.bot-detect-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--overlay-purple-50, rgba(155, 77, 202, 0.5));
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bot-detect-popup-modal {
    background: var(--color-bg-medium, #2F2B36);
    color: var(--color-text-primary, #cccccc);
    padding: 2em 2.5em;
    border-radius: 14px;
    max-width: 420px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 2px 24px var(--overlay-black-45, rgba(0, 0, 0, 0.45));
    font-size: 1.1em;
    border: 1.5px solid var(--color-accent-purple, #9b4dca);
}

.bot-detect-popup-modal h2 {
    margin-top: 0;
    color: var(--color-accent-purple, #9b4dca);
    font-weight: 700;
    font-size: 1.6em;
}

.bot-detect-popup-modal a {
    color: var(--color-accent-purple-bright, #6c5ce7);
    text-decoration: underline;
    font-weight: 500;
}

.bot-detect-popup-modal a:hover {
    color: var(--color-accent-orange, #ca5414);
}

.bot-detect-popup-modal button {
    margin-top: 1.5em;
    font-size: 1em;
    border-radius: 6px;
    background: var(--color-accent-purple, #9b4dca);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 1px 4px var(--overlay-black-30, rgba(0, 0, 0, 0.3));
    transition: background 0.15s;
}

.bot-detect-popup-modal button:hover {
    background: var(--color-accent-purple-bright, #6c5ce7);
}

.bot-popup-no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

:root {
    /* Base colors */
    --color-bg-dark: #131516;
    --color-bg-medium: #2F2B36;
    --color-text-primary: #cccccc;
    --color-text-light: #e0e0e0;
    --color-text-dim: #888;
    --color-text-dimmer: #666;
    --color-text-gray: #999;
    --color-text-white: #ffffff;
    --color-text-white-alt: #fff;
    /* Accent colors */
    --color-accent-purple: #9b4dca;
    --color-accent-purple-alt: #9b4cda;
    --color-accent-purple-light: #b366e6;
    --color-accent-purple-bright: #6c5ce7;
    --color-accent-orange: #ca5414;
    --color-warning: #ff8c00;
    --color-danger: #e74c3c;
    --color-error: #b00;
    /* UI colors */
    --color-border-dark: #444;
    --color-button-cancel: #555;
    /* Transparent overlays */
    --overlay-white-15: rgba(255, 255, 255, 0.15);
    --overlay-white-12: rgba(255, 255, 255, 0.12);
    --overlay-white-10: rgba(255, 255, 255, 0.1);
    --overlay-white-08: rgba(255, 255, 255, 0.08);
    --overlay-white-06: rgba(255, 255, 255, 0.06);
    --overlay-white-05: rgba(255, 255, 255, 0.05);
    --overlay-white-04: rgba(255, 255, 255, 0.04);
    --overlay-white-03: rgba(255, 255, 255, 0.03);
    --overlay-white-02: rgba(255, 255, 255, 0.02);
    --overlay-black-80: rgba(0, 0, 0, 0.8);
    --overlay-black-45: rgba(0, 0, 0, 0.45);
    --overlay-black-40: rgba(0, 0, 0, 0.4);
    --overlay-black-35: rgba(0, 0, 0, 0.35);
    --overlay-black-30: rgba(0, 0, 0, 0.3);
    /* Purple overlays */
    --overlay-purple-50: rgba(155, 77, 202, 0.5);
    --overlay-purple-40: rgba(155, 77, 202, 0.4);
    --overlay-purple-35: rgba(155, 77, 202, 0.35);
    --overlay-purple-30: rgba(155, 77, 202, 0.3);
    --overlay-purple-25: rgba(155, 77, 202, 0.25);
    --overlay-purple-20: rgba(155, 77, 202, 0.2);
    --overlay-purple-15: rgba(155, 77, 202, 0.15);
    --overlay-purple-12: rgba(155, 77, 202, 0.12);
    --overlay-purple-10: rgba(155, 77, 202, 0.1);
    --overlay-purple-08: rgba(155, 77, 202, 0.08);
    --overlay-purple-04: rgba(155, 77, 202, 0.04);
    /* Warning overlay */
    --overlay-warning-10: rgba(255, 140, 0, 0.1);
}


/* Light mode theme */

hr {
    border: none;
    border-top: 0.1rem solid var(--overlay-white-15);
}

body.light-mode hr {
    border-top: 0.1rem solid var(--overlay-black-80);
}

body.light-mode {
    --color-bg-dark: #f5f5f5;
    --color-bg-medium: #e4e4e4;
    --color-text-primary: #2c2c2c;
    --color-text-light: #1a1a1a;
    --color-text-dim: #666666;
    --color-text-dimmer: #888888;
    --color-text-gray: #555555;
    --color-text-white: #2c2c2c;
    --color-text-white-alt: #2c2c2c;
    --color-text-muted: #666666;
    --color-text-secondary: #444444;
    --color-border-dark: #cccccc;
    --color-button-cancel: #aaaaaa;
    --overlay-white-15: rgba(0, 0, 0, 0.08);
    --overlay-white-12: rgba(0, 0, 0, 0.06);
    --overlay-white-10: rgba(0, 0, 0, 0.05);
    --overlay-white-08: rgba(0, 0, 0, 0.04);
    --overlay-white-06: rgba(0, 0, 0, 0.03);
    --overlay-white-05: rgba(0, 0, 0, 0.025);
    --overlay-white-04: rgba(0, 0, 0, 0.02);
    --overlay-white-03: rgba(0, 0, 0, 0.015);
    --overlay-white-02: rgba(0, 0, 0, 0.01);
    --overlay-black-80: rgba(0, 0, 0, 0.15);
    --overlay-black-45: rgba(0, 0, 0, 0.08);
    --overlay-black-40: rgba(0, 0, 0, 0.07);
    --overlay-black-35: rgba(0, 0, 0, 0.06);
    --overlay-black-30: rgba(0, 0, 0, 0.05);
    --overlay-purple-50: rgba(155, 77, 202, 0.25);
    --overlay-purple-40: rgba(155, 77, 202, 0.2);
    --overlay-purple-35: rgba(155, 77, 202, 0.18);
    --overlay-purple-30: rgba(155, 77, 202, 0.15);
    --overlay-purple-25: rgba(155, 77, 202, 0.12);
    --overlay-purple-20: rgba(155, 77, 202, 0.1);
    --overlay-purple-15: rgba(155, 77, 202, 0.08);
    --overlay-purple-12: rgba(155, 77, 202, 0.06);
    --overlay-purple-10: rgba(155, 77, 202, 0.05);
    --overlay-purple-08: rgba(155, 77, 202, 0.04);
    --overlay-purple-04: rgba(155, 77, 202, 0.02);
    --overlay-warning-10: rgba(255, 140, 0, 0.05);
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    accent-color: var(--color-accent-purple-alt);
    background: linear-gradient( 135deg, var(--overlay-white-08), var(--overlay-white-02)), var(--color-bg-dark);
    color: var(--color-text-primary);
    border: 1px solid var(--overlay-white-12);
    box-shadow: 0 10px 30px var(--overlay-black-45), inset 0 1px 0 var(--overlay-white-06);
}

button:focus {
    background: var(--overlay-purple-20);
    border-color: var(--overlay-purple-30);
}

button:focus,
button:hover {
    color: var(--color-accent-purple-light);
}

body::-webkit-scrollbar {
    display: none;
}

main {
    flex: 1;
    /* keep footer at the bottom */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

a {
    color: var(--color-text-primary);
}

a:hover,
.action-links a:hover,
.email-link,
.attachment-link,
.attachment-link:hover {
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-purple-alt);
}

h1 {
    font-size: 3rem;
    color: var(--color-text-light);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

h1.page-title {
    background: linear-gradient(135deg, var(--color-accent-purple-light), var(--color-accent-purple-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 2rem;
}

a.no-link-color {
    color: var(--color-text-primary);
}

p {
    margin-bottom: unset;
}

.email:hover {
    color: black;
    background-color: var(--color-accent-purple-alt);
}

iframe {
    /*    background-color: #1D2021; */
    background-color: white;
    min-width: 75%;
    max-width: 1500px;
    min-height: 40vh;
    margin: 2rem auto;
    display: block;
    border: none;
    border-radius: 30px;
}

blockquote {
    border-left: .3rem solid var(--color-accent-purple);
}

blockquote.warning {
    border-left: .3rem solid var(--color-accent-orange);
}

text-muted {
    color: gray;
}

.footer {
    text-align: center
}

.footer-two {
    margin-top: -2rem
}

.action-links {
    margin-bottom: 15px;
    float: right;
    justify-content: flex-end;
    /* aligns all links to the right */
    flex-wrap: nowrap;
    /* ensures they stay in one line */
    text-align: right;
    display: flex;
    gap: 10px;
}

.hamburger-menu {
    display: none;
    background: var(--overlay-purple-20);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    color: var(--color-accent-purple-light);
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: var(--overlay-purple-30);
    border-color: var(--overlay-purple-40);
    box-shadow: 0 4px 15px var(--overlay-purple-25);
}

.action-links a {
    height: 42px;
    display: inline-block;
    padding: 12px 24px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid var(--overlay-white-15);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text-light);
}

.action-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--overlay-white-10), transparent);
    transition: left 0.5s;
}

.action-links a:hover::before {
    left: 100%;
}

.action-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--overlay-purple-40);
    border-color: var(--overlay-purple-30);
    color: var(--color-text-white);
}


/* Action Dropdowns */

.action-dropdown {
    position: relative;
    display: inline-block;
}


/* Invisible hover area to keep dropdown open */

.action-dropdown::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: calc(100% + 8px);
    pointer-events: none;
}

.action-dropdown:hover::after {
    pointer-events: auto;
}

.dropdown-toggle {
    height: 42px;
    padding: 0px 24px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid var(--overlay-white-15);
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--overlay-white-10), transparent);
    transition: left 0.5s;
}

.dropdown-toggle:hover::before {
    left: 100%;
}

.dropdown-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--overlay-purple-40);
    border-color: var(--overlay-purple-30);
    color: var(--color-text-white);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--color-bg-dark);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--overlay-purple-40);
    z-index: 1000;
    overflow: hidden;
    padding: 8px 0;
}

.action-dropdown:hover .dropdown-menu,
.action-dropdown:focus-within .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    border: none;
    border-radius: 0;
    height: auto;
    transition: all 0.2s ease;
}

.dropdown-menu a::before {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--overlay-purple-30);
    color: var(--color-text-white);
    transform: none;
    box-shadow: none;
    border: none;
}

.dropdown-menu a:not(:last-child) {
    border-bottom: 1px solid var(--overlay-white-10);
}


/* Auth pages */

.auth-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.auth-card {
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
    padding: 2rem;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    color: var(--color-accent-purple);
}

.auth-subtitle {
    color: var(--color-text-gray);
    margin-bottom: 2rem;
}

.auth-card fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.auth-card label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-card small {
    margin-top: -10px !important;
    font-size: 1.2rem;
    display: block;
    color: var(--color-text-gray);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border-dark);
    border-radius: 4px;
    background: var(--color-bg-medium);
    color: var(--color-text-light);
}

.auth-actions {
    margin-top: 2rem;
}

.button-primary {
    width: 100%;
    background: var(--color-accent-purple);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.button-primary:hover {
    background: var(--color-accent-purple-light);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-dark);
}

.auth-footer a {
    color: var(--color-accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-features {
    padding: 2rem;
}

.auth-features h3,
.auth-features h4 {
    color: var(--color-accent-purple);
    margin-bottom: 1rem;
}

.auth-features ul {
    list-style: none;
    padding: 0;
}

.auth-features li {
    padding: 0.75rem 0;
    font-size: 1.05rem;
}

.auth-guest-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border-dark);
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .auth-features {
        padding: 1rem;
    }
}


/* Unified auth page (side-by-side login/register) */

.auth-unified-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-intro h1 {
    margin-bottom: 0.5rem;
    color: var(--color-accent-purple);
}

.auth-forms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .auth-forms-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.auth-card {
    display: flex;
    flex-direction: column;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auth-card fieldset {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auth-card .button {
    margin-top: auto;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent-purple);
}

.auth-card-subtitle {
    color: var(--color-text-gray);
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

.auth-features-unified {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
}

.auth-features-unified h3 {
    margin-bottom: 1.5rem;
    color: var(--color-accent-purple);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    padding: 1rem;
    background: var(--color-bg-medium);
    border-radius: 4px;
    font-size: 1.4rem;
}

.guest-note {
    color: var(--color-text-gray);
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

.guest-note a {
    color: var(--color-accent-purple);
    text-decoration: underline;
}


/* Verification success page */

.verification-success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.verification-success-card {
    background: var(--color-bg-dark);
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 3rem 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 6px var(--overlay-black-40);
}

.verification-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #28a745;
}

.verification-success-icon svg {
    width: 100%;
    height: 100%;
}

.verification-success-card h1 {
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.verification-details {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--overlay-white-05);
    border-radius: 5px;
}

.verification-details p {
    margin: 0.5rem 0;
}

.verified-email {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-accent-purple);
    word-break: break-all;
}

.verification-info {
    margin: 2rem 0;
    text-align: left;
    padding: 0 1rem;
}

.verification-info p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.verification-actions {
    margin-top: 2rem;
}

.verification-actions .button-primary {
    display: inline-block;
    width: auto;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
}

@media (max-width: 600px) {
    .verification-success-card {
        padding: 2rem 1rem;
    }
    .verification-success-card h1 {
        font-size: 1.5rem;
    }
}


/* Account dashboard page */

.account-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.account-subtitle {
    color: var(--color-text-gray);
    margin-bottom: 2rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.account-card {
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.account-card h2 {
    color: var(--color-accent-purple);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.card-description {
    color: var(--color-text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.account-card:nth-child(1) {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--overlay-purple-08);
    border-radius: 8px;
    border: 1px solid var(--overlay-purple-15);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-accent-purple);
}

.stat-label {
    color: var(--color-text-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.email-list,
.inbox-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.email-item,
.inbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--overlay-white-03);
    border: 1px solid var(--color-border-dark);
    border-radius: 6px;
    transition: background 0.2s;
}

.email-item:hover,
.inbox-item:hover {
    background: var(--overlay-white-05);
}

.email-info,
.inbox-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.email-address {
    font-weight: 600;
    color: var(--color-text-light);
    font-family: monospace;
}

.inbox-address {
    font-weight: 600;
    color: var(--color-accent-purple);
    text-decoration: none;
    font-family: monospace;
}

.inbox-address:hover {
    text-decoration: underline;
}

.email-meta,
.inbox-meta {
    font-size: 0.85rem;
    color: var(--color-text-gray);
}

form {
    margin: 0;
}

.inline-form {
    display: inline;
    align-self: center;
}

.button-small {
    padding: 0rem 1rem;
    font-size: 0.85rem;
    margin: 0;
}

.button-danger {
    background: var(--color-danger);
    color: white;
    border: none;
}

.button-danger:hover {
    background: #c0392b;
}

.empty-state {
    color: var(--color-text-gray);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.hint {
    color: var(--color-text-gray);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.limit-reached {
    color: var(--color-warning);
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
}

.password-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.password-form fieldset {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.password-form label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-light);
}

.password-form input {
    padding: 0.75rem;
    border: 1px solid var(--color-border-dark);
    border-radius: 5px;
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
}

.password-form small {
    color: var(--color-text-gray);
    font-size: 0.85rem;
    margin-top: -0.5rem;
}

.password-form .button {
    margin-top: auto;
}

.danger-zone {
    border: 2px solid var(--color-danger);
}

.danger-zone h2 {
    color: var(--color-danger);
}

.danger-content {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.danger-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem 0;
}

.danger-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-primary);
}

.danger-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-danger);
    font-weight: bold;
}

.button-full-width {
    width: 100%;
}

.danger-content .button {
    margin-top: auto;
}

@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
    .email-item,
    .inbox-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .inline-form {
        width: 100%;
    }
    .button-small {
        width: 100%;
    }
}


/* Forward modal auth prompts */

.auth-required {
    background: var(--overlay-warning-10);
    border-left: 3px solid var(--color-warning);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.auth-prompt {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.auth-prompt .button {
    flex: 1;
    text-align: center;
}

.form-hint {
    display: block;
    color: var(--color-text-gray);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-hint a {
    color: var(--color-accent-purple);
    text-decoration: none;
}

.form-hint a:hover {
    text-decoration: underline;
}

.modal-info {
    color: var(--color-text-gray);
    font-size: 0.9rem;
    text-align: center;
    margin: 0.5rem 0;
}


/* Reset apple form styles */

input,
textarea,
select,
select:active,
select:focus,
select:hover {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    background-image: none;
}


/* Frosted Glass Utility Class */

.frosted-glass {
    background: linear-gradient(135deg, var(--overlay-white-08), var(--overlay-white-04));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--overlay-white-15);
    border-radius: 24px;
    box-shadow: 0 8px 32px var(--overlay-black-40), inset 0 1px 0 var(--overlay-white-10);
}

body.light-mode .frosted-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}


/* Homepage Styles */

.homepage-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 2rem 2rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--color-text-dim);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.inbox-creator {
    max-width: 600px;
    margin: 0 auto 6rem;
    padding: 3rem;
}

.creator-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 2.5rem;
    color: var(--color-text-light);
}

.inbox-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-light);
    padding-left: 0.4rem;
}

.form-group input[type="text"] {
    padding: 1.4rem 1.6rem;
    font-size: 1.6rem;
    border: 1px solid var(--overlay-purple-30);
    border-radius: 12px;
    background: var(--overlay-white-04);
    color: var(--color-text-primary);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent-purple-light);
    background: var(--overlay-white-06);
    box-shadow: 0 0 0 3px var(--overlay-purple-15);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 1.6rem;
    top: 35%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-dim);
    font-size: 1.6rem;
}

.form-group select {
    padding-left: 1.6rem;
    font-size: 1.6rem;
    border: 1px solid var(--overlay-purple-30);
    border-radius: 12px;
    background: var(--overlay-white-04);
    color: var(--color-text-primary);
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.form-group select:hover {
    background: var(--overlay-white-06);
    border-color: var(--overlay-purple-40);
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-accent-purple-light);
    box-shadow: 0 0 0 3px var(--overlay-purple-15);
}

.form-group select option {
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
}

.domain-count {
    margin-top: -10px;
    font-size: 1.2rem;
    color: var(--color-text-dimmer);
    padding-left: 0.4rem;
}

.form-actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
    align-items: stretch;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.4rem 2.4rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    flex: 1;
    height: 5.2rem;
    box-sizing: border-box;
}

.btn svg {
    transition: transform 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-purple-bright));
    color: white;
    box-shadow: 0 4px 16px var(--overlay-purple-40);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--overlay-purple-50);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: var(--overlay-white-08);
    color: var(--color-text-light);
    border: 1px solid var(--overlay-purple-25);
}

.btn-secondary:hover {
    background: var(--overlay-white-12);
    border-color: var(--overlay-purple-35);
    transform: translateY(-2px);
}

.btn-secondary:hover svg {
    transform: rotate(15deg);
}

.alert {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.4rem 1.8rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.alert-error {
    background: rgba(176, 0, 0, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-warning {
    background: var(--overlay-warning-10);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
}

.alert span {
    font-size: 2rem;
}

.alert p {
    margin: 0;
    font-size: 1.4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    padding: 3rem 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--overlay-black-45), inset 0 1px 0 var(--overlay-white-15);
}

.feature-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.feature-card p {
    font-size: 1.4rem;
    color: var(--color-text-dim);
    line-height: 1.6;
    margin: 0;
}


/* Info Section */

.info-section {
    margin-top: 5rem;
    margin-bottom: 4rem;
}

.info-content {
    padding: 4rem 3rem;
    min-width: 75%;
    max-width: 1500px;
    margin: 0 auto;
}

.info-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
    text-align: center;
}

.info-content h3 {
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent-purple-light);
}

.info-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.info-content ul li {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
}

.info-content ul li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--color-accent-purple);
    font-size: 2rem;
    line-height: 1.5;
}

.info-content ul li strong {
    color: var(--color-text-light);
}

.info-content .note {
    background: var(--overlay-purple-10);
    border-left: 4px solid var(--color-accent-purple);
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    font-size: 1.5rem;
    line-height: 1.7;
    border-radius: 4px;
}


/* Responsive Design */

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.2rem;
    }
    .hero-subtitle {
        font-size: 1.6rem;
    }
    .inbox-creator {
        padding: 2rem;
    }
    .form-actions {
        flex-direction: column;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .info-content {
        padding: 3rem 2rem;
    }
    .info-content h2 {
        font-size: 2.4rem;
    }
    .info-content h3 {
        font-size: 1.8rem;
    }
}


/* Legacy Login Styles (kept for compatibility) */

#login {
    padding-top: 15vh;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: auto;
    background: linear-gradient( 135deg, var(--overlay-purple-12), var(--overlay-purple-04)), var(--overlay-white-04);
    border-radius: 22px;
    border: 1px solid var(--overlay-purple-25);
    padding: 40px 36px;
    box-shadow: 0 20px 50px var(--overlay-black-40), 0 0 0 1px var(--overlay-purple-08) inset;
}

#login h1,
#login h4 {
    text-align: center;
}

#login h4 {
    margin-bottom: 6rem;
}

#login fieldset {
    display: flex;
    flex-direction: column;
}

#login fieldset label {
    position: relative;
    top: 12px;
    left: 12px;
    width: fit-content;
    line-height: 1;
    padding: 0 6px;
    font-size: 1.4rem;
    background: var(--color-bg-medium);
    z-index: 999;
}

#login input[type="text"],
#login select {
    border-radius: 0.4rem;
    color: var(--color-text-primary);
    font-size: 1.6rem;
    height: 4.2rem;
    padding: 0 1.4rem;
    margin-bottom: 1rem;
}

#login select option {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
}

#login .dropdown {
    position: relative;
    border-radius: 0.4rem;
}

#login .dropdown::before {
    position: absolute;
    content: "\2193";
    top: 15%;
    right: 12px;
}

#login .buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    /* keeps them aligned right like action-links */
    margin-top: 1.5rem;
}

#login .buttons>*,
#copyAddress,
.close,
.raw-tab-button {
    cursor: pointer;
}

#login .buttons>* {
    flex: 1 1 auto;
    min-width: 120px;
    border-radius: 20px;
    color: var(--color-text-white-alt);
    background: var(--overlay-purple-20);
    border: 1px solid var(--overlay-purple-35);
    box-shadow: 0 8px 20px var(--overlay-purple-25), inset 0 1px 0 var(--overlay-white-08);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#login .buttons>*:hover {
    background: var(--overlay-purple-30);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px var(--overlay-purple-35), inset 0 1px 0 var(--overlay-white-12);
}

.mail_attachments {
    width: 80%;
    padding-left: 10%
}

label {
    display: inline;
}


/* Modern Inbox Styles */

.inbox-container,
.mail-container,
.raw-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 0 auto;
}

.inbox-container {
    padding: 0 20px;
}

.inbox-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inbox-title {
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-purple-light), var(--color-accent-purple-bright));
    font-size: 2.8rem;
    font-weight: 300;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px var(--overlay-purple-30);
}

.emails-container {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 62vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    border: 2px solid var(--overlay-purple-30);
    border-radius: 15px;
    padding: 20px;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.emails-container::-webkit-scrollbar {
    display: none;
}

.email-link {
    transition: all 0.3s ease;
    display: block;
}

.email-link:hover {
    transform: translateY(-4px);
}

.mail-content,
.mail-attachments {
    border: 2px solid var(--overlay-purple-30);
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--overlay-black-30);
}

.email-card {
    border: 1px solid var(--overlay-purple-30);
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--overlay-black-30);
    padding: 24px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.email-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-card:hover::before {
    opacity: 1;
}

.email-card:hover {
    box-shadow: 0 15px 50px var(--overlay-purple-15);
    transform: translateY(-2px);
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.email-sender {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sender-name {
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--color-text-white);
    line-height: 1.2;
}

.sender-email,
.mail-date {
    opacity: 0.8;
}

.sender-email {
    font-size: 1rem;
    color: var(--color-text-dim);
}

.email-date,
.email-expiry {
    font-size: 0.85rem;
    color: var(--color-text-dimmer);
    white-space: nowrap;
    opacity: 0.7;
}

.email-subject,
.empty-card h3,
.mail-attachments h4 {
    font-weight: 400;
}

.email-subject {
    font-size: 1.25rem;
    color: var(--color-text-light);
    line-height: 1.5;
}


/* Subject row with right-bound expiry */

.email-subject-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.email-date {
    color: var(--color-text-dimmer);
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.empty-card,
.mail-header {
    background: var(--overlay-white-03);
    border-radius: 20px;
    border: 1px solid var(--overlay-white-08);
}

.empty-card {
    padding: 50px;
    text-align: center;
    box-shadow: 0 12px 40px var(--overlay-black-30);
    max-width: 400px;
}

.empty-card h3 {
    color: var(--color-accent-purple);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.empty-card p {
    color: var(--color-text-dim);
    font-size: 1.3rem;
    opacity: 0.9;
    line-height: 1.5;
}


/* Modern Mail View Styles */

.mail-header {
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid var(--overlay-purple-30);
    border-radius: 15px;
    box-shadow: 0 12px 40px var(--overlay-black-40);
}

.mail-subject {
    font-size: 2.2rem;
    font-weight: 300;
    margin: 0 0 20px 0;
    color: var(--color-text-white);
    line-height: 1.3;
}

.mail-from {
    font-size: 1.5rem;
    color: var(--color-accent-purple-light);
    font-weight: 500;
}

.mail-date {
    font-size: 1.4rem;
    color: var(--color-text-dim);
}

.mail-content {
    background: var(--overlay-white-02);
    padding: 30px;
    margin-bottom: 30px;
}

.mail-html-content iframe,
.attachment-link,
.raw-mail {
    border-radius: 12px;
}

.mail-html-content iframe {
    border: 1px solid var(--overlay-white-10);
    width: 100%;
    min-height: 40vh;
    max-height: 100vh;
    resize: vertical;
    overflow: auto;
}

.mail-text-content {
    color: var(--color-text-light);
    line-height: 1.6;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.mail-empty-content {
    text-align: center;
    color: var(--color-text-dim);
    font-style: italic;
    padding: 40px;
}

.mail-attachments {
    border: 2px solid var(--overlay-purple-30);
    border-radius: 15px;
    background: var(--overlay-white-03);
    padding: 25px;
}

.mail-attachments h4 {
    color: var(--color-accent-purple);
    margin: 0 0 20px 0;
    font-size: 1.4rem;
}


/* Cryptographic Keys Section */

.mail-crypto-keys {
    border: 2px solid var(--overlay-purple-30);
    border-radius: 15px;
    background: var(--overlay-white-03);
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.crypto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.crypto-header:hover {
    background: var(--overlay-purple-05);
}

.crypto-header h4 {
    color: var(--color-accent-purple);
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crypto-toggle {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.crypto-toggle:hover {
    transform: scale(1.1);
}

.crypto-icon {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent-purple);
}

.crypto-icon-collapsed {
    display: block;
}

.crypto-icon-expanded {
    display: none;
}

.crypto-toggle[aria-expanded="true"] .crypto-icon-collapsed {
    display: none;
}

.crypto-toggle[aria-expanded="true"] .crypto-icon-expanded {
    display: block;
}

.crypto-content {
    padding: 0 25px 25px 25px;
}

.crypto-item {
    background: var(--overlay-white-02);
    border: 1px solid var(--overlay-purple-20);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.crypto-item:last-child {
    margin-bottom: 0;
}

.crypto-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.crypto-type {
    display: inline-block;
    background: var(--color-accent-purple);
    color: var(--color-background);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.crypto-filename {
    color: var(--color-text-dim);
    font-size: 0.95rem;
    font-family: monospace;
    word-break: break-word;
}

.crypto-preview {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--overlay-white-03);
    border-left: 3px solid var(--color-accent-purple-light);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crypto-preview:hover {
    background: var(--overlay-purple-10);
    border-left-color: var(--color-accent-purple);
}

.crypto-key-content {
    background: var(--color-background);
    border: 1px solid var(--overlay-white-10);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--color-text-light);
    overflow-x: auto;
    white-space: pre;
    line-height: 1.4;
    margin: 0;
}

.crypto-key-content::-webkit-scrollbar {
    height: 8px;
}

.crypto-key-content::-webkit-scrollbar-track {
    background: var(--overlay-white-05);
    border-radius: 4px;
}

.crypto-key-content::-webkit-scrollbar-thumb {
    background: var(--overlay-purple-30);
    border-radius: 4px;
}

.crypto-key-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-purple);
}

.mail-attachments h4 {
    color: var(--color-accent-purple);
    margin: 0 0 20px 0;
    font-size: 1.4rem;
}

.attachments-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.attachment-link {
    color: var(--color-accent-purple-light);
    padding: 0px 16px;
    background: var(--overlay-purple-10);
    border: 1px solid var(--overlay-purple-20);
    transition: all 0.3s ease;
    display: inline-block;
    max-width: fit-content;
}

.attachment-link:hover {
    background: var(--overlay-purple-15);
    border-color: var(--overlay-purple-30);
    transform: translateX(5px);
}


/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--overlay-black-80);
}

.modal-content {
    background-color: var(--color-bg-dark);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--color-accent-purple);
    border-radius: 0.4rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px var(--overlay-black-30);
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--color-text-primary);
}

.modal-description {
    color: var(--color-text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.modal-info {
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--overlay-purple-08);
    border-left: 3px solid var(--color-accent-purple);
    border-radius: 4px;
    font-size: 1.3rem;
}

.close {
    text-align: right;
    float: right;
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--color-text-primary);
    line-height: 20px;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--color-accent-purple);
}

.floating-label {
    position: relative;
    top: 12px;
    left: 12px;
    width: fit-content;
    line-height: 1;
    padding: 0 6px;
    font-size: 1.4rem;
    background-color: var(--color-bg-dark);
    z-index: 999;
    color: var(--color-text-primary);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.modal-content fieldset {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-content .button,
.modal-content .modal-button {
    margin-top: auto;
}

.modal-input {
    border-radius: 0.4rem;
    color: var(--color-text-primary);
    font-size: 1.6rem;
    height: 4.2rem;
    padding: 0 1.4rem;
    margin-bottom: 1rem;
    background-color: transparent;
    border: 1px solid var(--color-border-dark);
    width: 100%;
}

.modal-input:focus {
    border-color: var(--color-accent-purple);
    outline: none;
}

.modal-button {
    width: 100%;
    margin-top: 1rem;
    background-color: var(--color-accent-purple);
}


/* Lock Error Messages */

.unlock-error {
    color: var(--color-warning);
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--overlay-warning-10);
    border-left: 3px solid var(--color-warning);
}


/* Success Messages */

.success-message {
    color: #2ecc71;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    border-radius: 4px;
    font-weight: 500;
}


/* Verification Messages */

.verification-message {
    color: #3498db;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-weight: 500;
}

.verification-message strong {
    color: #2980b9;
    font-weight: 600;
}


/* Remove Lock Button Styles */

.modal-button-danger {
    background-color: var(--color-danger);
}

.modal-button-cancel {
    background-color: var(--color-button-cancel);
}


/* Copy address feedback */

#copyFeedback {
    display: none;
    color: var(--color-accent-purple-alt);
    font-size: 0.9em;
    position: absolute;
    margin-left: 0;
    margin-top: 50px;
}

.email-expiry .expiry-timer[style*="color: #b00"] {
    color: var(--color-error) !important;
}


/* Raw mail view */

.raw-container,
.raw-mail {
    padding: 20px;
}

.raw-mail {
    background: var(--overlay-black-35);
    color: var(--color-text-light);
    border: 1px solid var(--overlay-white-08);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.95rem;
}

.raw-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.raw-tab-button {
    padding: 0px 14px;
    border-radius: 10px;
    border: 1px solid var(--overlay-white-12);
    background: var(--overlay-white-05);
    color: var(--color-text-light);
    transition: all 0.2s ease;
}

.raw-tab-button.active {
    background: var(--overlay-purple-25);
    border-color: var(--overlay-purple-40);
    color: var(--color-text-white-alt);
}

.raw-tab-button:hover {
    border-color: var(--overlay-purple-50);
}

.raw-panels {
    position: relative;
}

.raw-mail.hidden {
    display: none;
}


/* QR Code Button and Modal */

.qr-icon-btn {
    background: var(--overlay-purple-20);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 12px;
    padding: 10px;
    color: var(--color-accent-purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qr-icon-btn:hover {
    background: var(--overlay-purple-30);
    border-color: var(--overlay-purple-40);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--overlay-purple-25);
}

.qr-icon-btn svg {
    width: 24px;
    height: 24px;
}

.qr-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qr-modal-content {
    max-width: 400px;
    text-align: center;
}

.qr-modal-content h3 {
    margin-left: 16.516px;
    margin-bottom: 24px;
}

.qr-code-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    margin: 0 auto 20px;
    border: 2px solid var(--color-accent-purple);
    box-shadow: 0 8px 25px var(--overlay-purple-25);
}

.qr-address-label {
    color: var(--color-text-light);
    font-size: 1.2rem;
    margin: 0;
    word-break: break-all;
}


/* Loading Page */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.loading-spinner {
    margin-bottom: 30px;
}

.loading-title {
    color: var(--color-text-primary);
    margin-bottom: 15px;
    font-size: 2rem;
}

.loading-message {
    color: var(--color-text-secondary);
    font-size: 1.2rem;
}

.loading-submessage {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-top: 10px;
}

body.loading-page .logo {
    display: none;
}


/* Theme Toggle Button */

.theme-toggle {
    background: var(--overlay-purple-20);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 15px;
    height: 42px;
    color: var(--color-accent-purple-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-toggle:hover {
    background: var(--overlay-purple-30);
    border-color: var(--overlay-purple-40);
    box-shadow: 0 4px 15px var(--overlay-purple-25);
    transform: translateY(-2px);
}

.theme-toggle svg {
    margin: auto;
    width: 20px;
    height: 20px;
}

.theme-icon {
    display: none;
}

body:not(.light-mode) .theme-icon-dark {
    display: block;
}

body.light-mode .theme-icon-light {
    display: block;
}


/* Refresh countdown timer */

.refresh-countdown {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    padding: 6px 12px;
    background: var(--overlay-purple-10);
    border: 1px solid var(--overlay-purple-20);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    width: fit-content;
    margin: 0 auto;
}

.refresh-countdown:hover {
    opacity: 1;
}

#refreshTimer {
    font-weight: 600;
    color: var(--color-accent-purple-light);
    min-width: 2ch;
    text-align: center;
}


/* Statistics Page */

.stats-container {
    min-width: 75%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
}

.stats-subtitle {
    color: var(--color-text-dim);
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 3rem;
}

.stats-subtitle .purge-time-inline {
    display: inline;
}

.stats-subtitle .purge-time-inline label,
.stats-subtitle .purge-time-inline h4 {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--overlay-white-05);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: var(--overlay-white-08);
    border-color: var(--overlay-purple-40);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent-purple-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-container {
    background: var(--overlay-white-05);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 15px;
    padding: 2rem;
    padding-bottom: 4rem;
    height: 550px;
    position: relative;
    margin-top: 3rem;
}

.chart-container h2 {
    background: linear-gradient(135deg, var(--color-accent-purple-light), var(--color-accent-purple-alt));
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.chart-container .section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--overlay-purple-30);
}

.chart-container .section-icon {
    font-size: 1.5rem;
}

.chart-container canvas {
    max-height: 400px;
}


/* Custom legend for stats chart */

.chart-legend-custom {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.legend-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--overlay-white-05);
    border: 2px solid var(--overlay-purple-30);
    border-radius: 8px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.legend-btn:hover {
    background: var(--overlay-white-10);
    border-color: var(--color-accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 77, 202, 0.2);
}

.legend-btn.active {
    background: var(--overlay-purple-20);
    border-color: var(--color-accent-purple);
}

.legend-btn:not(.active) {
    opacity: 0.4;
    background: var(--overlay-white-02);
}

.legend-btn:not(.active):hover {
    opacity: 0.6;
}

.legend-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.legend-label {
    white-space: nowrap;
}


/* Enhanced Statistics Cards */

.enhanced-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card-detailed {
    background: var(--overlay-white-05);
    border: 1px solid var(--overlay-purple-30);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.stat-card-detailed:hover {
    background: var(--overlay-white-08);
    border-color: var(--overlay-purple-40);
    transform: translateY(-2px);
}

.section-header-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-light);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--overlay-purple-20);
}

.stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--overlay-white-05);
}

.stat-list-item:last-child {
    border-bottom: none;
}

.stat-list-label {
    font-size: 1.05rem;
    color: var(--color-text-primary);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.stat-list-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent-purple-light);
    min-width: 40px;
    text-align: right;
}

.stat-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--overlay-white-08);
    font-size: 0.95rem;
    color: var(--color-text-dim);
    text-align: center;
}

.stat-empty {
    text-align: center;
    color: var(--color-text-dim);
    padding: 2rem 0;
    font-style: italic;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
}

.quick-stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--overlay-white-03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.quick-stat-item:hover {
    background: var(--overlay-purple-08);
    transform: translateY(-2px);
}

.quick-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent-purple-light);
    margin-bottom: 0.5rem;
}

.quick-stat-label {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .chart-legend-custom {
        flex-direction: column;
        gap: 0.75rem;
    }
    .legend-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Responsive Styles */

@media (max-width: 768px) {
    /* Stats page mobile fixes */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .stat-card {
        padding: 1.5rem;
    }
    .stat-value {
        font-size: 2rem;
    }
    .chart-container {
        padding: 1.5rem;
        height: auto;
        min-height: 400px;
    }
    .chart-container h2,
    .chart-container .section-header {
        font-size: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .chart-container .section-icon {
        font-size: 1.3rem;
    }
    .chart-container canvas {
        max-height: 300px;
    }
    .chart-legend-custom {
        gap: 0.75rem;
    }
    .legend-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }
    .stats-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    /* Enhanced stats mobile */
    .enhanced-stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    .stat-card-detailed {
        padding: 1.5rem;
    }
    .section-header-small {
        font-size: 1.1rem;
    }
    .stat-list-label {
        font-size: 0.85rem;
        max-width: 65%;
    }
    .stat-list-value {
        font-size: 0.95rem;
    }
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .quick-stat-value {
        font-size: 1.5rem;
    }
    .action-links {
        position: relative;
    }
    .hamburger-menu {
        display: flex;
    }
    /* Hide dropdowns on mobile, show links directly */
    .action-dropdown {
        display: contents;
    }
    .action-dropdown .dropdown-toggle {
        display: none;
    }
    .action-dropdown .dropdown-menu {
        display: block;
        position: static;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        background: transparent;
    }
    /* Add section headers before dropdown menus on mobile */
    .action-dropdown .dropdown-menu::before {
        content: attr(data-section-title);
        display: block;
        font-size: 1.1rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--color-text-dim);
        padding: 12px 0 8px 0;
        margin-top: 8px;
        border-top: 1px solid var(--overlay-white-10);
    }
    .action-dropdown:first-of-type .dropdown-menu::before {
        margin-top: 0;
        border-top: none;
    }
    .action-dropdown .dropdown-menu a {
        padding: 10px 0;
        text-align: right;
        border: none !important;
    }
    .action-dropdown .dropdown-menu a:hover {
        background: transparent;
        color: var(--color-accent-purple-light);
        padding-left: 8px;
    }
    .action-links.mobile-open .theme-toggle {
        justify-content: center;
        width: 100%;
    }
    .action-links.mobile-hidden>a,
    .action-links.mobile-hidden>button:not(.hamburger-menu),
    .action-links.mobile-hidden>.action-dropdown {
        display: none;
    }
    .action-links.mobile-open {
        flex-direction: column;
        position: absolute;
        right: 20px;
        top: 20px;
        background: var(--color-bg-dark);
        border: 1px solid var(--overlay-purple-30);
        border-radius: 15px;
        padding: 15px;
        box-shadow: 0 10px 40px var(--overlay-black-40);
        z-index: 1000;
        min-width: 220px;
    }
    .action-links.mobile-open>.hamburger-menu {
        display: none;
    }
    .action-links.mobile-open>a,
    .action-links.mobile-open>button:not(.hamburger-menu) {
        display: block;
        width: 100%;
        text-align: right;
        padding: 10px 0;
        border: none;
        border-radius: 0;
        height: auto;
        background: transparent;
        font-size: 1.4rem;
        font-weight: 500;
        text-transform: none;
        letter-spacing: normal;
    }
    .action-links.mobile-open>a:hover,
    .action-links.mobile-open>button:not(.hamburger-menu):hover {
        background: transparent;
        color: var(--color-accent-purple-light);
        transform: none;
        box-shadow: none;
        padding-left: 8px;
    }
    .qr-icon-btn {
        display: none;
    }
}
