/* ===================================
   Auto Mail Unsubscriber - Style (Dark Theme)
   =================================== */

/* --- General & Typography --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px; /* Adjusted padding */
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 500;
}

h1 { font-size: 2.5em; margin-bottom: 10px; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.25em; }

p {
    color: #a0a0a0;
}

a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover {
    text-decoration: underline;
}

hr.separator {
    border: none;
    border-top: 1px solid #333;
    margin: 40px 0;
}


/* --- Landing Page Styles --- */
.hero {
    text-align: center;
    padding: 80px 20px;
    background-color: #1a1a1a;
    border-radius: 12px;
    margin-bottom: 50px;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.25rem;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto 40px auto;
}
.cta-button {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    background-color: #238636;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.cta-button:hover {
    background-color: #2ea043;
    border-color: rgba(240, 246, 252, 0.2);
    text-decoration: none;
}
.features {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    gap: 40px;
    text-align: center;
}
.feature-item {
    max-width: 300px;
}
.feature-item h3 {
    margin-bottom: 15px;
    color: #c9d1d9;
}


/* --- Login/Register Page Styles --- */
.form-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}
.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 400;
}
.form-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #21262d;
}
.form-toggle button {
    width: 50%;
    padding: 10px 20px;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #8b949e;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.form-toggle button.active {
    color: #c9d1d9;
    font-weight: 500;
    border-bottom-color: #f78166;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #c9d1d9;
}
.form-submit {
    margin-top: 10px;
    width: 100%;
    background-color: #238636 !important; /* Override general button styles */
}
.form-submit:hover {
    background-color: #2ea043 !important;
}
.flash-messages {
    list-style: none;
    padding: 0;
    margin: -10px 0 20px 0;
}
.flash-messages li.error {
    padding: 12px;
    background-color: rgba(248, 81, 73, 0.1);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.4);
    border-radius: 6px;
    text-align: center;
}


/* --- Dashboard: General --- */
.main-content {
    padding-top: 0;
}
h1.dashboard-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 10px;
}
p.subtitle {
    text-align: center;
    font-size: 1.1em;
    color: #a0a0a0;
    margin-top: 0;
    margin-bottom: 40px;
}

/* --- Dashboard: Tabs --- */
.tab-container {
    display: flex;
    border-bottom: 1px solid #333;
    align-items: center;
}
.tab {
    padding: 12px 25px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #a0a0a0;
    font-size: 1em;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
}
.tab:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}
.tab.active {
    color: #ffffff;
    font-weight: 500;
    border-bottom: 3px solid #0095ff;
}
.tab-content {
    display: none;
    margin-top: -1px; /* Overlap border */
    padding: 30px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.tab-content.active {
    display: block;
}
.tab .settings-icon {
    margin-left: 10px;
    font-size: 1em;
    display: inline-block;
    opacity: 0.5;
    transition: all 0.2s ease-in-out;
}
.tab:hover .settings-icon, .tab.active .settings-icon {
    opacity: 0.8;
}
.tab .settings-icon:hover {
    opacity: 1;
    transform: rotate(30deg);
}

/* --- Dashboard: Forms & Controls --- */
.form-card {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
}
input, select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #1e1e1e;
    color: #e0e0e0;
    margin: 5px 0 15px 0;
    box-sizing: border-box;
    font-size: 1em;
    transition: all 0.2s ease;
}
input:focus, select:focus {
    border-color: #58a6ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

button {
    background-color: #30363d;
    color: #c9d1d9;
    padding: 12px 25px;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
button:hover {
    background-color: #484f58;
    border-color: rgba(240, 246, 252, 0.2);
}
button:disabled {
    background-color: #21262d;
    color: #8b949e;
    cursor: not-allowed;
    border-color: transparent;
}
.button-group {
    display: flex;
    gap: 15px;
}
.google-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
}
.google-btn:hover {
    background-color: #2c7de8;
}
.scan-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    background-color: #242424;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.scan-controls > div {
    flex-grow: 1;
}
.scan-button-container {
    flex-basis: 100%;
}
.scan-button-container button {
    width: 100%;
}
.scan-button-container button:disabled {
    color: #121212; /* Dark text for high contrast on green background */
    font-weight: bold;
}
.scan-progress-details {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #a0a0a0;
    margin-top: 15px;
    padding: 10px;
    background-color: #1e1e1e;
    border: 1px dashed #333;
    border-radius: 6px;
    min-height: 1.2em;
    display: none; /* Hidden by default, shown by JS */
}
.scan-progress-details i {
    color: #c9d1d9;
}

