/* ============================================================
   custom.css — Cocktail-Bar-Stil, Animationen, Card-Flip
   Arbeitet mit CSS Custom Properties aus header.php (:root)
   ============================================================ */

/* ----------------------------------------
   Reset / Basis
   ---------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ----------------------------------------
   Navigation
   ---------------------------------------- */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.4);
}

.site-logo {
    letter-spacing: -0.02em;
    text-decoration: none;
}

.lang-btn {
    color: var(--color-text);
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.15s;
}

.lang-btn:hover,
.lang-btn.lang-active {
    opacity: 1;
    color: var(--color-accent);
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    color: #1a1a1a;
    background: linear-gradient(135deg, var(--color-btn-from), var(--color-btn-to));
    transition: filter 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
}

/* ----------------------------------------
   Spielkacheln (index.php)
   ---------------------------------------- */
.game-tile {
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}

.game-tile:hover {
    transform: scale(1.03);
    border-color: var(--color-accent) !important;
}

.game-tile:active {
    transform: scale(0.98);
}

.games-grid {
    padding-bottom: 2rem;
}

/* ----------------------------------------
   Spielkarte
   ---------------------------------------- */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.card-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
}

@media (min-width: 640px) {
    .card-text {
        font-size: 1.5rem;
    }
}

/* Fade-Animation beim Kartenwechsel */
.card-fade {
    transition: opacity 0.18s ease;
}

.card-fade.fading {
    opacity: 0;
}

/* ----------------------------------------
   card-type Badge (Wahrheit oder Pflicht)
   ---------------------------------------- */
.card-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    background: var(--color-accent2);
}

.card-type-badge.badge-truth {
    background: var(--color-accent);
}

.card-type-badge.badge-dare {
    background: var(--color-accent2);
}

/* ----------------------------------------
   Würdest du lieber — Split-Layout
   ---------------------------------------- */
.would-you-rather-card {
    padding: 0;
    overflow: hidden;
    min-height: 260px;
}

.wyr-option-a,
.wyr-option-b {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    width: 100%;
    text-align: center;
}

.wyr-option-a {
    background: rgba(0,0,0,0.15);
}

.wyr-option-b {
    background: rgba(0,0,0,0.05);
}

.wyr-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    color: var(--color-accent2);
    display: block;
    margin-bottom: 0.4rem;
}

.wyr-text {
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

.wyr-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    background: var(--color-card-bg);
    border-top: 1px solid var(--color-card-border);
    border-bottom: 1px solid var(--color-card-border);
}

.wyr-or {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    opacity: 0.8;
}

/* ----------------------------------------
   5-Sekunden-Spiel — Timer
   ---------------------------------------- */
.timer-bar-wrapper {
    position: relative;
}

.timer-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--color-timer-bar);
    width: 100%;
    transform-origin: left;
    transition: width linear;
}

.timer-bar.timer-danger {
    background: #ef4444;
    animation: timer-pulse 0.4s ease-in-out infinite alternate;
}

@keyframes timer-pulse {
    from { opacity: 1; }
    to   { opacity: 0.5; }
}

.timer-text {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--color-timer-bar);
    transition: color 0.3s;
}

.timer-text.timer-danger {
    color: #ef4444;
}

/* Zeit abgelaufen Overlay */
.time-up-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ef4444;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    z-index: 100;
    pointer-events: none;
    animation: time-up-appear 0.2s ease-out;
}

@keyframes time-up-appear {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

.hidden {
    display: none !important;
}

/* ----------------------------------------
   Age-Gate Overlay
   ---------------------------------------- */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.age-gate-box {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.age-gate-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.age-gate-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.age-gate-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    color: var(--color-text);
    margin-bottom: 1.75rem;
}

.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-age-yes {
    width: 100%;
}

.btn-age-no {
    width: 100%;
}

/* ----------------------------------------
   Sticky Footer Ad
   ---------------------------------------- */
.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
    padding: 4px 0;
    min-height: 58px;
}

.ad-top-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 0.375rem;
}

.ad-mid-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    margin: 1.5rem 0;
    background: rgba(255,255,255,0.02);
    border-radius: 0.375rem;
}

.ad-in-game {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: rgba(255,255,255,0.02);
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

/* ----------------------------------------
   Level-Buttons (game.php)
   ---------------------------------------- */
.btn-level {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.btn-level:hover {
    border-color: var(--color-accent);
    background: rgba(255,255,255,0.03);
}

/* ----------------------------------------
   Cross-Promo Links
   ---------------------------------------- */
.cross-promo-link {
    color: var(--color-accent2);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.15s;
}

.cross-promo-link:hover {
    opacity: 0.8;
}

/* ----------------------------------------
   Back Link
   ---------------------------------------- */
.back-link {
    text-decoration: none;
    transition: opacity 0.15s;
}

.back-link:hover {
    opacity: 1 !important;
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.site-footer {
    font-size: 0.8rem;
}

.footer-copy {
    opacity: 0.4;
}

/* ----------------------------------------
   Play Main Layout
   ---------------------------------------- */
.play-main {
    position: relative;
}

.play-topbar {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.action-buttons {
    z-index: 30;
}

.tod-buttons {
    width: 100%;
}

.card-area {
    padding-bottom: 1rem;
}

.all-played-state {
    width: 100%;
    max-width: 28rem;
}

/* ----------------------------------------
   SEO Landing Page
   ---------------------------------------- */
.seo-example-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-example-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.95rem;
    color: var(--color-text);
    opacity: 0.85;
}

.seo-example-list li:last-child {
    border-bottom: none;
}

.seo-example-list li::before {
    content: '→ ';
    color: var(--color-accent);
    font-weight: 700;
}

/* ----------------------------------------
   Responsive Ad-Sichtbarkeit
   ---------------------------------------- */
.ad-mobile-only  { display: block; }
.ad-desktop-only { display: none;  }

@media (min-width: 768px) {
    .ad-mobile-only  { display: none;  }
    .ad-desktop-only { display: block; }
}

/* ----------------------------------------
   Responsive Tweaks
   ---------------------------------------- */
@media (min-width: 640px) {
    .card {
        padding: 2.5rem 2rem;
    }

    .wyr-text {
        font-size: 1.25rem;
    }

    .age-gate-box {
        padding: 3rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        gap: 1.5rem;
    }
}
