/* KACHEL-PANZERUNG v4.0 - SAUBER */

/* === GRID === */
.wi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
}

@media (max-width: 1024px) { .wi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wi-grid { grid-template-columns: 1fr; padding: 20px; } }

/* === KACHEL === */
.wi-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    min-height: 180px;
    text-align: center;
}

.wi-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.wi-tile--1x1 { grid-column: span 1; grid-row: span 1; }
.wi-tile--2x1 { grid-column: span 2; grid-row: span 1; }
.wi-tile--1x2 { grid-column: span 1; grid-row: span 2; min-height: 380px; }
.wi-tile--2x2 { grid-column: span 2; grid-row: span 2; min-height: 380px; }

@media (max-width: 600px) {
    .wi-tile--2x1, .wi-tile--1x2, .wi-tile--2x2 { grid-column: span 1; grid-row: span 1; min-height: 180px; }
}

/* === ICON === */
.wi-tile__icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
    background: transparent;
}

.wi-tile__icon i {
    font-size: 2rem;
    line-height: 1;
    color: var(--tile-accent, #c9a227);
}

/* === WERT/EINHEIT/NAME === */
.wi-tile__value {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 6px;
}

.wi-tile__unit {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.wi-tile__name {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* === PATTERNS === */
.wi-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
}

.pattern-dots::before {
    background-image: radial-gradient(var(--tile-accent, #c9a227) 1px, transparent 1px);
    background-size: 16px 16px;
}

.pattern-grid::before {
    background-image: linear-gradient(var(--tile-accent, #c9a227) 1px, transparent 1px),
        linear-gradient(90deg, var(--tile-accent, #c9a227) 1px, transparent 1px);
    background-size: 24px 24px;
}

.pattern-waves::before {
    background: repeating-linear-gradient(45deg, var(--tile-accent, #c9a227), var(--tile-accent, #c9a227) 1px, transparent 1px, transparent 12px);
}

.pattern-stripes::before {
    background: repeating-linear-gradient(90deg, var(--tile-accent, #c9a227), var(--tile-accent, #c9a227) 1px, transparent 1px, transparent 24px);
}

.pattern-gradient::before {
    background: radial-gradient(circle at 30% 30%, var(--tile-accent, #c9a227), transparent 70%);
    opacity: 0.1;
}

.pattern-none::before { display: none; }

/* === FLUX MODE === */
body.flux-mode { background: #10141a; }
body.flux-mode .wi-tile { background: #161a22; border-color: rgba(255,255,255,0.05); }
body.flux-mode .wi-tile__icon i { animation: iconPulse 2s ease-in-out infinite; }

@keyframes iconPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
}

/* === HEADER === */
.wi-header {
    border-bottom: none !important;
    overflow: visible !important;
}

.wi-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* === TAGLINE: Handy verstecken === */
@media (max-width: 768px) {
    .wi-header__tagline {
        display: none !important;
    }
}

/* === HAWK BOT === */
.wi-hawk {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.wi-hawk__trigger {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.wi-hawk__avatar {
    position: relative;
    width: 64px;
    height: 64px;
}

.wi-hawk__avatar::before,
.wi-hawk__avatar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #c9a227;
    animation: hawkPulse 2s ease-out infinite;
}

.wi-hawk__avatar::after {
    animation-delay: 0.5s;
}

@keyframes hawkPulse {
    0% { width: 64px; height: 64px; opacity: 0.8; }
    100% { width: 100px; height: 100px; opacity: 0; }
}

.hawk-bot {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.hawk-bot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

body.flux-mode .wi-hawk__avatar::before,
body.flux-mode .wi-hawk__avatar::after {
    border-color: #ff006e;
}

/* === MOBILE === */
@media (max-width: 768px) {
    .wi-hawk {
        bottom: 20px;
        right: 20px;
    }
    .wi-hawk__avatar,
    .hawk-bot {
        width: 52px;
        height: 52px;
    }
    .wi-hawk__avatar::before,
    .wi-hawk__avatar::after {
        width: 52px;
        height: 52px;
    }
}

/* === DE/EN TOGGLE GLEICH WIE DELUX/FLUX === */
.wi-toggle-group--round {
    border-radius: 4px !important;
}

.wi-toggle-group--round .wi-toggle-group__btn {
    border-radius: 0 !important;
}