/* --- Dashboard: Results & History --- */
.results-header {
    margin-top: 20px;
}
.results-summary p {
    font-size: 0.9em;
    background-color: #242424;
    padding: 15px;
    border-radius: 8px;
    color: #a0a0a0;
}
.results-summary strong {
    color: #e0e0e0;
    font-weight: 500;
}
.summary-box {
    background-color: #242424;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.summary-box h4 {
    margin-top: 10px;
    margin-bottom: 10px;
}
.summary-box p {
    margin: 5px 0;
    font-size: 1em;
    background-color: transparent;
    padding: 0;
}
.domain-block {
    background-color: #242424;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #333;
}
.domain-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
}
th, td {
    border-bottom: 1px solid #333;
    padding: 15px;
    text-align: left;
    word-break: break-word;
}
th {
    color: #a0a0a0;
    font-weight: 500;
    font-size: 0.9em;
    text-transform: uppercase;
}
tr:hover {
    background-color: #2a2a2a;
}
td:first-child, th:first-child {
    padding-left: 0;
}
td:last-child, th:last-child {
    padding-right: 0;
}
.clicked-mark, .status-icon, .warning-icon {
    font-size: 1.2em;
    display: inline-block;
}
.status-icon.unsub-ok { color: #2ea043; }
.status-icon.unsub-failed { color: #f85149; }
.status-icon.unsub-none { color: #8b949e; }
.warning-icon { color: #f85149; }
.clicked-mark { color: #2ea043; }
.results-table .col-date { width: 15%; }
.results-table .col-subject { width: 40%; }
.results-table .col-link { width: 30%; }
.results-table .col-action { width: 15%; text-align: center; }
.col-unsub-icon {
    text-align: center;
    cursor: pointer;
}
.col-unsub-icon .fa-regular {
    color: #8b949e;
}
.col-unsub-icon .fa-solid {
    color: #2ea043;
}
.action-btn {
    /* existing styles */
}
tr.unsubscribed-row td {
    color: #8b949e;
    text-decoration: line-through;
}
tr.unsubscribed-row a {
    color: #555;
}
tr.warning-row {
    background-color: rgba(248, 140, 73, 0.1); /* A soft orange/yellow */
}
tr.warning-row:hover {
    background-color: rgba(248, 140, 73, 0.2);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: #161b22;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #30363d;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8em;
    color: #8b949e;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.modal-close:hover {
    color: #fff;
}
#edit-delete-btn {
    background-color: #da3633;
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: #f85149;
}
#edit-delete-btn:hover {
    background-color: #da3633;
    border-color: #f85149;
}

/* --- Account Actions --- */
.account-actions {
    margin-top: 40px;
    padding: 20px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    text-align: center;
}

.account-actions h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.account-actions p {
    color: #8b949e;
    font-size: 0.9em;
    max-width: 500px;
    margin: 10px auto 20px auto;
}

.settings-form-container {
    margin-bottom: 20px;
}
.settings-form-container:last-child {
    margin-bottom: 0;
}
.settings-form-container h4 {
    margin-bottom: 15px;
    color: #c9d1d9;
}
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}
.separator-light {
    border: none;
    border-top: 1px solid #30363d;
    margin: 30px 0;
}

.btn-danger {
    background-color: #da3633;
    color: white;
    border: 1px solid #f85149;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-danger:hover {
    background-color: #f85149;
}

/* --- Header --- */
.main-header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 10px 0;
    margin-bottom: 30px;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}
.header-logo {
    font-size: 1.5em;
    font-weight: 600;
    color: #c9d1d9;
    text-decoration: none;
}
.header-logo:hover {
    text-decoration: none;
    color: #fff;
}
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}
#user-email-placeholder {
    color: #8b949e;
    margin-right: 10px;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-button {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 1.2em;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #161b22;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border: 1px solid #30363d;
    border-radius: 6px;
}
.dropdown-content a {
    color: #c9d1d9;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: #30363d;
    color: #fff;
    text-decoration: none;
}
.dropdown:hover .dropdown-content {
    display: block;
} 