@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #06b6d4;
    --primary-dim: #0891b2;
    --secondary: #ea580c;
    --secondary-dim: #c2410c;
    --dark: #0a0a0f;
    --dark-elevated: #0f0f18;
    --dark-gray: #14141f;
    --dark-gray-border: #1e1e2e;
    --light: #f4f4f5;
    --gray: #71717a;
    --border-radius: 3px;
    --border-accent: 2px solid var(--primary);
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dim);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animation classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Buttons – kantig, klare Kanten */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dim);
    border-color: var(--primary-dim);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary-dim);
    border-color: var(--secondary-dim);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--dark-gray-border);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
}

/* Cards – kantig, Akzent-Linie links */
.card {
    background: var(--dark-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--dark-gray-border);
    border-left: 3px solid var(--primary);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--dark-gray-border);
}

/* Admin Panel Styles */
.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.max-h-90vh {
    max-height: 90vh;
}

/* Forms */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--dark-gray-border);
    background-color: var(--dark-gray);
    color: var(--light);
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}

/* Utility classes */
.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.bg-primary {
    background-color: var(--primary);
    color: var(--dark);
}

.bg-secondary {
    background-color: var(--secondary);
}

.bg-dark {
    background-color: var(--dark);
}

.bg-dark-gray {
    background-color: var(--dark-elevated);
    border-top: 1px solid var(--dark-gray-border);
    border-bottom: 1px solid var(--dark-gray-border);
}

/* Responsive typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 2rem; }
    h4 { font-size: 1.75rem; }
}

/* Loading dots animation */
.loading-dots {
    display: inline-block;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.count-up-live {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Hero – linksbündiger Inhalt */
.hero-content {
    max-width: 42rem;
    padding: 2rem 0 4rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 0;
    }
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.hero-overlay {
    background: linear-gradient(105deg, var(--dark) 0%, var(--dark) 35%, transparent 65%),
                linear-gradient(180deg, transparent 55%, var(--dark) 100%);
}

/* Stats – eine horizontale Leiste */
.stats-bar {
    background: var(--primary);
    color: var(--dark);
    padding: 1.25rem 0;
    border-top: 2px solid rgba(0,0,0,0.1);
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.stats-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0 1.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .stat-divider { display: none; }
    .stat-item { padding: 0.5rem 0; min-width: 33%; }
}

/* Features – Bento-Grid */
.section-features {
    padding: 4rem 0 5rem;
    background: var(--dark);
}

.section-heading-left {
    margin-bottom: 2.5rem;
    max-width: 28rem;
}

.section-tag {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.features-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    max-width: 56rem;
}

.feature-card {
    padding: 1.5rem 1.5rem 1.75rem;
}

.feature-card-a {
    grid-column: 1;
    grid-row: 1;
}

.feature-card-b {
    grid-column: 2;
    grid-row: 1;
}

.feature-card-wide {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 1.25rem 1.75rem;
}

.feature-wide-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.feature-wide-inner .feature-icon {
    flex-shrink: 0;
}

.feature-wide-inner .feature-title {
    margin-bottom: 0.25rem;
}

.feature-wide-inner p {
    margin: 0;
}

.feature-icon {
    margin-bottom: 0.75rem;
}

.feature-icon i,
.feature-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--gray);
}

@media (max-width: 768px) {
    .features-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .feature-card-a,
    .feature-card-b,
    .feature-card-wide {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Join – zweispaltig */
.section-join {
    padding: 4rem 0;
    background: var(--dark-elevated);
    border-top: 1px solid var(--dark-gray-border);
}

.join-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--secondary);
}

.join-text {
    flex: 1;
    min-width: 200px;
}

.join-cta {
    flex-shrink: 0;
}

/* Regelwerk-spezifische Blöcke (kantig) */
.rule-block {
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary);
}

.rule-cta-box {
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
}

/* Regelwerk – Zwei Spalten mit Sidebar (Stil wie Hauptseite) */
.rules-section {
    padding: 3rem 0 4rem;
    min-height: 60vh;
    background: var(--dark);
}

.rules-section .rules-main {
    padding-top: 0;
}

.rules-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 900px) {
    .rules-layout {
        grid-template-columns: 220px 1fr;
        gap: 3rem;
        padding: 0 2rem;
    }
}

.rules-sidebar {
    order: -1;
}

@media (min-width: 900px) {
    .rules-sidebar {
        position: sticky;
        top: 5rem;
        align-self: start;
        order: 0;
    }
}

.rules-sidebar-inner {
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 3px solid var(--primary);
}

.rules-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
}

.rules-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rules-nav-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    transition: color 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

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

.rules-nav-link:focus,
.rules-nav-link:target {
    color: var(--primary);
    border-left-color: var(--primary);
}

.rules-join-btn {
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
}

.rules-header {
    margin-bottom: 1.5rem;
}

.rules-header.section-heading-left {
    max-width: none;
}

/* Suchleiste Regelwerk */
.rules-search-wrap {
    margin-bottom: 2rem;
}

.rules-search-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    padding: 0 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 28rem;
}

.rules-search-inner:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.rules-search-icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--gray);
}

.rules-search-inner:focus-within .rules-search-icon {
    color: var(--primary);
}

.rules-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.875rem 0;
    background: none;
    border: none;
    color: var(--light);
    font-family: inherit;
    font-size: 0.95rem;
}

.rules-search-input::placeholder {
    color: var(--gray);
}

.rules-search-input:focus {
    outline: none;
}

.rules-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: color 0.2s ease, background 0.2s ease;
}

.rules-search-clear:hover {
    color: var(--light);
    background: var(--dark-gray-border);
}

.rules-search-clear i,
.rules-search-clear svg {
    width: 1rem;
    height: 1rem;
}

.rules-search-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray);
}

.rules-no-results {
    padding: 2rem;
    text-align: center;
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    color: var(--gray);
    margin-bottom: 2rem;
}

.rules-no-results p {
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Regel-Gruppen – Karten wie Hauptseite */
.rule-group {
    background: var(--dark-gray);
    border: 1px solid var(--dark-gray-border);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
    border-left: 3px solid var(--primary);
    scroll-margin-top: 5rem;
    transition: box-shadow 0.2s ease;
}

.rule-group:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.rule-group-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark-gray-border);
}

/* Regel-Liste mit Nummern-Badge */
.rule-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rule;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--dark-gray-border);
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.55;
    counter-increment: rule;
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-item::before {
    content: counter(rule);
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-elevated);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--border-radius);
}

.rule-item.rule-item--hidden {
    display: none;
}

.rule-group.rule-group--hidden {
    display: none;
}

.rule-item mark {
    background: rgba(6, 182, 212, 0.35);
    color: var(--light);
    padding: 0.1em 0.2em;
    border-radius: 1px;
}
