/* ===== ENGINEMC Regole - Unified Style ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

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

:root {
    --bg: #0b0d14;
    --bg-alt: #10131e;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-hover: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-hover: rgba(255, 255, 255, 0.14);
    --text: #e8ecf1;
    --text-dim: #8b95a8;
    --text-muted: #5a6478;
    --accent: #2D87EA;
    --accent-dark: #1a6fd4;
    --accent-glow: rgba(45, 135, 234, 0.3);
    --accent-soft: rgba(45, 135, 234, 0.08);
    --green: #22c55e;
    --store-green: #ACD93E;
    --survival-color: #4ade80;
    --cobblemon-color: #a855f7;
    --geopol-color: #38bdf8;
    --warn: #fbbf24;
    --mute: #f97316;
    --ban: #ef4444;
    --permanent: #dc2626;
    --radius: 16px;
    --radius-lg: 22px;
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --font: 'Poppins', system-ui, sans-serif;
    --font-display: 'Rajdhani', 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 14px 0;
    transition: all 0.4s var(--ease);
    background: transparent;
}
.header.scrolled {
    background: rgba(11, 13, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
}
.header-inner {
    max-width: 1140px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img {
    height: 36px; width: 36px; border-radius: 8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    transition: transform 0.3s var(--ease);
}
.logo:hover .logo-img { transform: scale(1.05); }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 700; color: var(--text);
    letter-spacing: 0.02em;
}

.nav ul { list-style: none; display: flex; gap: 4px; }
.nav-link {
    color: var(--text-dim); text-decoration: none;
    font-size: 0.88rem; font-weight: 500;
    padding: 8px 16px; border-radius: 10px;
    transition: all 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active {
    color: var(--text); background: rgba(255,255,255,0.06);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 50px;
    font-family: var(--font); font-size: 0.85rem; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none;
    transition: all 0.35s var(--ease);
}
.btn-discord {
    color: #fff; background: #5865F2;
    box-shadow: 0 2px 16px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover {
    background: #4752c4;
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.45);
    transform: translateY(-2px);
}
.btn-store {
    color: #1a1a1a; background: var(--store-green);
    box-shadow: 0 2px 16px rgba(172, 217, 62, 0.35);
}
.btn-store:hover {
    background: #9bc832;
    box-shadow: 0 6px 24px rgba(172, 217, 62, 0.45);
    transform: translateY(-2px);
}

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px; z-index: 101;
}
.hamburger span {
    width: 22px; height: 2px; background: var(--text);
    border-radius: 2px; transition: all 0.3s var(--ease);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 13, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 32px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all 0.4s var(--ease);
}
.mobile-menu.active {
    opacity: 1; visibility: visible; pointer-events: all;
}
.mobile-nav-links {
    list-style: none; display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.mobile-nav-link {
    color: var(--text-dim); text-decoration: none;
    font-size: 1.2rem; font-weight: 500;
    padding: 12px 32px; border-radius: 12px;
    transition: all 0.3s var(--ease);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--text); background: rgba(255,255,255,0.06);
}
.mobile-nav-actions {
    display: flex; flex-direction: column; gap: 12px; width: 80%; max-width: 280px;
}

/* ===== Page Layout ===== */
.page {
    padding-top: 100px; padding-bottom: 60px; min-height: calc(100vh - 200px);
}

/* ===== Page Header ===== */
.page-header {
    text-align: center; margin-bottom: 40px;
}
.page-header-icon {
    font-size: 3rem; margin-bottom: 12px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}
