@font-face {
    font-family: 'Ponomar';
    src: url('assets/Ponomar-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --header-border: #cbd5e1;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-title-bg: #f1f5f9;
    --cell-border: #e2e8f0;
    --cell-hover: #f1f5f9;
    --accent: #2563eb;
    --modal-bg: rgba(0, 0, 0, 0.4);
    --modal-content-bg: #ffffff;
    --button-bg: #0f172a;
    --button-text: #ffffff;
    --button-hover: #334155;
}

[data-theme="dark"] {
    --bg-color: #0f1115;
    --text-color: #e2e8f0;
    --header-border: #334155;
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-title-bg: #0f172a;
    --cell-border: #334155;
    --cell-hover: #334155;
    --accent: #60a5fa;
    --modal-bg: rgba(0, 0, 0, 0.7);
    --modal-content-bg: #1e293b;
    --button-bg: #e2e8f0;
    --button-text: #0f172a;
    --button-hover: #cbd5e1;
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-color);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-top: 10px;
    flex-wrap: wrap;
    gap: 20px;
}

.brand-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 15px;
}

.logo {
    width: 90px;
    height: auto;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10 10, auto;
}

[data-theme="dark"] .logo {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10 10, auto;
}

.brand-name {
    font-family: 'Ponomar', sans-serif;
    font-size: 2.5rem;
    margin: 0;
    font-weight: normal;
}

/* Header Nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.theme-btn:hover {
    background-color: var(--cell-hover);
}

/* Container */
.container {
    padding: 0;
    min-height: 300px;
}

/* Grid Layout for Categories */
#content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    align-items: start;
}

/* Modern Table Style */
.category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0; /* Sharp corners */
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.category-title {
    background-color: var(--card-title-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 18px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
}

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

.tools-list li {
    border-bottom: 1px solid var(--cell-border);
    padding: 14px 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, padding-left 0.2s ease;
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list li:hover {
    background-color: var(--cell-hover);
    padding-left: 22px; /* Slight indent on hover to feel interactive */
}

.tool-name {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--modal-content-bg);
    padding: 30px;
    border: 1px solid var(--card-border);
    border-radius: 0;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    color: var(--text-color);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.modal-image-container {
    width: 100%;
    margin: 20px 0;
    border: 1px solid var(--card-border);
    border-radius: 0;
    overflow: hidden;
    background: var(--card-title-bg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImage {
    width: 100%;
    height: auto;
    display: block;
}

#modalDescription {
    margin-bottom: 25px;
    font-size: 1.05rem;
    color: var(--text-color);
    opacity: 0.9;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--button-bg);
    color: var(--button-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.button:hover {
    background: var(--button-hover);
}
