/* Magic UI: Magic-Card mit Spotlight-Effekt für Tiles */
.widget-tile {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    background: var(--color-background);
    padding: 25px;
    margin: 15px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

/* Magic UI: Spotlight-Effekt (Magic-Card) */
.widget-tile::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

/* Magic UI: Border-Beam Effekt */
.widget-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.widget-tile > * {
    position: relative;
    z-index: 2;
}

.widget-tile:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    border-color: rgba(203, 213, 224, 0.6);
}

/* Magic UI: Spotlight aktivieren beim Hover */
.widget-tile:hover::before {
    opacity: 1;
}

/* Magic UI: Border-Beam aktivieren beim Hover */
.widget-tile:hover::after {
    opacity: 1;
    animation: tile-border-beam 2s linear infinite;
}

/* Magic UI: Border-Beam Animation Keyframes */
@keyframes tile-border-beam {
    0% {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    }
    50% {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.4));
    }
    100% {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    }
}

/* Magic UI: Reduced-Motion Support für Accessibility */
@media (prefers-reduced-motion: reduce) {
    .widget-tile:hover::after {
        animation: none;
    }

    .widget-tile {
        transition: none;
    }
}

.widget-tile-number {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-xxl);
    line-height: var(--line-height-base);
    text-align: center;
    margin-bottom: 10px;
}

.widget-tile-text {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    text-align: center;
}

.widget-tile-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.widget-tiles-row {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.widget-tiles-row .widget-tile {
    flex: 1 1 0;
    min-width: 200px;
    height: 200px;
    width: auto;
}

/* Responsive Design - Regel 022: 4 Breakpoints */
/* Mobile (max-width: 576px) - Regel 003 von 011-ui-mobile.mdc */
@media (max-width: 576px) {
    .widget-tile {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tablet/iPad (600px–768px) */
@media (min-width: 600px) and (max-width: 768px) {
    .widget-tile {
        padding: 25px;
    }
}

/* Kleiner Desktop/13-Zoll (1024px–1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .widget-tile {
        padding: 25px;
    }
}

/* Großer Desktop/Widescreen (min-width: 1440px) */
@media (min-width: 1440px) {
    .widget-tile {
        padding: 25px;
    }
}
