Files
EpicNext-Cms/src/app/globals.css
T
Simo e19debb795 Port AtomCMS atom theme faithfully (Tailwind v4 + real CSS/assets + shell)
Make the template match the atom theme, not just approximate it:
- Add Tailwind v4 (+forms/typography plugins, postcss) and port the real atom
  CSS (global.css + atom app.css) into globals.css: nav-item underline, currency
  + navigation icon classes, site-bg, card-base/hover-lift, text utils — asset
  paths adapted to /assets.
- Copy the real theme assets (backgrounds, icons/currency/navigation, profile,
  leaderboards) into public/assets.
- Rebuild the shell 1:1 from the atom Blade: TopHeader (currency pills +
  user/admin dropdowns, auth-only), SiteHeader (header image + black/50 overlay,
  logo+online+Nitro client / guest Login+Create-account CTA), Navigation (white
  bar, nav-item + Community/Assistance dropdowns), Footer. ThemeVars injects the
  DB-driven CSS custom properties into :root like app.blade.php. Layout uses the
  atom body/site-bg + grid-cols-12 max-w-7xl content wrapper.

Verified: tsc 0, next build exit 0; curl confirms the atom markup, compiled CSS
references the assets, and background-light.jpg + currency/navigation icons all
serve 200.
2026-06-28 14:50:09 +02:00

358 lines
8.9 KiB
CSS