.page-header-icon.cobblemon { filter: drop-shadow(0 4px 20px rgba(168, 85, 247, 0.4)); }
.page-header-icon.survival { filter: drop-shadow(0 4px 20px rgba(74, 222, 128, 0.4)); }
.page-header-icon.geopol { filter: drop-shadow(0 4px 20px rgba(56, 189, 248, 0.4)); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700; margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.page-title.cobblemon { color: var(--cobblemon-color); }
.page-title.survival { color: var(--survival-color); }
.page-title.geopol { color: var(--geopol-color); }

.page-subtitle {
    color: var(--text-dim); font-size: 1rem;
}

/* ===== Search ===== */
.search-container { max-width: 500px; margin: 0 auto 40px; }
.search-box {
    position: relative; display: flex; align-items: center;
}
.search-icon {
    position: absolute; left: 16px;
    color: var(--text-muted); pointer-events: none;
}
.search-input {
    width: 100%; padding: 14px 44px 14px 48px;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 14px; color: var(--text);
    font-family: var(--font); font-size: 0.92rem;
    outline: none; transition: all 0.3s var(--ease);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-clear {
    position: absolute; right: 12px;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px; border-radius: 6px;
    opacity: 0; visibility: hidden;
    transition: all 0.2s var(--ease);
}
.search-clear.visible { opacity: 1; visibility: visible; }
.search-clear:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.search-results-count {
    text-align: center; margin-top: 10px;
    color: var(--text-dim); font-size: 0.82rem;
}

/* ===== Rules Section ===== */
.rules-section { display: flex; flex-direction: column; gap: 16px; }

.loading {
    text-align: center; color: var(--text-muted);
    padding: 60px 0; font-size: 0.95rem;
}

.rules-category {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s var(--ease);
}
.rules-category:hover {
    border-color: var(--glass-border-hover);
}

.rules-category-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; cursor: pointer;
    user-select: none;
    transition: background 0.2s var(--ease);
}
.rules-category-header:hover { background: rgba(255,255,255,0.02); }

.rules-category-left {
    display: flex; align-items: center; gap: 12px;
}

.rules-category-indicator {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
}
.rules-category-indicator.chat { background: var(--mute); box-shadow: 0 0 8px rgba(249,115,22,0.4); }
.rules-category-indicator.mute { background: var(--mute); box-shadow: 0 0 8px rgba(249,115,22,0.4); }
.rules-category-indicator.game { background: var(--ban); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.rules-category-indicator.warn { background: var(--warn); box-shadow: 0 0 8px rgba(251,191,36,0.4); }
.rules-category-indicator.ban { background: var(--ban); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.rules-category-indicator.permanent { background: var(--permanent); box-shadow: 0 0 8px rgba(220,38,38,0.5); }

.rules-category-title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 600; color: var(--text);
}
.rules-category-count {
    color: var(--text-muted); font-size: 0.78rem;
    background: rgba(255,255,255,0.04);
    padding: 3px 10px; border-radius: 50px;
}

.rules-category-toggle {
    color: var(--text-muted);
    transition: transform 0.3s var(--ease);
    flex-shrink: 0;
}

/* Accordion expand/collapse */
.rules-category-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease);
}
.rules-category.expanded .rules-category-content {
    max-height: 2000px;
}
.rules-category.expanded .rules-category-toggle {
    transform: rotate(180deg);
}

.rules-list { padding: 0 24px 18px; }

.rule-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 13px 0;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.25s var(--ease);
}
.rule-item:last-child { border-bottom: none; }
.rule-item:hover { padding-left: 8px; }
.rule-item.hidden { display: none; }
.rule-item.highlight { background: rgba(45, 135, 234, 0.06); border-radius: 8px; padding: 13px 12px; }

.rule-infraction {
    flex: 1; font-size: 0.9rem; font-weight: 500; color: var(--text);
}
.rule-punishment {
    display: inline-flex; align-items: center;
    padding: 5px 14px; border-radius: 50px;
    font-size: 0.76rem; font-weight: 600;
    white-space: nowrap;
}
.rule-punishment.warn { background: rgba(251,191,36,0.12); color: var(--warn); }
.rule-punishment.mute { background: rgba(249,115,22,0.12); color: var(--mute); }
.rule-punishment.ban { background: rgba(239,68,68,0.12); color: var(--ban); }
.rule-punishment.permanent { background: rgba(220,38,38,0.2); color: #fca5a5; border: 1px solid rgba(220,38,38,0.25); }
.rule-punishment.blacklist { background: rgba(220,38,38,0.25); color: #fecaca; border: 1px solid rgba(220,38,38,0.35); }
.rule-punishment.revoca { background: rgba(251,191,36,0.12); color: var(--warn); }
.rule-punishment.info { background: rgba(45,135,234,0.12); color: var(--accent); }

/* No Results */
.no-results { text-align: center; padding: 60px 0; }
.no-results-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.no-results-text { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Unban CTA ===== */
.unban-cta {
    text-align: center; margin-top: 40px;
    background: var(--glass); border: 1px solid rgba(239,68,68,0.15);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
}
.unban-cta-title {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 700;
    color: var(--text); margin-bottom: 8px;
}
.unban-cta-text {
    color: var(--text-dim); font-size: 0.92rem;
    margin-bottom: 20px;
}
.btn-unban {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 50px;
    font-family: var(--font); font-size: 0.92rem; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none;
    background: linear-gradient(135deg, var(--ban) 0%, var(--permanent) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    transition: all 0.35s var(--ease);
}
.btn-unban:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

/* ===== Hero Section (Home) ===== */
.hero {
    position: relative; min-height: 100vh;
    padding: 140px 0 60px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(45,135,234,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(168,85,247,0.06) 0%, transparent 60%);
}
.hero-particles {
    position: absolute; inset: 0; pointer-events: none;
}
.particle {
    position: absolute;
    width: 3px; height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    animation: particleFloat 15s ease-in-out infinite;
}
@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    50% { transform: translate(calc(-50px + 100px * var(--rand, 0.5)), -120px); }
}

.hero-content {
    position: relative; z-index: 1;
    text-align: center; padding: 0 24px;
    max-width: 900px; width: 100%;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: 50px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.2);
    margin-bottom: 24px; font-size: 0.82rem;
    color: var(--green); font-weight: 500;
}
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800; line-height: 1.1;
    margin-bottom: 16px; letter-spacing: -0.02em;
}
.hero-title span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--cobblemon-color) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    color: var(--text-dim); font-size: 1.05rem;
    max-width: 540px; margin: 0 auto 48px;
    line-height: 1.7;
}

