:root {
    color-scheme: light dark;

    --bg: light-dark(#f5f7f9, #121212);
    --card: light-dark(#ffffff, #1e1e1e);
    --text: light-dark(#1a202c, #f2f2f2);
    --muted: #64748b;
    --primary: hsl(113, 61%, 41%);
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* TOP BAR */
.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--card);
    border-bottom: 1px solid light-dark(#e2e8f0, #2a2a2a);
}

/* LOGO */
.logo {
    margin: 0;
    font-size: 18px;
    color: var(--primary);
}

/* SEARCH */
.search {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 460px;
    padding: 9px 16px;
    border: 1.5px solid light-dark(#e2e8f0, #2a2a2a);
    border-radius: 999px;
    font-size: 14px;
    background: light-dark(#f8f9fa, #1a1a1a);
    color: var(--text);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}


.nav a {
    margin-left: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}

.nav a:hover {
    color: var(--primary);
}


.main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.main-vertical {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}


.section-title {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* CATEGORY CARD */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid light-dark(#e2e8f0, #2a2a2a);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card p {
    margin-top: 6px;
    color: var(--muted);
}

/* RESULTS */
.results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* RESULT CARD */
.result-card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid light-dark(#e2e8f0, #2a2a2a);
    cursor: pointer;
}

.result-card h4 {
    margin: 0 0 6px 0;
}

/* CATEGORY TEXT */
.category {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

/* EMPTY STATE */
.empty {
    text-align: center;
    color: var(--muted);
    padding: 20px;
}

.section-header {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.actions {
    gap: 0.5rem;
    align-items: center;
}

.actions button {
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid hsl(113, 61%, 41%);
    background-color: light-dark(#ffffff, #1e1e1e);
    cursor: pointer;
}

.actions form {
    gap: 6px;
    align-items: center;
}

/* AUTH PAGES - Login and Signup */
.insert_in_page {
    max-width: 450px;
    margin: 60px auto;
    padding: 40px;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid light-dark(#e2e8f0, #2a2a2a);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.insert_in_page p {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 30px;
}

.insert_in_page form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.insert_in_page input {
    padding: 12px 16px;
    border: 1.5px solid light-dark(#e2e8f0, #2a2a2a);
    border-radius: 8px;
    font-size: 14px;
    background: light-dark(#f8f9fa, #1a1a1a);
    color: var(--text);
    transition: border-color 0.3s;
}

.insert_in_page input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(113, 161, 79, 0.1);
}

.insert_in_page input::placeholder {
    color: var(--muted);
}

.insert_in_page button {
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.insert_in_page button:hover {
    background: hsl(113, 61%, 35%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 161, 79, 0.3);
}

.insert_in_page button:active {
    transform: translateY(0);
}

.insert_in_page button.invisible {
    background: transparent;
    color: var(--muted);
    padding: 8px;
    font-size: 18px;
}

.insert_in_page button.invisible:hover {
    background: light-dark(#e2e8f0, #2a2a2a);
    transform: none;
    box-shadow: none;
}

.insert_in_page > div {
    margin-bottom: 20px;
}

#toggle {
    background: light-dark(#f8f9fa, #1a1a1a);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid light-dark(#e2e8f0, #2a2a2a);
    margin-top: 12px;
}

#toggle p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.insert_in_page a {
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.insert_in_page a:hover {
    color: hsl(113, 61%, 35%);
    text-decoration: underline;
}

.home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.home-link a {
    margin: 0;
    font-size: 14px;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s;
}

.home-link a:hover {
    color: var(--primary);
}

.home-link-icon {
    font-size: 16px;
}

/* ── Comments panel ── */
.comments{
    display:grid;
    grid-template-columns: auto auto;
    min-height: 0;
}

.comments-collapsable {
    border-left: 1px solid white;
    background: rgb(33, 134, 33);
    overflow-y: auto;
    padding: 20px 16px;
    max-height: 100%;
    width: 300px;
    overflow: auto;
    min-height: 0;
}

.comment-card {
    border: 1.5px solid white;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: white;
}

.comment-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-bubble {
    background: light-dark(hsl(113, 61%, 38%), hsl(113, 40%, 38%));
    border-radius: 25%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 5px;
}
.comment-bubble svg { width: 17px; height: 17px; color: #ffffff; }

.comment-username {
    font-weight: 600;
    font-size: 14px;
}

.comment-text {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
}

.comments-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.comments-label {
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color:#64748b;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.1s;
}
.toggle-btn:hover { background: white; }

.comments-collapsed {
    display: none;
}
