/* ===== Nusltr.com Styles ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #c8c8c8;
    min-height: 100vh;
    line-height: 1.6;
}

a { color: #4a9eff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Landing Page ===== */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.landing-logo {
    font-size: 2.5em;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.landing-logo span { color: #4a9eff; }

.landing-tagline {
    font-size: 1.6em;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    max-width: 600px;
}

.landing-subtitle {
    font-size: 16px;
    color: #999;
    margin-bottom: 40px;
    text-align: center;
    max-width: 520px;
}

/* Interest Grid */
.interests-section {
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
}

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

.interests-label {
    color: #ddd;
    font-size: 15px;
    font-weight: 500;
}

.select-all-btn {
    background: none;
    border: 1px solid #444;
    color: #aaa;
    padding: 5px 14px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}

.select-all-btn:hover { border-color: #4a9eff; color: #4a9eff; }
.select-all-btn.active { border-color: #4a9eff; color: #4a9eff; }

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.interest-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.interest-card:hover { border-color: #444; background: #1a1a1a; }
.interest-card.selected { border-color: #4a9eff; background: rgba(74, 158, 255, 0.08); }

.interest-card input[type="checkbox"] {
    accent-color: #4a9eff;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.interest-info h4 {
    color: #eee;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.interest-info p {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
}

/* Subscribe Form */
.subscribe-section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 15px;
}

.subscribe-form {
    display: flex;
    gap: 10px;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 14px 16px;
    background: #151515;
    border: 1px solid #333;
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

.subscribe-form input[type="email"]::placeholder { color: #666; }

.subscribe-form button {
    padding: 14px 28px;
    background: #4a9eff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s;
}

.subscribe-form button:hover { background: #3a8ee6; }
.subscribe-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.subscribe-status {
    text-align: center;
    font-size: 14px;
    min-height: 22px;
    margin-top: 10px;
}

.subscribe-success { color: #28a745; }
.subscribe-error { color: #dc3545; }
.subscribe-info { color: #4a9eff; }

.subscribe-privacy {
    text-align: center;
    font-size: 13px;
    color: #666;
}

.subscribe-privacy a { color: #888; }

/* Landing Footer */
.landing-footer {
    margin-top: 60px;
    text-align: center;
    font-size: 12px;
    color: #555;
    line-height: 1.8;
}

.landing-footer a { color: #666; }

/* ===== Page Layout (privacy, unsubscribe) ===== */
.page-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 5px;
}

.page-header p {
    color: #888;
    font-size: 14px;
}

.page-content h2 {
    color: #ffffff;
    font-size: 1.3em;
    margin: 30px 0 10px;
}

.page-content h3 {
    color: #ddd;
    font-size: 1.1em;
    margin: 20px 0 8px;
}

.page-content p, .page-content li {
    color: #bbb;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.page-content ul {
    padding-left: 25px;
    margin-bottom: 15px;
}

.page-nav {
    margin-bottom: 20px;
}

.page-nav a {
    color: #4a9eff;
    font-size: 14px;
}

/* ===== Unsubscribe Page ===== */
.unsub-container {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    background: #151515;
    padding: 40px 30px;
    border-radius: 4px;
    border: 1px solid #2a2a2a;
    margin-top: 15vh;
}

.unsub-container .icon { font-size: 48px; margin-bottom: 20px; display: block; }
.unsub-container h1 { color: #ffffff; font-size: 24px; margin-bottom: 15px; }
.unsub-container p { line-height: 1.6; margin-bottom: 12px; font-size: 15px; }
.unsub-container .email-highlight { color: #4a9eff; font-weight: 500; }

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background: #4a9eff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn:hover { background: #3a8ee6; text-decoration: none; }
.btn-secondary { background: #333; }
.btn-secondary:hover { background: #444; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }

.footer-text { color: #666; font-size: 12px; margin-top: 25px; }

/* ===== Admin ===== */
.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

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

.admin-header h1 { color: #ffffff; font-size: 1.8em; }

.admin-header-links a {
    color: #888;
    font-size: 14px;
    margin-left: 15px;
}

/* Login */
.login-wrap {
    max-width: 380px;
    margin: 15vh auto 0;
    padding: 35px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    text-align: center;
}

.login-wrap h1 { color: #fff; font-size: 1.5em; margin-bottom: 5px; }
.login-wrap p { color: #888; font-size: 14px; margin-bottom: 25px; }

.login-wrap input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 15px;
}

.login-wrap input[type="password"]:focus {
    outline: none;
    border-color: #4a9eff;
}

.login-wrap button {
    width: 100%;
    padding: 12px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
}

.login-error {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid #2a2a2a;
    flex-wrap: wrap;
}

.tab-nav a {
    padding: 10px 18px;
    font-size: 14px;
    color: #888;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.tab-nav a:hover { color: #fff; }
.tab-nav a.active { color: #4a9eff; border-bottom-color: #4a9eff; }

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 18px;
    text-align: center;
}

.stat-card .number { font-size: 2em; font-weight: 700; color: #4a9eff; }
.stat-card .label { font-size: 13px; color: #888; margin-top: 4px; }

/* Niche grid */
.niche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.niche-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 16px;
    text-align: center;
}

.niche-card:hover { border-color: #4a9eff; }
.niche-card h4 { color: #ccc; font-size: 13px; font-weight: normal; margin-bottom: 6px; }
.niche-card .count { font-size: 1.8em; font-weight: 700; color: #4a9eff; }

/* Section */
.section { margin-bottom: 35px; }
.section h2 { color: #fff; font-size: 1.3em; margin-bottom: 15px; }
.section-note { color: #888; font-size: 14px; margin-bottom: 15px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: #1a1a1a;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 14px;
    color: #ccc;
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
    border-radius: 2px;
    font-size: 12px;
}

.badge-sent { background: rgba(40, 167, 69, 0.15); color: #28a745; }
.badge-draft { background: rgba(150, 150, 150, 0.15); color: #aaa; }
.badge-sending { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.badge-failed { background: rgba(220, 53, 69, 0.15); color: #dc3545; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a9eff;
}

.form-group textarea { resize: vertical; }
.form-group select { cursor: pointer; }
.form-help { color: #666; font-size: 12px; margin-top: 5px; display: block; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Checkbox grid for campaigns */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.target-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
    transition: border-color 0.2s;
}

.target-label:hover { border-color: #444; }
.target-label input[type="checkbox"] { accent-color: #4a9eff; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    max-width: 650px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.modal-header h3 { color: #fff; font-size: 1.1em; }

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 5px;
}

.close-btn:hover { color: #fff; }
.modal-body { padding: 20px; }

/* Alert */
.alert {
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success { background: rgba(40, 167, 69, 0.12); color: #28a745; border: 1px solid rgba(40, 167, 69, 0.3); }
.alert-error { background: rgba(220, 53, 69, 0.12); color: #dc3545; border: 1px solid rgba(220, 53, 69, 0.3); }

/* Responsive */
@media (max-width: 600px) {
    .landing-tagline { font-size: 1.3em; }
    .interests-grid { grid-template-columns: 1fr; }
    .subscribe-form { flex-direction: column; }
    .subscribe-form button { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .niche-grid { grid-template-columns: repeat(2, 1fr); }
    .target-grid { grid-template-columns: 1fr; }
    .admin-header { flex-direction: column; gap: 10px; align-items: flex-start; }
}