@import "tailwindcss";
@plugin "@tailwindcss/forms";
@plugin "@tailwindcss/typography";
@custom-variant dark (&:where(.dark, .dark *));
@theme {
--font-sans: var(--font-nunito), "Nunito", ui-sans-serif, system-ui, -apple-system,
"Segoe UI", sans-serif;
--breakpoint-sm: 40rem;
--breakpoint-md: 48rem;
--breakpoint-lg: 64rem;
--breakpoint-xl: 80rem;
--breakpoint-2xl: 96rem;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}
/* Default theme variables (faithful to AtomCMS app.blade.php). ThemeVars may
override these at runtime from website_settings. */
:root {
--color-primary: #f59e0b;
--color-primary-hover: #cf9d15;
--color-background: #f8fafc;
--color-surface: #ffffff;
--color-dropdown: #ffffff;
--color-navbar: #ffffff;
--color-navbar-text: #1e293b;
--color-text: #0f172a;
--color-text-muted: #64748b;
--color-accent: #10b981;
--color-danger: #ef4444;
--button-color: #f59e0b;
--button-text-color: #1e293b;
--button-secondary-color: #22c55e;
--button-secondary-text-color: #ffffff;
--button-secondary-hover-color: #16a34a;
--button-danger-color: #ef4444;
--button-danger-text-color: #ffffff;
--button-danger-hover-color: #dc2626;
--button-outline-color: #eeb425;
--button-outline-text-color: #1a1a2e;
--button-outline-hover-color: #cf9d15;
--border-radius: 12px;
--border-color: #eeb425;
--font-family: var(--font-nunito), "Nunito", sans-serif;
--size-heading-h1: 32px;
--size-heading-h2: 24px;
--size-heading-h3: 20px;
--avatar-border-radius: 8px;
--avatar-border-color: #eeb425;
--badge-background: #eeb425;
--badge-text-color: #000000;
--badge-border-radius: 4px;
--card-border-radius: 12px;
--link-color: #eeb425;
--link-hover-color: #cf9d15;
--input-border-color: #4b5563;
--input-focus-color: #eeb425;
--navbar-height: 64px;
}
html {
scroll-behavior: smooth;
}
body {
font-family: var(--font-family);
color: var(--color-text, #0f172a);
}
::-webkit-scrollbar-thumb {
border-radius: 100px;
border: 4px solid transparent;
background-clip: content-box;
background-color: #2c3039;
}
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: transparent;
}
/* ── Atom theme components ────────────────────────────────── */
@layer components {
.nav-item {
@apply flex h-auto md:h-[60px] items-center text-[14px] font-semibold uppercase transition duration-200 ease-in-out md:border-b-4! md:border-transparent! md:hover:border-b-[#eeb425]!;
color: var(--color-navbar-text, #1e293b);
}
.dropdown-item {
@apply block py-2 px-4 font-semibold transition duration-200;
color: var(--color-text);
}
.dropdown-item:hover {
background-color: var(--color-primary, #eeb425);
color: var(--button-text-color, #1a1a2e);
}
}
/* ── Atom icons / backgrounds (asset paths adapted to /assets) ── */
.icon-base {
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
.nav-credit-icon {
background: #e9b124 url("/assets/images/icons/currency/credits.png") no-repeat center;
outline: 1px solid #b26d18;
}
.nav-ducket-icon {
background: #c44aac url("/assets/images/icons/currency/duckets.png") no-repeat center;
outline: 1px solid #812378;
}
.nav-diamond-icon {
background: #caf1f3 url("/assets/images/icons/currency/diamonds.png") no-repeat center;
outline: 1px solid #6caff4;
}
.navigation-icon {
width: 20px;
height: 25px;
background-repeat: no-repeat;
background-position: center;
}
.navigation-icon.shop {
background-image: url("/assets/images/icons/navigation/shop.png");
}
.navigation-icon.leaderboards {
background-image: url("/assets/images/icons/navigation/leaderboards.png");
}
.navigation-icon.rules {
background-image: url("/assets/images/icons/navigation/rules.gif");
}
.navigation-icon.home {
background-image: url("/assets/images/icons/navigation/home.png");
}
.navigation-icon.community {
background-image: url("/assets/images/icons/navigation/community.png");
}
.site-bg {
background: url("/assets/images/background-light.jpg") no-repeat fixed right bottom;
}
.app.dark .site-bg {
background: url("/assets/images/background-dark.jpg") no-repeat fixed right bottom;
}
.text-body {
color: var(--color-text);
}
.text-muted {
color: var(--color-text-muted);
}
.text-nav {
color: var(--color-navbar-text);
}
.text-shadow {
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.transition-base {
transition: all 0.2s ease-in-out;
}
.hover-lift {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
}
.card-base {
background-color: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.card-base:hover {
box-shadow: var(--shadow-card-hover);
border-color: color-mix(in srgb, var(--color-text-muted) 25%, transparent);
}
/* ── App component classes (used across the converted pages) ── */
h1 {
font-size: 30px;
font-weight: 800;
margin: 0.2em 0 0.5em;
}
h2 {
font-size: 22px;
font-weight: 700;
}
h3 {
font-size: 18px;
font-weight: 700;
}
a {
color: var(--link-color);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.muted {
color: var(--color-text-muted);
font-size: 0.875rem;
}
.hero {
background: linear-gradient(120deg, rgba(245, 158, 11, 0.16), rgba(16, 185, 129, 0.12)),
var(--color-surface);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
border-radius: 18px;
padding: 2rem 2.25rem;
box-shadow: var(--shadow-card);
margin-bottom: 1.5rem;
}
.card {
background: var(--color-surface);
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-card);
padding: 1.1rem 1.25rem;
}
.card.hover:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
transition: all 0.2s ease-in-out;
}
.grid {
display: grid;
gap: 1rem;
}
.grid.cols-2 {
grid-template-columns: repeat(2, 1fr);
}
.grid.cols-3 {
grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
.grid.cols-2,
.grid.cols-3 {
grid-template-columns: 1fr;
}
}
.article-img {
width: 100%;
height: 140px;
object-fit: cover;
display: block;
background: linear-gradient(135deg, #fde68a, #fbbf24);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
padding: 0.5rem 1.1rem;
border-radius: var(--border-radius);
border: 2px solid transparent;
font-family: inherit;
font-weight: 700;
font-size: 14px;
cursor: pointer;
transition: all 0.18s ease-in-out;
background: #eef2f7;
color: var(--color-text);
text-decoration: none;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-card);
text-decoration: none;
}
.btn-primary {
background: var(--button-color);
color: var(--button-text-color);
}
.btn-secondary {
background: var(--button-secondary-color);
color: var(--button-secondary-text-color);
}
.btn-danger {
background: var(--button-danger-color);
color: var(--button-danger-text-color);
}
.btn-outline {
background: transparent;
border-color: var(--button-outline-color);
color: #8a6a05;
}
input,
select,
textarea {
font-family: inherit;
font-size: 14px;
padding: 0.5rem 0.7rem;
border: 2px solid color-mix(in srgb, var(--color-text-muted) 22%, transparent);
border-radius: var(--radius-sm);
background: #fbfcfe;
color: var(--color-text);
outline: none;
transition: border-color 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
border-color: var(--color-primary);
}
table {
width: 100%;
border-collapse: collapse;
}
th {
text-align: left;
color: var(--color-text-muted);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.4rem 0.5rem;
}
td {
padding: 0.55rem 0.5rem;
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.avatar {
border-radius: var(--avatar-border-radius);
background: #f1f5f9;
border: 2px solid var(--avatar-border-color);
}
.currency {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-weight: 800;
font-size: 0.85rem;
padding: 0.2rem 0.6rem 0.2rem 0.2rem;
border-radius: 999px;
background: #f8fafc;
border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);
}
.currency .coin {
width: 22px;
height: 22px;
border-radius: 999px;
display: grid;
place-items: center;
color: #fff;
font-size: 0.7rem;
}
.coin.credits {
background: #e9b124;
}
.coin.duckets {
background: #c44aac;
}
.coin.diamonds {
background: #4bc0d9;
}