/* --- LOGIN PAGE --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    max-width: 400px;
}

.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-speed);
}

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

/* --- DASHBOARD LAYOUT --- */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.user-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* --- TABLES (Admin Only) --- */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
}

/* Sidebar Navigation Items */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none; /* Removes the blue underline */
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Hover and Active States */
.nav-item:hover, .nav-item.active {
    background: rgba(88, 101, 242, 0.1);
    color: var(--accent-color);
}

.logout-link {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.logout-link:hover {
    text-decoration: underline;
}

/* Servers Grid */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.server-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.server-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #333;
}

.btn-manage {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
}

.empty-state {
    text-align: center;
    padding: 4rem;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Server Card Layout */
.server-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.2s ease;
}

.server-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

.server-info-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Button Styling */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: filter 0.2s ease;
}

.btn-manage {
    background-color: var(--accent-color);
    color: white;
}

.btn-invite {
    background-color: #2d2d2d; /* Darker neutral button */
    color: white;
    border: 1px solid var(--border-color);
}

.btn-action:hover {
    filter: brightness(1.2);
}

.server-icon, .server-icon-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.server-icon-placeholder {
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- MANAGE PAGE COMPONENTS --- */

/* Header with larger icon */
.server-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.server-lg-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 2-Column Grid for Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.settings-card h3 {
    margin-bottom: 0.5rem;
}

.settings-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Info Card (Right Side) */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.status-online {
    color: #23a559;
    font-weight: 600;
}

/* Custom Toggle Switch (Apple/Discord Style) */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.toggle-group:hover {
    border-color: var(--border-color);
}

.toggle-group label {
    font-weight: 500;
    cursor: pointer;
}

/* The actual switch */
input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 24px;
    background: #3f4147;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="checkbox"]:checked {
    background: var(--accent-color);
}

input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.2s ease-in-out;
}

input[type="checkbox"]:checked::before {
    left: 23px;
}

/* Save Button Override */
.save-btn {
    width: 100%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: filter 0.2s;
}

.save-btn:hover {
    filter: brightness(1.1);
}

/* Inputs for Manage Page */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.styled-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.styled-input:focus {
    border-color: var(--accent-color);
}

/* Remove arrows from number input for a cleaner look */
.styled-input::-webkit-inner-spin-button,
.styled-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: #23a559; /* Discord Success Green */
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.2rem;
}

/* Table & Layout Styling */
.blacklist-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.blacklist-table thead th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.blacklist-table tbody td {
    padding: 16px 15px;
    font-size: 0.95rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blacklist-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Discord ID Styling */
code {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Action Buttons */
.btn-remove {
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-remove:hover {
    opacity: 0.8;
       text-decoration: underline;
}

/* Form Layout */
.add-entry-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 140px;
    gap: 15px;
    margin-top: 15px;
}

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

/* Layout and Form Styling */
.add-entry-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr 2fr 120px; /* Adjusted for 4 inputs + button */
    gap: 12px;
    margin-top: 15px;
    align-items: end;
}

.blacklist-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.blacklist-table thead th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.blacklist-table tbody td {
    padding: 14px 15px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Elements */
code {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
}

.evidence-link {
    color: #00a8fc;
    text-decoration: none;
    font-weight: 500;
}

.evidence-link:hover {
    text-decoration: underline;
}

.report-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .add-entry-grid { grid-template-columns: 1fr 1fr; }
    .save-btn { grid-column: span 2; }
}

/* Container for the whole section */
.search-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers items horizontally */
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.search-section h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
}

/* The Search Bar Wrapper */
.google-search-wrapper {
    width: 100%;
    max-width: 580px; /* Standard Google search width */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* The Pill-shaped Input Box */
.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    background: #2b2d31; /* Matching your dark theme */
    border: 1px solid #3f4147;
    padding: 12px 20px;
    border-radius: 24px; /* Makes it a pill shape */
    transition: box-shadow 0.2s, background-color 0.2s;
}

.search-bar:hover, .search-bar:focus-within {
    background-color: #35373c;
    box-shadow: 0 1px 6px rgba(0,0,0,0.28);
    border-color: rgba(223,225,229,0);
}

.search-bar i {
    color: #949ba4;
    margin-right: 12px;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
}

/* The Search Button Below */
.google-btn {
    background-color: #35373c;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #dbdee1;
    cursor: pointer;
    font-size: 14px;
    margin: 11px 4px;
    padding: 0 16px;
    line-height: 36px;
    min-width: 54px;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    transition: border 0.1s, color 0.1s;
}

.google-btn:hover {
    border: 1px solid #5865f2; /* Subtle blurple hint on hover */
    color: white;
}

/* Modal Background (Overlay) */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* Modal Box */
.modal-content {
    background-color: #1e1f22;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #313338;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    color: white;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #949ba4;
    font-size: 28px;
    cursor: pointer;
}

/* Result Card Styling */
.result-card {
    text-align: center;
}

.result-id-badge {
    display: inline-block;
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    padding: 8px 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    margin: 15px 0;
}

.status-clean { color: #23a55a; font-weight: bold; }
.status-blacklisted { color: #f23f43; font-weight: bold; }

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}

.error-container {
    max-width: 600px;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent-color);
}

.error-message {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--text-main);
}

.home-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-speed);
}

/* The main form container */
.report-form {
    background: #2c2c2c;        /* Dark background like Discord */
    padding: 30px;
    border-radius: 12px;        /* Smooth rounded corners */
    max-width: 500px;           /* Keep it from getting too wide */
    margin: 40px auto;          /* Center it on the page */
    box-shadow: 0 8px 24px rgba(0,0,0,0.3); /* Add some depth */
    border: 1px solid #3e3e3e;  /* Subtle border */
}

/* Styling the labels */
.report-form label {
    display: block;
    color: #b9bbbe;             /* Grayish text */
    text-transform: uppercase;  /* Pro look */
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Styling the inputs and textarea */
.report-form input, 
.report-form textarea {
    width: 100%;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #111;
    border-radius: 4px;
    color: white;
    font-family: inherit;
    margin-bottom: 20px;
    box-sizing: border-box;    /* Crucial: keeps padding from breaking width */
}

/* The focus effect */
.report-form input:focus {
    outline: none;
    border-color: #5865F2;     /* Blurple highlight */
}

.form-row {
    display: flex;
    gap: 15px; /* Puts space between the two inputs */
}

.form-row .form-group {
    flex: 1; /* Makes them take up equal width */
}

/* Add type="url" to your existing input styles */
.report-form input[type="text"],
.report-form input[type="url"],
.report-form textarea {
    width: 100%;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #111;
    border-radius: 4px;
    color: white;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Style the helper text to be subtle */
.helper-text {
    display: block;
    color: #8e9297;
    font-size: 0.8rem;
    margin-top: -15px; /* Pull it closer to the input box */
    margin-bottom: 20px;
}
