/* templates/list-of-templates/style.css */
:root {
    /* Dark Theme (Default) */
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #ffffff;
    --border: #27272a;
    --card-bg: #0a0a0a;
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --btn-bg: #18181b;
    --btn-hover: #27272a;
}

[data-theme="light"] {
    --bg-color: #fcfcfc;
    --text-main: #18181b;
    --text-muted: #71717a;
    --accent: #18181b;
    --border: #e4e4e7;
    --card-bg: #ffffff;
    --btn-bg: #f4f4f5;
    --btn-hover: #e4e4e7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-main);
}

.theme-toggle {
    background: var(--btn-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

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

/* Toggle logic for icons */
[data-theme="light"] .sun-icon {
    display: none;
}
[data-theme="light"] .moon-icon {
    display: block;
}

:root:not([data-theme="light"]) .sun-icon {
    display: block;
}
:root:not([data-theme="light"]) .moon-icon {
    display: none;
}

header {
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.sub-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    background: var(--btn-bg);
    display: inline-block;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.template-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.template-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.12); /* White shadow for Dark Theme */
}

[data-theme="light"] .template-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Black shadow for Light Theme */
}

.template-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.25); /* Stronger white shadow on hover */
    border-color: #777;
}

[data-theme="light"] .template-item:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); /* Stronger black shadow on hover */
    border-color: #a1a1aa;
}

.template-name {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.template-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: auto;
    line-height: 1.5;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
    .template-list {
        grid-template-columns: 1fr;
    }
}

