:root {
  --font-family: "Fira Sans", sans-serif;
  --font-size-base: 14.4px;
  --line-height-base: 1.96;

  --max-w: 1020px;
  --space-x: 1.42rem;
  --space-y: 1.5rem;
  --gap: 1.12rem;

  --radius-xl: 1.29rem;
  --radius-lg: 1rem;
  --radius-md: 0.7rem;
  --radius-sm: 0.33rem;

  --shadow-sm: 0 0px 5px rgba(0,0,0,0.04);
  --shadow-md: 0 5px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 14px 24px rgba(0,0,0,0.07);

  --overlay: rgba(0, 0, 0, 0.45);
  --anim-duration: 450ms;
  --anim-ease: cubic-bezier(0.4,0,0.2,1);
  --random-number: 1;

  --brand: #1a5fb4;
  --brand-contrast: #ffffff;
  --accent: #f9a825;
  --accent-contrast: #1a1a1a;

  --neutral-0: #ffffff;
  --neutral-100: #f5f7fa;
  --neutral-300: #d1d9e6;
  --neutral-600: #6b7280;
  --neutral-800: #374151;
  --neutral-900: #111827;

  --bg-page: #ffffff;
  --fg-on-page: #111827;

  --bg-alt: #f8fafc;
  --fg-on-alt: #1e293b;

  --surface-1: #ffffff;
  --surface-2: #f9fafb;
  --fg-on-surface: #374151;
  --border-on-surface: #e5e7eb;

  --surface-light: rgba(255, 255, 255, 0.85);
  --fg-on-surface-light: #4b5563;
  --border-on-surface-light: rgba(209, 213, 219, 0.5);

  --bg-primary: #1a5fb4;
  --fg-on-primary: #ffffff;
  --bg-primary-hover: #0d4a9c;
  --ring: rgba(26, 95, 180, 0.4);

  --bg-accent: rgba(249, 168, 37, 0.12);
  --fg-on-accent: #b37400;
  --bg-accent-hover: #ffb300;

  --link: #1a5fb4;
  --link-hover: #0d4a9c;

  --gradient-hero: linear-gradient(135deg, #1a5fb4 0%, #2e7bd6 100%);
  --gradient-accent: linear-gradient(90deg, #f9a825 0%, #ffca28 100%);

  --btn-ghost-bg: transparent;
  --btn-ghost-bg-hover: rgba(255,255,255,0.06);
  --chip-bg: rgba(255,255,255,0.68);
  --input-placeholder: rgba(255,255,255,0.55);
}
body{margin:0;padding:0;font-family:var(--font-family);box-sizing: border-box;}
*{box-sizing:border-box;}

.wp-lang-switcher-v4 {
        position: fixed;
        right: clamp(16px, 2vw, 24px);
        bottom: clamp(16px, 2vw, 24px);
        z-index: 99999;

        --local-random: var(--random-number, 1);
    }

    .wp-lang-switcher-v4__container {
        display: flex;
        align-items: center;
        gap: 0;
        background: var(--surface-1);
        border: 1px solid var(--border-on-surface);
        border-radius: calc(var(--radius-xl) + var(--local-random) * 4px);
        padding: calc(5px + var(--local-random) * 1px);
        box-shadow: var(--shadow-lg);
        transition: all var(--anim-duration) var(--anim-ease);
    }

    .wp-lang-switcher-v4__container.expanded {
        gap: calc(4px + var(--local-random) * 2px);
    }

    .wp-lang-switcher-v4__toggle {
        width: calc(42px + var(--local-random) * 2px);
        height: calc(42px + var(--local-random) * 2px);
        background: var(--gradient-hero);
        color: var(--fg-on-primary);
        border-radius: calc(var(--radius-lg) - var(--local-random) * 2px);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all var(--anim-duration) var(--anim-ease);
        flex-shrink: 0;
        position: relative;
        overflow: hidden;
    }

    .wp-lang-switcher-v4__toggle::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: spin calc(2.8s + var(--local-random) * 0.4s) linear infinite;
    }

    @keyframes spin {
        from {
            transform: rotate(0deg);
        }
        to {
            transform: rotate(360deg);
        }
    }

    .wp-lang-switcher-v4__icon {
        font-size: calc(18px + var(--local-random) * 2px);
        position: relative;
        z-index: 1;
    }

    .wp-lang-switcher-v4__toggle:hover {
        transform: scale(calc(1.03 + var(--local-random) * 0.02));
    }

    .wp-lang-switcher-v4__list {
        display: flex;
        gap: calc(5px + var(--local-random) * 1px);
        max-width: 0;
        opacity: 0;
        transition: all var(--anim-duration) cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .wp-lang-switcher-v4__container.expanded .wp-lang-switcher-v4__list {
        max-width: 300px;
        opacity: 1;
    }

    .wp-lang-switcher-v4__list button,
    .wp-lang-switcher-v4__list a {
        width: calc(38px + var(--local-random) * 2px);
        height: calc(38px + var(--local-random) * 2px);
        border: 2px solid var(--border-on-surface);
        background: var(--surface-2);
        color: var(--fg-on-surface);
        cursor: pointer;

        font-size: 12px;
        font-weight: 700;
        border-radius: calc(var(--radius-md) - var(--local-random) * 2px);
        transition: all var(--anim-duration) var(--anim-ease);
        position: relative;
        flex-shrink: 0;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .wp-lang-switcher-v4__list button::before,
    .wp-lang-switcher-v4__list a::before {
        content: '';
        position: absolute;
        inset: calc(-2px - var(--local-random) * 0.5px);
        border-radius: calc(var(--radius-md) - var(--local-random) * 2px);
        background: var(--gradient-accent);

        z-index: -1;
        transition: opacity var(--anim-duration) var(--anim-ease);
    }

    .wp-lang-switcher-v4__list button:hover,
    .wp-lang-switcher-v4__list a:hover {
        border-color: transparent;
        color: var(--fg-on-primary);
        transform: translateY(calc(-2px - var(--local-random) * 1px));
    }

    .wp-lang-switcher-v4__list button:hover::before,
    .wp-lang-switcher-v4__list a:hover::before {
        opacity: 1;
    }

    .wp-lang-switcher-v4__list button span,
    .wp-lang-switcher-v4__list a span {
        position: relative;
        z-index: 1;
    }