/* Hero mode cards */
.hero .mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px; max-width: 1080px; margin: 0 auto;
}
.mode-card {
    display: flex; flex-direction: column;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s var(--ease);
    position: relative;
}
.mode-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
}
.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    background: var(--glass-hover);
}
.mode-card.cobblemon { border-color: rgba(168,85,247,0.15); }
.mode-card.cobblemon:hover { border-color: rgba(168,85,247,0.4); box-shadow: 0 16px 40px rgba(168,85,247,0.1); }
.mode-card.survival { border-color: rgba(74,222,128,0.15); }
.mode-card.survival:hover { border-color: rgba(74,222,128,0.4); box-shadow: 0 16px 40px rgba(74,222,128,0.1); }
.mode-card.geopol { border-color: rgba(56,189,248,0.15); }
.mode-card.geopol:hover { border-color: rgba(56,189,248,0.4); box-shadow: 0 16px 40px rgba(56,189,248,0.1); }

.mode-card-link {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text);
    padding: 32px 24px 20px;
}
.mode-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.mode-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 700; margin-bottom: 6px;
}
.mode-card.cobblemon .mode-card-title { color: var(--cobblemon-color); }
.mode-card.survival .mode-card-title { color: var(--survival-color); }
.mode-card.geopol .mode-card-title { color: var(--geopol-color); }
.mode-card-desc {
    color: var(--text-dim); font-size: 0.85rem; line-height: 1.6; text-align: center;
}

.hero-ip-box {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 20px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--glass-border);
}
.hero-ip-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 2px; }
.hero-ip {
    font-family: var(--font-display);
    font-size: 0.92rem; font-weight: 600;
}
.hero-ip.cobblemon { color: var(--cobblemon-color); }
.hero-ip.survival { color: var(--survival-color); }
.hero-ip.geopol { color: var(--geopol-color); }

.hero-ip-copy {
    padding: 6px 16px; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-dim); font-family: var(--font);
    font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s var(--ease);
}
.hero-ip-copy:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.hero-ip-copy.copied { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }

/* ===== Footer ===== */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--glass-border);
    padding: 48px 0 28px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1140px; margin: 0 auto; padding: 0 24px;
}
.footer-top {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 24px;
    margin-bottom: 32px; padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}
.footer-info { display: flex; flex-direction: column; gap: 12px; }
.footer-brand {
    display: flex; align-items: center; gap: 10px;
}
.footer-brand img { height: 32px; width: 32px; border-radius: 6px; }
.footer-brand span {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 700;
}
.footer-desc { color: var(--text-dim); font-size: 0.85rem; max-width: 300px; }

.footer-socials { display: flex; gap: 12px; }
.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--glass); border: 1px solid var(--glass-border);
    color: var(--text-dim); text-decoration: none;
    transition: all 0.3s var(--ease);
}
.social-link:hover {
    color: var(--text); background: var(--glass-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px;
}
.footer-copyright { color: var(--text-muted); font-size: 0.78rem; }
.footer-links { display: flex; gap: 16px; }
.footer-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.78rem; transition: color 0.2s var(--ease);
}
.footer-link:hover { color: var(--text-dim); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav, .nav-actions { display: none; }
    .hamburger { display: flex; }

    .page { padding-top: 80px; padding-bottom: 40px; }
    .page-header { margin-bottom: 28px; }

    .hero { padding: 110px 0 40px; }
    .hero-content { padding: 0 16px; }
    .hero .mode-cards { grid-template-columns: 1fr; }
    .hero-title { font-size: clamp(2rem, 5vw, 3rem); }

    .rules-category-header { padding: 14px 16px; }
    .rules-list { padding: 0 16px 14px; }
    .rule-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .rule-item:hover { padding-left: 0; }

    .search-container { margin-bottom: 28px; }

    .unban-cta { padding: 28px 20px; }

    .footer-top { flex-direction: column; text-align: center; align-items: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
