﻿/* =============================================================================
   CLAN SYSTEM STYLES
   ============================================================================= */

/* =============================================================================
   BANNER LAYOUTS
   ============================================================================= */

/* Wall of Banners Layout */
.clan-header-banner-wrap.layout-wall {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.clan-header-banner-wrap.layout-wall .banner-wall-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
}
.clan-header-banner-wrap.layout-wall .banner-wall-item {
    height: 100%;
    flex-shrink: 0;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}
.clan-header-banner-wrap.layout-wall .banner-wall-item:hover {
    opacity: 1;
}
.clan-header-banner-wrap.layout-wall .clan-name-center {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center;
    pointer-events: none;
}
.clan-header-banner-wrap.layout-wall .clan-name-center * {
    pointer-events: auto;
}
.clan-header-banner-wrap.layout-wall.size-normal { min-height: 100px; }
.clan-header-banner-wrap.layout-wall.size-large { min-height: 140px; }
.clan-header-banner-wrap.layout-wall.size-xlarge { min-height: 180px; }

/* Center Banner Scale Options */
.clan-header-banner-wrap.layout-center #clan-center-banner {
    display: block;
}
.clan-header-banner-wrap.layout-center.scale-stretch #clan-center-banner {
    background-size: 100% 100%;
    background-position: center;
}
.clan-header-banner-wrap.layout-center.scale-original #clan-center-banner {
    background-size: auto;
    background-position: center;
    background-repeat: repeat;
}
.clan-header-banner-wrap.layout-center.scale-medium #clan-center-banner {
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}
.clan-header-banner-wrap.layout-center.scale-large #clan-center-banner {
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
}
.clan-header-banner-wrap.layout-center.scale-huge #clan-center-banner {
    background-size: cover;
    background-position: center;
}

.clan-header-banner-wrap.layout-center .clan-name-center {
    width: 100%;
    max-width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.clan-header-banner-wrap.layout-center .clan-center-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 0;
    border-radius: 8px;
}
.clan-header-banner-wrap.layout-center .clan-name-title {
    position: relative;
    z-index: 1;
}

/* =============================================================================
   CLAN NAME POSITIONING
   ============================================================================= */

/* Top Left Position */
.clan-header-banner-wrap.layout-center.name-top-left .clan-name-center {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}
.clan-header-banner-wrap.layout-center.name-top-left .clan-name-title {
    position: absolute !important;
    top: 12px !important;
    left: 15px !important;
    text-align: left;
    margin: 0;
}
.clan-header-banner-wrap.layout-center.name-top-left .clan-name-decoration { display: none; }

/* Top Right Position */
.clan-header-banner-wrap.layout-center.name-top-right .clan-name-center {
    justify-content: flex-end !important;
    align-items: flex-start !important;
}
.clan-header-banner-wrap.layout-center.name-top-right .clan-name-title {
    position: absolute !important;
    top: 12px !important;
    right: 15px !important;
    text-align: right;
    margin: 0;
}
.clan-header-banner-wrap.layout-center.name-top-right .clan-name-decoration { display: none; }

/* Bottom Left Position */
.clan-header-banner-wrap.layout-center.name-bottom-left .clan-name-center {
    justify-content: flex-start !important;
    align-items: flex-end !important;
}
.clan-header-banner-wrap.layout-center.name-bottom-left .clan-name-title {
    position: absolute !important;
    bottom: 12px !important;
    left: 15px !important;
    text-align: left;
    margin: 0;
}
.clan-header-banner-wrap.layout-center.name-bottom-left .clan-name-decoration { display: none; }

/* Bottom Right Position */
.clan-header-banner-wrap.layout-center.name-bottom-right .clan-name-center {
    justify-content: flex-end !important;
    align-items: flex-end !important;
}
.clan-header-banner-wrap.layout-center.name-bottom-right .clan-name-title {
    position: absolute !important;
    bottom: 12px !important;
    right: 15px !important;
    text-align: right;
    margin: 0;
}
.clan-header-banner-wrap.layout-center.name-bottom-right .clan-name-decoration { display: none; }

/* Hidden Name */
.clan-header-banner-wrap.layout-center.name-hidden .clan-name-title,
.clan-header-banner-wrap.layout-center.name-hidden .clan-name-decoration {
    display: none !important;
}

/* =============================================================================
   CLAN NAME FONTS
   ============================================================================= */

.clan-name-title.font-default { font-family: 'Cinzel', serif; }
.clan-name-title.font-medieval { font-family: 'MedievalSharp', 'Uncial Antiqua', cursive; }
.clan-name-title.font-fantasy { font-family: 'Cinzel Decorative', 'Luminari', fantasy; }
.clan-name-title.font-elegant { font-family: 'Playfair Display', 'Georgia', serif; }
.clan-name-title.font-bold { font-family: 'Impact', 'Arial Black', sans-serif; letter-spacing: 2px; }
.clan-name-title.font-runescape { font-family: 'RuneScape UF', 'Trajan Pro', serif; letter-spacing: 1px; }
.clan-name-title.font-gothic { font-family: 'UnifrakturMaguntia', 'Old English Text MT', serif; }
.clan-name-title.font-modern { font-family: 'Montserrat', 'Helvetica Neue', sans-serif; font-weight: 700; }
.clan-name-title.font-handwritten { font-family: 'Dancing Script', 'Brush Script MT', cursive; }
/* New fonts */
.clan-name-title.font-cursive { font-family: 'Pacifico', 'Dancing Script', cursive; }
.clan-name-title.font-comic { font-family: 'Comic Sans MS', 'Comic Neue', cursive; }
.clan-name-title.font-pixel { font-family: 'Press Start 2P', 'VT323', monospace; font-size: 0.8em; letter-spacing: 1px; }
.clan-name-title.font-retro { font-family: 'Bungee', 'Impact', sans-serif; letter-spacing: 3px; }
.clan-name-title.font-tech { font-family: 'Orbitron', 'Rajdhani', sans-serif; letter-spacing: 2px; }
.clan-name-title.font-minimal { font-family: 'Quicksand', 'Poppins', sans-serif; font-weight: 500; }
.clan-name-title.font-futuristic { font-family: 'Audiowide', 'Orbitron', sans-serif; letter-spacing: 2px; }
.clan-name-title.font-royal { font-family: 'Cinzel Decorative', 'Playfair Display SC', serif; font-weight: 700; }
.clan-name-title.font-ornate { font-family: 'Uncial Antiqua', 'MedievalSharp', serif; }
.clan-name-title.font-vintage { font-family: 'Abril Fatface', 'Playfair Display', serif; }
.clan-name-title.font-script { font-family: 'Great Vibes', 'Satisfy', cursive; }
.clan-name-title.font-stencil { font-family: 'Stencil', 'Impact', sans-serif; letter-spacing: 4px; }
.clan-name-title.font-block { font-family: 'Anton', 'Impact', sans-serif; text-transform: uppercase; }
.clan-name-title.font-chunky { font-family: 'Bungee Shade', 'Bungee', sans-serif; }
.clan-name-title.font-italic { font-family: 'Lora', serif; font-style: italic; }

/* Clan blurb fonts */
.clan-motto.font-cursive { font-family: 'Pacifico', 'Dancing Script', cursive; }
.clan-motto.font-comic { font-family: 'Comic Sans MS', 'Comic Neue', cursive; }
.clan-motto.font-pixel { font-family: 'Press Start 2P', 'VT323', monospace; font-size: 0.7em; }
.clan-motto.font-tech { font-family: 'Orbitron', 'Rajdhani', sans-serif; }
.clan-motto.font-minimal { font-family: 'Quicksand', 'Poppins', sans-serif; }
.clan-motto.font-script { font-family: 'Great Vibes', 'Satisfy', cursive; }
.clan-motto.font-vintage { font-family: 'Abril Fatface', 'Playfair Display', serif; }

/* =============================================================================
   CLAN NAME SIZES
   ============================================================================= */

.clan-name-title.size-small { font-size: 1.2rem !important; }
.clan-name-title.size-medium { font-size: 1.8rem !important; }
.clan-name-title.size-large { font-size: 2.4rem !important; }
.clan-name-title.size-xlarge { font-size: 3rem !important; }
.clan-name-title.size-huge { font-size: 4rem !important; }

/* =============================================================================
   CLAN ORNAMENTS
   ============================================================================= */

.clan-ornament {
    display: inline-block;
    vertical-align: middle;
    color: inherit;
    font-size: 1.5em;
    line-height: 1;
    text-shadow: inherit;
    animation: inherit;
}
.clan-name-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================================================
   CLAN NAME COLORS
   ============================================================================= */

.clan-name-title.color-white { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.clan-name-title.color-gold { color: #ffd700 !important; -webkit-text-fill-color: #ffd700 !important; }
.clan-name-title.color-orange { color: #ff9800 !important; -webkit-text-fill-color: #ff9800 !important; }
.clan-name-title.color-red { color: #ff4444 !important; -webkit-text-fill-color: #ff4444 !important; }
.clan-name-title.color-blue { color: #4488ff !important; -webkit-text-fill-color: #4488ff !important; }
.clan-name-title.color-cyan { color: #00ffff !important; -webkit-text-fill-color: #00ffff !important; }
.clan-name-title.color-green { color: #44ff44 !important; -webkit-text-fill-color: #44ff44 !important; }
.clan-name-title.color-purple { color: #aa44ff !important; -webkit-text-fill-color: #aa44ff !important; }
.clan-name-title.color-pink { color: #ff69b4 !important; -webkit-text-fill-color: #ff69b4 !important; }
.clan-name-title.color-yellow { color: #ffff00 !important; -webkit-text-fill-color: #ffff00 !important; }

/* =============================================================================
   CLAN NAME TEXT EFFECTS - GLOW
   ============================================================================= */

.clan-name-title.effect-glow {
    animation: clanNameGlow 2s ease-in-out infinite;
}
@keyframes clanNameGlow {
    0%, 100% { filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 16px currentColor); }
    50% { filter: drop-shadow(0 0 16px currentColor) drop-shadow(0 0 30px currentColor) drop-shadow(0 0 45px currentColor); }
}

.clan-name-title.effect-glow-intense {
    animation: clanNameGlowIntense 1.5s ease-in-out infinite;
}
@keyframes clanNameGlowIntense {
    0%, 100% { filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 25px currentColor) drop-shadow(0 0 40px currentColor); }
    50% { filter: drop-shadow(0 0 25px currentColor) drop-shadow(0 0 50px currentColor) drop-shadow(0 0 80px currentColor); }
}

.clan-name-title.effect-glow-soft {
    filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 20px currentColor);
    animation: clanNameGlowSoft 3s ease-in-out infinite;
}
@keyframes clanNameGlowSoft {
    0%, 100% { filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 16px currentColor); }
    50% { filter: drop-shadow(0 0 14px currentColor) drop-shadow(0 0 28px currentColor); }
}

/* =============================================================================
   CLAN NAME TEXT EFFECTS - COLOR
   ============================================================================= */

.clan-name-title.effect-shimmer {
    background: linear-gradient(90deg, currentColor 0%, #fff 25%, currentColor 50%, #fff 75%, currentColor 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameShimmer 3s linear infinite;
}
@keyframes clanNameShimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.clan-name-title.effect-rainbow {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameRainbow 5s linear infinite;
}

.clan-name-title.effect-rainbow-fast {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameRainbow 2s linear infinite;
}
@keyframes clanNameRainbow {
    0% { background-position: 0% center; }
    100% { background-position: 400% center; }
}

.clan-name-title.effect-gradient-shift {
    background: linear-gradient(270deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =============================================================================
   CLAN NAME TEXT EFFECTS - ELEMENTS
   ============================================================================= */

.clan-name-title.effect-fire {
    background: linear-gradient(180deg, #ffcc00 0%, #ff6600 30%, #ff3300 60%, #990000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameFire 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 100, 0, 0.8));
}
@keyframes clanNameFire {
    0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 8px rgba(255, 100, 0, 0.8)); }
    100% { transform: scale(1.02) translateY(-2px); filter: drop-shadow(0 0 15px rgba(255, 50, 0, 1)); }
}

.clan-name-title.effect-fire-intense {
    background: linear-gradient(180deg, #fff 0%, #ffcc00 20%, #ff6600 40%, #ff0000 70%, #660000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fireIntense 0.3s ease-in-out infinite alternate;
    filter: drop-shadow(0 -5px 15px rgba(255, 100, 0, 0.9));
}
@keyframes fireIntense {
    0% { transform: scale(1); filter: drop-shadow(0 -5px 15px rgba(255, 100, 0, 0.9)); }
    100% { transform: scale(1.03) translateY(-3px); filter: drop-shadow(0 -8px 25px rgba(255, 50, 0, 1)); }
}

.clan-name-title.effect-ice {
    background: linear-gradient(180deg, #e0f7ff 0%, #80d4ff 30%, #40c4ff 60%, #00a0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(128, 212, 255, 0.7));
    animation: clanNameIce 3s ease-in-out infinite;
}
@keyframes clanNameIce {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(128, 212, 255, 0.7)); }
    50% { filter: drop-shadow(0 0 20px rgba(128, 212, 255, 1)) drop-shadow(0 0 30px rgba(64, 196, 255, 0.6)); }
}

.clan-name-title.effect-electric {
    background: linear-gradient(90deg, #00ffff, #0080ff, #00ffff, #ffffff, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: electricFlow 0.5s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}
@keyframes electricFlow {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.clan-name-title.effect-plasma {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #ffff00, #ff00ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: plasmaFlow 3s ease infinite;
    filter: drop-shadow(0 0 15px rgba(255, 0, 255, 0.6));
}
@keyframes plasmaFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.clan-name-title.effect-lava {
    background: linear-gradient(180deg, #ff4500 0%, #ff6600 25%, #cc3300 50%, #8b0000 75%, #4a0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lavaFlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 69, 0, 0.8));
}
@keyframes lavaFlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 69, 0, 0.8)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 100, 0, 1)); transform: scale(1.01); }
}

.clan-name-title.effect-nature {
    background: linear-gradient(180deg, #90EE90 0%, #32CD32 30%, #228B22 60%, #006400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(50, 205, 50, 0.6));
    animation: natureGlow 4s ease-in-out infinite;
}
@keyframes natureGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(50, 205, 50, 0.6)); }
    50% { filter: drop-shadow(0 0 15px rgba(50, 205, 50, 0.9)); }
}

.clan-name-title.effect-water {
    background: linear-gradient(180deg, #87CEEB 0%, #4169E1 30%, #0000CD 60%, #000080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(65, 105, 225, 0.6));
    animation: waterFlow 3s ease-in-out infinite;
}
@keyframes waterFlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.clan-name-title.effect-shadow {
    background: linear-gradient(180deg, #444 0%, #222 50%, #000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8)) drop-shadow(0 0 15px rgba(0,0,0,0.5));
    animation: shadowPulse 3s ease-in-out infinite;
}
@keyframes shadowPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0,0,0,0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(50,0,80,0.6)); }
}

/* =============================================================================
   CLAN NAME TEXT EFFECTS - METALS
   ============================================================================= */

.clan-name-title.effect-gold {
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.clan-name-title.effect-silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #FFFFFF 25%, #A9A9A9 50%, #FFFFFF 75%, #808080 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.clan-name-title.effect-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #E8C496 25%, #B87333 50%, #DAA520 75%, #8B4513 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.clan-name-title.effect-chrome {
    background: linear-gradient(135deg, #e8e8e8 0%, #ffffff 20%, #cccccc 40%, #ffffff 60%, #b0b0b0 80%, #e8e8e8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 2s linear infinite;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
@keyframes metalShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* =============================================================================
   CLAN NAME TEXT EFFECTS - SPECIAL
   ============================================================================= */

.clan-name-title.effect-neon {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff00de) drop-shadow(0 0 30px #ff00de);
    animation: neonFlicker 1.5s ease-in-out infinite alternate;
}
@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff00de) drop-shadow(0 0 30px #ff00de); }
    20%, 24%, 55% { filter: none; }
}

.clan-name-title.effect-neon-blue {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00bfff) drop-shadow(0 0 30px #00bfff);
    animation: neonFlicker-blue 1.5s ease-in-out infinite alternate;
}
@keyframes neonFlicker-blue {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00bfff) drop-shadow(0 0 30px #00bfff); }
    20%, 24%, 55% { filter: none; }
}

.clan-name-title.effect-neon-green {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00ff00) drop-shadow(0 0 30px #00ff00);
    animation: neonFlicker-green 1.5s ease-in-out infinite alternate;
}
@keyframes neonFlicker-green {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00ff00) drop-shadow(0 0 30px #00ff00); }
    20%, 24%, 55% { filter: none; }
}

.clan-name-title.effect-retro {
    background: linear-gradient(180deg, #ff6ec7 0%, #7873f5 50%, #4fffdf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(3px 3px 0 rgba(0,0,0,0.3));
    animation: retroPulse 2s ease-in-out infinite;
}
@keyframes retroPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 110, 199, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(120, 115, 245, 0.7)); }
}

.clan-name-title.effect-glitch {
    animation: glitchEffect 2s infinite;
    position: relative;
}
@keyframes glitchEffect {
    0%, 90%, 100% { transform: translate(0); filter: none; }
    91% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
    92% { transform: translate(2px, -1px); filter: hue-rotate(180deg); }
    93% { transform: translate(-1px, -1px); filter: hue-rotate(270deg); }
    94% { transform: translate(1px, 1px); filter: hue-rotate(0deg); }
}

.clan-name-title.effect-typewriter {
    border-right: 3px solid currentColor;
    animation: typewriterBlink 0.7s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
}
@keyframes typewriterBlink {
    0%, 100% { border-color: currentColor; }
    50% { border-color: transparent; }
}

.clan-name-title.effect-bounce {
    animation: bounceEffect 1s ease infinite;
}
@keyframes bounceEffect {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.clan-name-title.effect-shake {
    animation: shakeEffect 0.5s ease-in-out infinite;
}
@keyframes shakeEffect {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.clan-name-title.effect-float {
    animation: floatEffect 3s ease-in-out infinite;
}
@keyframes floatEffect {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.clan-name-title.effect-pulse {
    animation: pulseScale 1.5s ease-in-out infinite;
}
@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.clan-name-title.effect-wave {
    animation: waveEffect 2s ease-in-out infinite;
}
@keyframes waveEffect {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.clan-name-title.effect-3d {
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4))
            drop-shadow(2px 2px 0 rgba(0,0,0,0.3))
            drop-shadow(3px 3px 0 rgba(0,0,0,0.2))
            drop-shadow(4px 4px 5px rgba(0,0,0,0.4));
    transform: perspective(500px) rotateX(10deg);
}

/* --- Missing effects that previously had no .clan-name-title rule --- */

.clan-name-title.effect-glow-rainbow {
    animation: clanGlowRainbow 3s infinite linear;
}
@keyframes clanGlowRainbow {
    0%   { filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 20px #ff0000); }
    16%  { filter: drop-shadow(0 0 10px #ff8000) drop-shadow(0 0 20px #ff8000); }
    33%  { filter: drop-shadow(0 0 10px #ffff00) drop-shadow(0 0 20px #ffff00); }
    50%  { filter: drop-shadow(0 0 10px #00ff00) drop-shadow(0 0 20px #00ff00); }
    66%  { filter: drop-shadow(0 0 10px #0080ff) drop-shadow(0 0 20px #0080ff); }
    83%  { filter: drop-shadow(0 0 10px #8000ff) drop-shadow(0 0 20px #8000ff); }
    100% { filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 20px #ff0000); }
}

.clan-name-title.effect-disco {
    animation: clanDisco 0.5s infinite;
}
@keyframes clanDisco {
    0%   { filter: drop-shadow(0 0 15px #ff0000) drop-shadow(0 0 30px #ff0000); }
    25%  { filter: drop-shadow(0 0 15px #00ff00) drop-shadow(0 0 30px #00ff00); }
    50%  { filter: drop-shadow(0 0 15px #0000ff) drop-shadow(0 0 30px #0000ff); }
    75%  { filter: drop-shadow(0 0 15px #ff00ff) drop-shadow(0 0 30px #ff00ff); }
    100% { filter: drop-shadow(0 0 15px #ff0000) drop-shadow(0 0 30px #ff0000); }
}

.clan-name-title.effect-aurora {
    background: linear-gradient(90deg, #00ffaa, #ff00ff, #00ffff, #ffff00, #00ffaa);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: auroraShift 5s infinite linear;
    filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.5));
}
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.clan-name-title.effect-lightning {
    background: linear-gradient(90deg, #fff 0%, #ffeb3b 30%, #fff 50%, #ffc107 70%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lightningFlash 3s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 235, 59, 0.8));
}
@keyframes lightningFlash {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 235, 59, 0.5)); background-position: 200% center; }
    10% { filter: drop-shadow(0 0 25px #fff) drop-shadow(0 0 50px #ffeb3b); }
    12% { filter: drop-shadow(0 0 3px rgba(255, 235, 59, 0.3)); }
    20% { filter: drop-shadow(0 0 20px #fff) drop-shadow(0 0 40px #ffeb3b); }
    22% { filter: drop-shadow(0 0 5px rgba(255, 235, 59, 0.5)); }
    50% { background-position: -200% center; }
}

.clan-name-title.effect-cosmic {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #06b6d4, #8b5cf6);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cosmicShift 3s infinite linear;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
}
@keyframes cosmicShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.clan-name-title.effect-copper {
    background: linear-gradient(135deg, #b87333 0%, #da8a67 25%, #8b4513 50%, #cd853f 75%, #b87333 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 0 4px rgba(184, 115, 51, 0.5));
}

.clan-name-title.effect-neon-pink {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff1493) drop-shadow(0 0 30px #ff1493);
    animation: neonFlicker-pink 1.5s ease-in-out infinite alternate;
}
@keyframes neonFlicker-pink {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff1493) drop-shadow(0 0 30px #ff1493); }
    20%, 24%, 55% { filter: none; }
}

.clan-name-title.effect-cyberpunk {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cyberpunkShift 2s infinite linear;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.5)) drop-shadow(0 0 16px rgba(0, 255, 255, 0.4));
}
@keyframes cyberpunkShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.clan-name-title.effect-vaporwave {
    background: linear-gradient(90deg, #ff6ad5, #c774e8, #ad8cff, #8795e8, #94d0ff, #ff6ad5);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: vaporwaveShift 3s infinite linear;
    filter: drop-shadow(0 0 8px rgba(173, 140, 255, 0.5));
}
@keyframes vaporwaveShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.clan-name-title.effect-matrix {
    color: #00ff00;
    -webkit-text-fill-color: #00ff00;
    font-family: 'Courier New', monospace !important;
    filter: drop-shadow(0 0 6px #00ff00) drop-shadow(0 0 14px #00ff00);
    animation: matrixFlicker 0.1s infinite;
}
@keyframes matrixFlicker {
    0%, 100% { filter: drop-shadow(0 0 6px #00ff00) drop-shadow(0 0 14px #00ff00); }
    50% { filter: drop-shadow(0 0 3px #00ff00) drop-shadow(0 0 8px #00ff00); opacity: 0.95; }
}

.clan-name-title.effect-hologram {
    color: #00ffff;
    -webkit-text-fill-color: #00ffff;
    filter: drop-shadow(2px 2px 0 #ff00ff) drop-shadow(-2px -2px 0 #00ff00) drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    animation: hologramFlicker 2s infinite;
    opacity: 0.85;
}
@keyframes hologramFlicker {
    0%, 100% { opacity: 0.85; transform: translateX(0); }
    25% { opacity: 0.9; }
    50% { opacity: 0.7; transform: translateX(1px); }
    75% { opacity: 0.95; transform: translateX(-1px); }
}

.clan-name-title.effect-spin {
    display: inline-block;
    animation: clanSpin 3s infinite linear;
}
@keyframes clanSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.clan-name-title.effect-swing {
    display: inline-block;
    animation: clanSwing 1.5s infinite ease-in-out;
    transform-origin: top center;
}
@keyframes clanSwing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

.clan-name-title.effect-jello {
    display: inline-block;
    animation: clanJello 1s infinite;
}
@keyframes clanJello {
    0%, 100% { transform: skewX(0deg) skewY(0deg); }
    30% { transform: skewX(-12.5deg) skewY(-12.5deg); }
    40% { transform: skewX(6.25deg) skewY(6.25deg); }
    50% { transform: skewX(-3.125deg) skewY(-3.125deg); }
    65% { transform: skewX(1.5625deg) skewY(1.5625deg); }
    75% { transform: skewX(-0.78125deg) skewY(-0.78125deg); }
}

.clan-name-title.effect-heartbeat {
    display: inline-block;
    animation: clanHeartbeat 1.5s infinite;
}
@keyframes clanHeartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.clan-name-title.effect-tada {
    display: inline-block;
    animation: clanTada 1.5s infinite;
}
@keyframes clanTada {
    0%, 100% { transform: scale(1) rotate(0deg); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
}

/* =============================================================================
   PREVIEW-SPECIFIC EFFECT CLASSES
   (Work without .clan-name-title prefix for live preview)
   ALL use drop-shadow/filter instead of text-shadow for compatibility
   ============================================================================= */

/* --- GLOW --- */
#preview-clan-name.effect-glow {
    animation: clanNameGlow 2s ease-in-out infinite;
}
#preview-clan-name.effect-glow-intense {
    animation: clanNameGlowIntense 1.5s ease-in-out infinite;
}
#preview-clan-name.effect-glow-soft {
    animation: clanNameGlowSoft 3s ease-in-out infinite;
}
#preview-clan-name.effect-glow-rainbow {
    animation: clanGlowRainbow 3s infinite linear;
}

/* --- COLOR --- */
#preview-clan-name.effect-shimmer {
    background: linear-gradient(90deg, currentColor, #fff, currentColor);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameShimmer 3s linear infinite;
}
#preview-clan-name.effect-rainbow {
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #00ffff, #0088ff, #8800ff, #ff0000);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameRainbow 4s linear infinite;
}
#preview-clan-name.effect-rainbow-fast {
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #00ffff, #0088ff, #8800ff, #ff0000);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameRainbow 1.5s linear infinite;
}
#preview-clan-name.effect-gradient-shift {
    background: linear-gradient(270deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}
#preview-clan-name.effect-disco {
    animation: clanDisco 0.5s infinite;
}
#preview-clan-name.effect-aurora {
    background: linear-gradient(90deg, #00ffaa, #ff00ff, #00ffff, #ffff00, #00ffaa);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: auroraShift 5s infinite linear;
    filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.5));
}

/* --- ELEMENTS --- */
#preview-clan-name.effect-fire {
    background: linear-gradient(180deg, #ffcc00 0%, #ff6600 30%, #ff3300 60%, #990000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameFire 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 100, 0, 0.8));
}
#preview-clan-name.effect-fire-intense {
    background: linear-gradient(180deg, #fff 0%, #ffcc00 20%, #ff6600 40%, #ff0000 70%, #660000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fireIntense 0.3s ease-in-out infinite alternate;
    filter: drop-shadow(0 -5px 15px rgba(255, 100, 0, 0.9));
}
#preview-clan-name.effect-ice {
    background: linear-gradient(180deg, #e0f7ff 0%, #80d4ff 30%, #40c4ff 60%, #00a0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(128, 212, 255, 0.7));
    animation: clanNameIce 3s ease-in-out infinite;
}
#preview-clan-name.effect-electric {
    background: linear-gradient(90deg, #00ffff, #0080ff, #00ffff, #ffffff, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: electricFlow 0.5s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}
#preview-clan-name.effect-plasma {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #ffff00, #ff00ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: plasmaFlow 3s ease infinite;
    filter: drop-shadow(0 0 15px rgba(255, 0, 255, 0.6));
}
#preview-clan-name.effect-lava {
    background: linear-gradient(180deg, #ff4500 0%, #ff6600 25%, #cc3300 50%, #8b0000 75%, #4a0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lavaFlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 69, 0, 0.8));
}
#preview-clan-name.effect-nature {
    background: linear-gradient(180deg, #90EE90 0%, #32CD32 30%, #228B22 60%, #006400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(50, 205, 50, 0.6));
    animation: natureGlow 4s ease-in-out infinite;
}
#preview-clan-name.effect-water {
    background: linear-gradient(180deg, #87CEEB 0%, #4169E1 30%, #0000CD 60%, #000080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(65, 105, 225, 0.6));
    animation: waterFlow 3s ease-in-out infinite;
}
#preview-clan-name.effect-shadow {
    background: linear-gradient(180deg, #444 0%, #222 50%, #000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8)) drop-shadow(0 0 15px rgba(0,0,0,0.5));
    animation: shadowPulse 3s ease-in-out infinite;
}
#preview-clan-name.effect-lightning {
    background: linear-gradient(90deg, #fff 0%, #ffeb3b 30%, #fff 50%, #ffc107 70%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lightningFlash 3s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 235, 59, 0.8));
}
#preview-clan-name.effect-cosmic {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #06b6d4, #8b5cf6);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cosmicShift 3s infinite linear;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
}

/* --- METALS --- */
#preview-clan-name.effect-gold {
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
#preview-clan-name.effect-silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #FFFFFF 25%, #A9A9A9 50%, #FFFFFF 75%, #808080 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
}
#preview-clan-name.effect-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #E8C496 25%, #B87333 50%, #DAA520 75%, #8B4513 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
}
#preview-clan-name.effect-chrome {
    background: linear-gradient(135deg, #e8e8e8 0%, #ffffff 20%, #cccccc 40%, #ffffff 60%, #b0b0b0 80%, #e8e8e8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}
#preview-clan-name.effect-copper {
    background: linear-gradient(135deg, #b87333 0%, #da8a67 25%, #8b4513 50%, #cd853f 75%, #b87333 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: metalShine 3s linear infinite;
    filter: drop-shadow(0 0 4px rgba(184, 115, 51, 0.5));
}

/* --- NEON --- */
#preview-clan-name.effect-neon {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff00de) drop-shadow(0 0 30px #ff00de);
    animation: neonFlicker 1.5s ease-in-out infinite alternate;
}
#preview-clan-name.effect-neon-blue {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00bfff) drop-shadow(0 0 30px #00bfff);
    animation: neonFlicker-blue 1.5s ease-in-out infinite alternate;
}
#preview-clan-name.effect-neon-green {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #00ff00) drop-shadow(0 0 30px #00ff00);
    animation: neonFlicker-green 1.5s ease-in-out infinite alternate;
}
#preview-clan-name.effect-neon-pink {
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #ff1493) drop-shadow(0 0 30px #ff1493);
    animation: neonFlicker-pink 1.5s ease-in-out infinite alternate;
}
#preview-clan-name.effect-cyberpunk {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cyberpunkShift 2s infinite linear;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.5)) drop-shadow(0 0 16px rgba(0, 255, 255, 0.4));
}

/* --- ANIMATION --- */
#preview-clan-name.effect-bounce {
    display: inline-block;
    animation: bounceEffect 1s ease-in-out infinite;
}
#preview-clan-name.effect-shake {
    display: inline-block;
    animation: shakeEffect 0.5s ease-in-out infinite;
}
#preview-clan-name.effect-float {
    display: inline-block;
    animation: floatEffect 3s ease-in-out infinite;
}
#preview-clan-name.effect-pulse {
    display: inline-block;
    animation: pulseScale 1.5s ease-in-out infinite;
}
#preview-clan-name.effect-wave {
    display: inline-block;
    animation: waveEffect 2s ease-in-out infinite;
}
#preview-clan-name.effect-spin {
    display: inline-block;
    animation: clanSpin 3s infinite linear;
}
#preview-clan-name.effect-swing {
    display: inline-block;
    animation: clanSwing 1.5s infinite ease-in-out;
    transform-origin: top center;
}
#preview-clan-name.effect-jello {
    display: inline-block;
    animation: clanJello 1s infinite;
}
#preview-clan-name.effect-heartbeat {
    display: inline-block;
    animation: clanHeartbeat 1.5s infinite;
}
#preview-clan-name.effect-tada {
    display: inline-block;
    animation: clanTada 1.5s infinite;
}

/* --- SPECIAL --- */
#preview-clan-name.effect-retro {
    background: linear-gradient(180deg, #ff6ec7 0%, #7873f5 50%, #4fffdf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 110, 199, 0.5));
    animation: retroPulse 2s ease-in-out infinite;
}
#preview-clan-name.effect-glitch {
    display: inline-block;
    animation: glitchEffect 2s infinite;
}
#preview-clan-name.effect-typewriter {
    border-right: 3px solid currentColor;
    animation: typewriterBlink 0.7s step-end infinite;
}
#preview-clan-name.effect-3d {
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.4))
            drop-shadow(2px 2px 0 rgba(0,0,0,0.3))
            drop-shadow(3px 3px 0 rgba(0,0,0,0.2))
            drop-shadow(4px 4px 5px rgba(0,0,0,0.4));
    transform: perspective(500px) rotateX(10deg);
}
#preview-clan-name.effect-matrix {
    color: #00ff00;
    -webkit-text-fill-color: #00ff00;
    font-family: 'Courier New', monospace !important;
    filter: drop-shadow(0 0 6px #00ff00) drop-shadow(0 0 14px #00ff00);
    animation: matrixFlicker 0.1s infinite;
}
#preview-clan-name.effect-hologram {
    color: #00ffff;
    -webkit-text-fill-color: #00ffff;
    filter: drop-shadow(2px 2px 0 #ff00ff) drop-shadow(-2px -2px 0 #00ff00) drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    animation: hologramFlicker 2s infinite;
    opacity: 0.85;
}
#preview-clan-name.effect-vaporwave {
    background: linear-gradient(90deg, #ff6ad5, #c774e8, #ad8cff, #8795e8, #94d0ff, #ff6ad5);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: vaporwaveShift 3s infinite linear;
    filter: drop-shadow(0 0 8px rgba(173, 140, 255, 0.5));
}

/* Preview blurb effects */
#preview-clan-blurb.blurb-effect-glow { text-shadow: 0 0 10px currentColor; }
#preview-clan-blurb.blurb-effect-shimmer {
    background: linear-gradient(90deg, currentColor, #fff, currentColor);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clanNameShimmer 4s linear infinite;
}
#preview-clan-blurb.blurb-effect-fade-in { animation: fadeInEffect 1s ease-out; }
#preview-clan-blurb.blurb-effect-typewriter { animation: typewriterBlink 0.7s step-end infinite; }

/* =============================================================================
   CLAN BLURB/MOTTO STYLING
   ============================================================================= */

/* Blurb Fonts */
.clan-blurb-inline.font-default { font-family: inherit; }
.clan-blurb-inline.font-medieval { font-family: 'MedievalSharp', cursive; }
.clan-blurb-inline.font-elegant { font-family: 'Playfair Display', serif; font-style: italic; }
.clan-blurb-inline.font-modern { font-family: 'Montserrat', sans-serif; }
.clan-blurb-inline.font-handwritten { font-family: 'Dancing Script', cursive; }
.clan-blurb-inline.font-italic { font-style: italic; }

/* Blurb Sizes */
.clan-blurb-inline.size-small { font-size: 0.8rem; }
.clan-blurb-inline.size-medium { font-size: 1rem; }
.clan-blurb-inline.size-large { font-size: 1.2rem; }

/* Blurb Colors */
.clan-blurb-inline.color-gray { color: #888 !important; }
.clan-blurb-inline.color-white { color: #fff !important; }
.clan-blurb-inline.color-gold { color: #ffd700 !important; }
.clan-blurb-inline.color-orange { color: #ff9800 !important; }
.clan-blurb-inline.color-cyan { color: #00ffff !important; }
.clan-blurb-inline.color-green { color: #44ff44 !important; }
.clan-blurb-inline.color-purple { color: #aa44ff !important; }

/* Blurb Effects */
.clan-blurb-inline.effect-glow { text-shadow: 0 0 10px currentColor; }
.clan-blurb-inline.effect-shimmer {
    background: linear-gradient(90deg, currentColor, #fff, currentColor);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: clanNameShimmer 4s linear infinite;
}
.clan-blurb-inline.effect-fade-in { animation: fadeInEffect 1s ease-out; }
@keyframes fadeInEffect {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.clan-blurb-inline.effect-scroll {
    white-space: nowrap;
    overflow: hidden;
    animation: scrollEffect 15s linear infinite;
}
@keyframes scrollEffect {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Blurb positioned in banner */
.clan-blurb-banner {
    position: absolute;
    z-index: 2;
    padding: 8px 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    max-width: 80%;
}
.clan-blurb-banner.position-top { top: 10px; left: 50%; transform: translateX(-50%); }
.clan-blurb-banner.position-bottom { bottom: 10px; left: 50%; transform: translateX(-50%); }
.clan-blurb-banner.position-below-name { margin-top: 10px; }

/* Make center banner inherit height from parent */
.clan-header-banner-wrap.layout-center.size-large .clan-name-center { min-height: 140px; }
.clan-header-banner-wrap.layout-center.size-xlarge .clan-name-center { min-height: 180px; }

/* =============================================================================
   CUSTOMIZER MODAL STYLES
   ============================================================================= */

.customizer-section {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.customizer-section-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1rem;
    color: var(--accent);
}

/* Edit Permissions Section */
#clan-permissions-section {
    border-color: rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.05);
}
#clan-permissions-section .customizer-section-title {
    color: #ffd700;
}
.perm-rank-label {
    font-size: 0.85rem;
    color: #ccc;
    transition: background 0.2s;
}
.perm-rank-label:hover {
    background: #252545 !important;
}
.perm-rank-label input[type="checkbox"] {
    accent-color: #ffd700;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.perm-rank-label input[type="checkbox"]:disabled {
    cursor: default;
}
.input-row {
    display: flex;
    gap: 15px;
}
.input-group.half {
    flex: 1;
}

/* Logo link styling */
.logo-link {
    display: inline-flex;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.logo-link:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.clan-header-banner-wrap::before {
    display: none;
}

.clan-header-banner-wrap::after {
    display: none;
}

.clan-header-banner-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 45%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 55%,
        transparent 100%
    );
    transform: skewX(-20deg);
    pointer-events: none;
    animation: glassShine 8s ease-in-out infinite;
}

.clan-header-banner-wrap::after {
    display: none;
}

@keyframes glassShine {
    0%, 100% {
        left: -50%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        left: 100%;
        opacity: 1;
    }
    60%, 100% {
        opacity: 0;
    }
}

/* =============================================================================
   SIDE BANNERS
   ============================================================================= */

/* Side Banners */
.clan-side-banner {
    width: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.clan-side-banner.left {
    mask-image: radial-gradient(ellipse 120% 120% at 0% 50%, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 120% 120% at 0% 50%, black 60%, transparent 100%);
    clip-path: polygon(
        0% 0%, 100% 0%, 
        85% 8%, 90% 12%, 85% 16%,
        85% 24%, 90% 28%, 85% 32%,
        85% 40%, 90% 44%, 85% 48%,
        85% 56%, 90% 60%, 85% 64%,
        85% 72%, 90% 76%, 85% 80%,
        85% 88%, 90% 92%, 85% 96%, 90% 100%,
        0% 100%
    );
}
.clan-side-banner.right {
    mask-image: radial-gradient(ellipse 120% 120% at 100% 50%, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 120% 120% at 100% 50%, black 60%, transparent 100%);
    clip-path: polygon(
        100% 0%, 0% 0%, 
        15% 8%, 10% 12%, 15% 16%,
        15% 24%, 10% 28%, 15% 32%,
        15% 40%, 10% 44%, 15% 48%,
        15% 56%, 10% 60%, 15% 64%,
        15% 72%, 10% 76%, 15% 80%,
        15% 88%, 10% 92%, 15% 96%, 10% 100%,
        100% 100%
    );
}
.clan-side-banner .banner-img {
    position: absolute;
    inset: -5px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    transition: filter 0.4s ease;
    animation: bannerWave 5s ease-in-out infinite;
    transform-origin: top center;
}
.clan-side-banner.left .banner-img {
    animation: bannerWaveLeft 5s ease-in-out infinite;
}
.clan-side-banner.right .banner-img {
    animation: bannerWaveRight 5s ease-in-out infinite;
}
.clan-side-banner:hover .banner-img {
    animation-play-state: paused;
    transform: scale(1.05) skewX(0deg);
}

@keyframes bannerWaveLeft {
    0%, 100% {
        transform: scale(1.05) skewX(0deg) translateX(0px) rotate(0deg);
    }
    20% {
        transform: scale(1.08) skewX(3deg) translateX(4px) rotate(0.5deg);
    }
    40% {
        transform: scale(1.04) skewX(1deg) translateX(2px) rotate(0deg);
    }
    60% {
        transform: scale(1.06) skewX(-2deg) translateX(-2px) rotate(-0.3deg);
    }
    80% {
        transform: scale(1.03) skewX(-1deg) translateX(-1px) rotate(0deg);
    }
}

@keyframes bannerWaveRight {
    0%, 100% {
        transform: scale(1.05) skewX(0deg) translateX(0px) rotate(0deg);
    }
    20% {
        transform: scale(1.03) skewX(-2deg) translateX(-2px) rotate(-0.3deg);
    }
    40% {
        transform: scale(1.06) skewX(-1deg) translateX(-1px) rotate(0deg);
    }
    60% {
        transform: scale(1.08) skewX(3deg) translateX(4px) rotate(0.5deg);
    }
    80% {
        transform: scale(1.04) skewX(1deg) translateX(2px) rotate(0deg);
    }
}

.clan-side-banner .banner-fade {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.clan-side-banner.left .banner-fade {
    background: linear-gradient(90deg, transparent 0%, #0d0d15 100%);
}
.clan-side-banner.right .banner-fade {
    background: linear-gradient(270deg, transparent 0%, #0d0d15 100%);
}

/* Center Name Section */
.clan-name-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* =============================================================================
   DECORATIVE ELEMENTS
   ============================================================================= */

/* Decorative Elements */
.clan-name-decoration {
    display: flex;
    align-items: center;
    gap: 8px;
}
.clan-name-decoration .deco-line {
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), var(--blue), transparent);
    border-radius: 2px;
}
.clan-name-decoration.left .deco-line {
    background: linear-gradient(90deg, transparent, var(--purple), var(--blue));
}
.clan-name-decoration.right .deco-line {
    background: linear-gradient(90deg, var(--blue), var(--purple), transparent);
}
.clan-name-decoration .deco-diamond {
    color: var(--purple);
    font-size: 0.7rem;
    text-shadow: 0 0 10px var(--purple);
    animation: diamondPulse 2s ease-in-out infinite;
}
@keyframes diamondPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* =============================================================================
   CLAN NAME TITLE
   ============================================================================= */

/* Clan Name Title */
.clan-name-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: #fff;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    
    /* Multi-layer text effect */
    background: linear-gradient(
        180deg, 
        #fff 0%, 
        #e0e0ff 20%,
        #bb86fc 50%, 
        #7c4dff 80%,
        #4fc3f7 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Glow effect */
    filter: drop-shadow(0 0 8px rgba(187, 134, 252, 0.6))
            drop-shadow(0 0 20px rgba(79, 195, 247, 0.4))
            drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    
    animation: clanTitleShimmer 4s ease-in-out infinite;
}

.clan-name-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: clanTitleGleam 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes clanTitleShimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

@keyframes clanTitleGleam {
    0%, 100% { background-position: -200% center; }
    50% { background-position: 200% center; }
}

/* =============================================================================
   LEGACY BANNER STYLES
   ============================================================================= */

/* Legacy banner styles for fallback */
.clan-banner-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
}
.clan-banner-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}
.clan-banner-wrap:hover .clan-banner-img {
    transform: scale(1.02);
}
.clan-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.clan-name-banner {
    font-size: 2.8rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(79, 195, 247, 0.8),
        0 0 40px rgba(187, 134, 252, 0.6),
        0 4px 8px rgba(0,0,0,0.8);
    background: linear-gradient(90deg, #bb86fc 0%, #4fc3f7 25%, #fff 50%, #4fc3f7 75%, #bb86fc 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: clanNameShine 3s ease-in-out infinite;
    position: relative;
}
@keyframes clanNameShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* =============================================================================
   BANNER STATS OVERLAY (merged into banner)
   ============================================================================= */

/* Stats bar sits below the banner as a separate element */
.clan-banner-stats-overlay,
.clan-compact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 0 0 8px 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.clan-header-left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Compact clan name - hidden by default, shown when banner is hidden */
.clan-name-compact {
    display: none;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    font-family: 'Cinzel', serif;
}
.clan-blurb-inline {
    margin: 0;
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.clan-header-stats {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.mini-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 4px 8px;
    text-align: center;
    min-width: 50px;
}
.mini-stat.xp { border-top: 2px solid var(--purple); }
.mini-stat.members { border-top: 2px solid var(--blue); }
.mini-stat.avg { border-top: 2px solid var(--green); }
.mini-stat.kills { border-top: 2px solid var(--urgent-red); }
.mini-stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
    align-self: stretch;
}
.mini-stat.day-gain { border-top: 2px solid var(--accent); }
.mini-stat.week-gain { border-top: 2px solid #4ecdc4; }
.mini-stat.month-gain { border-top: 2px solid #a855f7; }
.mini-val.gain {
    color: var(--accent);
}

/* =============================================================================
   ACTIVITY STATUS INDICATORS
   ============================================================================= */

/* Activity Status Indicators */
.activity-cell {
    text-align: center;
}
.activity-active {
    color: var(--green);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.activity-active small {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 600;
}
.activity-inactive {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
}
.loading-xp {
    color: #555;
    animation: pulse 1.5s infinite;
}

/* =============================================================================
   ACTIVITY LEGEND
   ============================================================================= */

/* Activity Legend */
.activity-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid #222;
    font-size: 0.75rem;
    color: #888;
    flex-wrap: wrap;
}
.legend-title {
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.legend-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legend-badge.today {
    background: rgba(79, 195, 247, 0.2);
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.3);
}
.legend-badge.week {
    background: rgba(187, 134, 252, 0.2);
    color: #bb86fc;
    border: 1px solid rgba(187, 134, 252, 0.3);
}
.legend-badge.month {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.mini-val {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}
.mini-lbl {
    font-size: 0.55rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.clan-header-actions {
    display: flex;
    gap: 6px;
}
.clan-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}
.clan-icon-btn:hover { background: #2a2a2a; border-color: #444; color: #fff; }
.clan-icon-btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.clan-icon-btn.discord:hover { background: #4752c4; }

/* =============================================================================
   SLIM TICKER
   ============================================================================= */

/* Slim Ticker */
.clan-ticker-slim {
    display: flex;
    align-items: center;
    background: #0d0d0d;
    border-bottom: 1px solid #222;
    height: 38px;
    overflow: hidden;
}
.ticker-icon {
    padding: 0 12px;
    color: var(--accent);
    font-size: 0.9rem;
}
.ticker-scroll-wrap {
    flex: 1;
    overflow: hidden;
}
.ticker-scroll {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
}
.ticker-scroll:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    font-size: 0.85rem;
    color: #888;
    white-space: nowrap;
}
.ticker-item img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.ticker-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--purple);
    flex-shrink: 0;
}
.ticker-item strong { color: #ccc; font-weight: 600; }
.ticker-item .ticker-player-link { cursor: pointer; transition: color 0.2s; }
.ticker-item .ticker-player-link:hover { color: var(--gold); }
.ticker-item .ticker-skill { color: var(--blue); }
.ticker-item .ticker-time { color: #444; font-size: 0.65rem; }

/* =============================================================================
   MAIN GRID LAYOUT
   ============================================================================= */

/* Main Grid Layout */
.clan-main-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 12px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.clan-left-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 100%;
    /* Ensure all 3 panels fit: activity, xp champions, most active */
    min-height: 0;
}
.clan-right-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* =============================================================================
   PANELS
   ============================================================================= */

/* Panels */
.clan-panel {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #161616;
    border-bottom: 1px solid #222;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
}
.panel-head img { opacity: 0.8; }
.panel-head span { flex: 1; }
.panel-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.panel-btn {
    background: #222;
    border: 1px solid #333;
    color: #888;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}
.panel-btn:hover { background: #2a2a2a; color: #fff; border-color: var(--accent); }
.period-select {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 3px 6px;
    border-radius: 4px;
    color: #888;
    font-size: 0.65rem;
    cursor: pointer;
}
.period-select:focus { outline: none; border-color: var(--accent); }
.empty-msg {
    padding: 20px;
    text-align: center;
    color: #444;
    font-size: 0.75rem;
    font-style: italic;
}

/* =============================================================================
   PODIUM
   ============================================================================= */

/* Horizontal Podium Row */
.podium-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    justify-content: center;
}
/* XP Champions and Most Active panels - never shrink */
.clan-left-col > .clan-panel[data-panel="xp-podium"],
.clan-left-col > .clan-panel[data-panel="activity-podium"] {
    flex-shrink: 0;
    min-height: 110px;
}
.podium-card {
    flex: 1;
    max-width: 100px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
.podium-card:hover { border-color: #555; background: #222; }
.podium-card.rank-1 { border-color: #ffd700; background: linear-gradient(180deg, #252210 0%, #1a1a1a 100%); }
.podium-card.rank-2 { border-color: #c0c0c0; }
.podium-card.rank-3 { border-color: #cd7f32; }
.medal-icon { font-size: 1.1rem; display: block; margin-bottom: 4px; }
.podium-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: block;
    border: 2px solid #333;
}
.rank-1 .podium-avatar { border-color: #ffd700; }
.rank-2 .podium-avatar { border-color: #c0c0c0; }
.rank-3 .podium-avatar { border-color: #cd7f32; }
.podium-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.podium-val {
    font-size: 0.65rem;
    color: #888;
}
.rank-1 .podium-val { color: #ffd700; }

/* =============================================================================
   COMPETITIONS COMPACT
   ============================================================================= */

/* Competitions Compact */
.competitions-compact {
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
}
.competitions-compact::-webkit-scrollbar { width: 4px; }
.competitions-compact::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.comp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1a1a1a;
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 3px solid #333;
}
.comp-row.active { border-left-color: #4caf50; }
.comp-row.upcoming { border-left-color: #4fc3f7; }
.comp-row.ended { border-left-color: #ef5350; }
.comp-row-info {
    flex: 1;
    min-width: 0;
}
.comp-row-info h4 {
    margin: 0;
    font-size: 0.8rem;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comp-row-info .comp-meta {
    font-size: 0.65rem;
    color: #555;
}
.comp-status {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    color: #666;
}
.comp-row.active .comp-status { color: #4caf50; }
.comp-row.upcoming .comp-status { color: #4fc3f7; }
.comp-delete-btn {
    background: transparent;
    border: none;
    color: #444;
    cursor: pointer;
    padding: 4px;
    font-size: 0.8rem;
    transition: 0.2s;
}
.comp-delete-btn:hover { color: #ef5350; }

/* =============================================================================
   ACTIVITY COMPACT
   ============================================================================= */

/* Activity Compact */
.activity-compact {
    padding: 8px;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}
.activity-compact::-webkit-scrollbar { width: 4px; }
.activity-compact::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.activity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #1a1a1a;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    border-left: 2px solid #333;
}
.activity-row.join { border-left-color: #4caf50; }
.activity-row.leave { border-left-color: #ef5350; }
.activity-row .activity-icon { font-size: 0.7rem; }
.activity-row .activity-name { color: #ddd; font-weight: 600; flex: 1; }
.activity-row .activity-name.clickable { cursor: pointer; transition: color 0.2s; }
.activity-row .activity-name.clickable:hover { color: var(--gold); text-decoration: underline; }
.activity-row .activity-action { 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
}
.activity-row.join .activity-action { color: #4caf50; }
.activity-row.leave .activity-action { color: #ef5350; }
.activity-row .activity-time { color: #444; font-size: 0.65rem; }

/* =============================================================================
   TABLE PANEL
   ============================================================================= */

/* Table Panel */
.table-panel { 
    display: flex; 
    flex-direction: column; 
}
.table-panel .panel-head { flex-shrink: 0; }
.filter-input {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 4px 10px;
    border-radius: 4px;
    color: #ddd;
    font-size: 0.7rem;
    width: 140px;
}
.filter-input:focus { outline: none; border-color: var(--accent); }

/* =============================================================================
   XP TRACKING INFO BAR
   ============================================================================= */

/* XP Tracking Info Bar */
.xp-tracking-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 200, 87, 0.08);
    border: 1px solid rgba(255, 200, 87, 0.2);
    border-radius: 6px;
    margin: 0 12px 10px 12px;
    font-size: 0.72rem;
    color: #aaa;
}
.xp-tracking-info .info-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}
.xp-tracking-info .info-text {
    line-height: 1.4;
}
.xp-tracking-info.centered {
    justify-content: center;
    text-align: center;
}
.xp-tracking-info strong {
    color: var(--accent);
    font-weight: 600;
}

.clan-table-wrap {
    overflow-y: auto;
    overflow-x: auto;
    max-height: calc(100vh - 480px);
    min-height: 250px;
}
.clan-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.clan-table-wrap::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.member-changes-panel { 
    max-height: calc(100% - 260px); /* Leave room for XP Champions + Most Active panels */
    min-height: 150px;
    flex: 1 1 auto;
    resize: vertical;
    overflow: hidden;
    border-bottom: 3px solid #333;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.member-changes-panel:hover {
    border-bottom-color: var(--accent, #00bcd4);
}
.member-changes-panel:active {
    border-bottom-color: var(--accent, #00bcd4);
}
.member-changes-panel .activity-compact {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Style select for modals */
.style-select {
    background: #111;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 6px;
    color: #fff;
    width: 100%;
    cursor: pointer;
}
.style-select:focus { outline: none; border-color: var(--accent); }

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

/* Responsive */
@media (max-width: 900px) {
    .clan-main-grid {
        grid-template-columns: 1fr;
        flex: none;
        overflow: visible;
    }
    .clan-left-col {
        max-height: none;
        overflow: visible;
    }
    .member-changes-panel {
        max-height: 250px;
        min-height: 150px;
    }
    .clan-right-col {
        overflow: visible;
        min-height: 400px;
    }
    .table-panel {
        min-height: 400px;
        overflow: hidden;
    }
    .clan-table-wrap {
        max-height: 50vh;
        min-height: 200px;
    }
    .clan-compact-header,
    .clan-banner-stats-overlay {
        flex-wrap: wrap;
        padding: 8px 12px;
    }
    .clan-header-stats {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 6px;
    }
    .clan-blurb-inline { max-width: 200px; }
    .clan-name-banner { font-size: 1.8rem; letter-spacing: 2px; }
}

/* Medium desktop screens (901px - 1199px) */
@media (min-width: 901px) and (max-width: 1199px) {
    .member-changes-panel {
        max-height: 280px;
        min-height: 150px;
    }
    
    .clan-left-col > .clan-panel[data-panel="xp-podium"],
    .clan-left-col > .clan-panel[data-panel="activity-podium"] {
        flex-shrink: 0;
        min-height: 105px;
    }
    
    .podium-row {
        padding: 10px;
        gap: 6px;
    }
    
    .podium-card {
        padding: 8px 4px;
    }
    
    .podium-avatar {
        width: 32px;
        height: 32px;
    }
}

/* =============================================================================
   COMPREHENSIVE MOBILE OPTIMIZATION
   ============================================================================= */

/* === TABLET BREAKPOINT (768px) === */
@media (max-width: 768px) {
    /* Header adjustments */
    header {
        padding: 10px 12px 15px 12px;
        gap: 10px;
    }
    
    .header-left, .header-right {
        min-width: 0;
        gap: 10px;
    }
    
    .brand-wrapper {
        gap: 8px;
    }
    
    .header-logo {
        height: 30px;
    }
    
    .scrolling-title {
        font-size: 0.95rem;
        max-width: 100px;
    }
    
    .header-nav {
        gap: 2px;
        padding: 3px;
    }
    
    .nav-item {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .flash-header-bar {
        min-width: 200px;
        max-width: 280px;
        flex: 1 1 200px;
        padding: 2px 10px;
        height: 34px;
    }
    
    .flash-bar-name {
        font-size: 0.75rem;
    }
    
    .flash-bar-timer {
        font-size: 0.85rem;
        width: 50px;
    }
    
    .wiki-search-container {
        max-width: 200px;
        min-width: 0;
    }
    
    .header-clock-group {
        width: 90px;
    }
    
    .header-time-val {
        font-size: 1rem;
    }
    
    .header-time-sub {
        font-size: 0.65rem;
    }
    
    .clan-banner {
        min-width: 160px;
        max-width: 220px;
        height: 60px;
        padding: 6px 12px 6px 10px;
    }
    
    .clan-banner-info h3 {
        font-size: 0.85rem;
    }
    
    .clan-banner-logo {
        width: 40px;
        height: 40px;
    }
    
    /* Dashboard adjustments */
    .dashboard {
        padding: 12px;
        gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    
    .card {
        min-height: 350px;
        padding: 14px;
    }
    
    .card-main-text {
        font-size: 1.8rem;
    }
    
    .card-sub-text {
        font-size: 1.1rem;
    }
    
    /* Community Hub */
    .community-hub {
        flex-direction: column;
        padding: 12px;
        overflow: visible;
        height: auto;
    }
    
    .community-sidebar {
        width: 100%;
        padding-right: 0;
        padding-bottom: 15px;
        max-height: 250px;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
    }
    
    .sidebar-section {
        flex-shrink: 0;
        min-width: 280px;
    }
    
    .sidebar-section:first-child {
        min-height: 200px;
    }
    
    .community-main {
        width: 100%;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 15px;
    }
    
    /* Chat area */
    .chat-messages-area {
        max-height: 400px;
    }
    
    .chat-bubble {
        max-width: 90%;
    }
    
    .chat-input-wrapper {
        padding: 12px;
    }
    
    .chat-input {
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Formatting toolbar */
    .formatting-toolbar {
        padding: 6px 8px;
        gap: 3px;
        flex-wrap: wrap;
    }
    
    .format-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .format-divider {
        height: 20px;
        margin: 0 4px;
    }
    
    /* Idea board */
    .idea-board-content {
        padding: 12px;
    }
    
    .suggestion-card {
        padding: 14px;
    }
    
    /* Modals */
    .modal-content,
    .settings-modal-content,
    .profile-modal-content {
        width: 95vw;
        max-width: 95vw;
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    /* XP Tracker specific */
    .xp-main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 12px;
    }
    
    .xp-card,
    .tracker-panel {
        padding: 15px;
    }
    
    .stat-row {
        padding: 8px 10px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .skill-item {
        padding: 10px 8px;
    }
    
    .skill-icon {
        width: 28px;
        height: 28px;
    }
    
    .skill-level {
        font-size: 1.1rem;
    }
}

/* === MOBILE BREAKPOINT (580px) === */
@media (max-width: 580px) {
    /* Header - Stack layout */
    header {
        padding: 8px 10px 12px 10px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-left {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-right {
        justify-content: center;
        flex-wrap: wrap;
        padding: 0;
        gap: 8px;
    }
    
    .brand-wrapper {
        order: -1;
        justify-content: center;
        width: 100%;
    }
    
    .scrolling-title {
        font-size: 1rem;
        max-width: 150px;
    }
    
    .header-nav {
        order: 1;
        width: 100%;
        justify-content: center;
        margin: 8px 0;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .flash-header-bar {
        order: 2;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        margin: 5px 0;
    }
    
    .wiki-search-container {
        width: 100%;
        max-width: 100%;
        order: 3;
    }
    
    .header-clock-group {
        align-items: center;
        width: auto;
    }
    
    .clan-banner {
        min-width: 140px;
        max-width: 180px;
        height: 50px;
        padding: 5px 10px 5px 8px;
    }
    
    .clan-banner-logo {
        width: 35px;
        height: 35px;
    }
    
    .clan-banner-info h3 {
        font-size: 0.75rem;
    }
    
    .user-count-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    /* Dashboard */
    .dashboard {
        padding: 10px;
        gap: 10px;
        grid-template-columns: 1fr;
    }
    
    .card {
        min-height: auto;
        padding: 15px;
    }
    
    .card-title {
        font-size: 0.8rem;
    }
    
    .card-main-text {
        font-size: 1.6rem;
        margin: 12px 0;
    }
    
    .card-sub-text {
        font-size: 1rem;
    }
    
    .special-box {
        padding: 12px;
        margin-top: 15px;
    }
    
    .feat-timer {
        font-size: 1.8rem;
    }
    
    .feat-name {
        font-size: 1.1rem;
    }
    
    /* Merchant display */
    .merchant-display-wrapper {
        flex-direction: column;
    }
    
    .merchant-column {
        width: 100%;
    }
    
    .merch-slot {
        padding: 10px;
    }
    
    .merch-name {
        font-size: 0.8rem;
    }
    
    /* Rotation rows */
    .rot-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .rot-val {
        text-align: left;
    }
    
    /* Community Hub */
    .community-hub {
        padding: 10px;
    }
    
    .community-sidebar {
        flex-direction: column;
        max-height: none;
        overflow: visible;
    }
    
    .sidebar-section {
        min-width: 100%;
        width: 100%;
    }
    
    .sidebar-section:first-child {
        max-height: 200px;
    }
    
    .online-users-list {
        max-height: 150px;
    }
    
    /* Chat */
    .community-tabs {
        padding: 0 10px;
    }
    
    .community-tab {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    .chat-messages-area {
        max-height: 350px;
        padding: 12px;
    }
    
    .chat-bubble {
        max-width: 95%;
        padding: 10px 12px;
    }
    
    .chat-avatar {
        width: 32px;
        height: 32px;
    }
    
    .chat-author {
        font-size: 0.75rem;
    }
    
    .chat-text {
        font-size: 0.85rem;
    }
    
    .chat-input-wrapper {
        padding: 10px;
    }
    
    .formatting-toolbar {
        padding: 5px 6px;
        gap: 2px;
    }
    
    .format-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .format-divider {
        display: none;
    }
    
    .chat-input {
        min-height: 50px;
        font-size: 16px; /* Prevents iOS zoom */
        padding: 10px 12px;
    }
    
    .reply-preview-bar {
        padding: 8px 10px;
    }
    
    .reply-preview-content {
        font-size: 0.75rem;
    }
    
    /* Idea board */
    .idea-board-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .idea-board-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .idea-search-input,
    .idea-sort-select {
        flex: 1;
        min-width: 120px;
    }
    
    .suggestion-card {
        padding: 12px;
    }
    
    .suggestion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .suggestion-meta {
        width: 100%;
    }
    
    .suggestion-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .vote-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Compose modal */
    .compose-modal {
        padding: 15px;
    }
    
    .compose-textarea {
        min-height: 120px;
        font-size: 16px;
    }
    
    /* Modals */
    .modal-content,
    .settings-modal-content,
    .profile-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Settings dropdown */
    .settings-dropdown {
        width: 100vw;
        max-width: 280px;
        left: auto;
        right: -10px;
    }
    
    /* Notification panel */
    .notification-panel {
        position: fixed !important;
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 95vw !important;
        max-width: 95vw !important;
    }
    .notification-panel.show {
        transform: translateX(-50%) translateY(0) scale(1) !important;
    }
    
    /* XP Tracker */
    .xp-main-grid {
        padding: 10px;
        gap: 12px;
    }
    
    .tracker-tabs {
        flex-wrap: wrap;
    }
    
    .tracker-tab {
        flex: 1;
        min-width: 80px;
        font-size: 0.7rem;
        padding: 8px 5px;
    }
    
    .xp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .skill-item {
        padding: 8px 5px;
    }
    
    .skill-icon {
        width: 24px;
        height: 24px;
    }
    
    .skill-name {
        font-size: 0.6rem;
    }
    
    .skill-level {
        font-size: 0.95rem;
    }
    
    /* Clan panel */
    .clan-member-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .member-card {
        padding: 10px;
    }
    
    .member-name {
        font-size: 0.8rem;
    }
    
    /* Activities grid */
    .activities-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-card {
        padding: 12px;
    }
    
    /* Toast notifications */
    #notification-toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .notification-toast {
        width: 100%;
    }
}

/* === SMALL PHONE BREAKPOINT (400px) === */
@media (max-width: 400px) {
    header {
        padding: 6px 8px 10px 8px;
    }
    
    .header-logo {
        height: 26px;
    }
    
    .scrolling-title {
        font-size: 0.9rem;
        max-width: 120px;
    }
    
    .nav-item {
        padding: 5px 8px;
        font-size: 0.65rem;
    }
    
    .header-time-val {
        font-size: 0.9rem;
    }
    
    .clan-banner {
        display: none !important; /* Hide on very small screens */
    }
    
    .dashboard {
        padding: 8px;
        gap: 8px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card-main-text {
        font-size: 1.4rem;
    }
    
    .card-sub-text {
        font-size: 0.9rem;
    }
    
    .feat-timer {
        font-size: 1.5rem;
    }
    
    .chat-bubble {
        padding: 8px 10px;
    }
    
    .format-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .suggestion-card {
        padding: 10px;
    }
    
    .vote-btn {
        padding: 5px 10px;
    }
}

/* =============================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================================================= */

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .menu-btn,
    .search-btn,
    .notification-btn,
    .format-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .vote-btn,
    .btn,
    button {
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 48px;
    }
    
    /* Remove hover effects that don't work on touch */
    .card:hover,
    .chat-bubble:hover,
    .suggestion-card:hover,
    .online-user-item:hover {
        transform: none;
    }
    
    /* Better scrolling */
    .chat-messages-area,
    .online-users-list,
    .suggestions-list,
    .modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Prevent text selection issues */
    .chat-input,
    .compose-textarea,
    input,
    textarea {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* =============================================================================
   LANDSCAPE PHONE
   ============================================================================= */

/* === LANDSCAPE PHONE === */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 5px 10px 8px 10px;
        min-height: auto;
    }
    
    .header-nav {
        margin: 3px 0;
    }
    
    .nav-item {
        padding: 4px 8px;
    }
    
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card {
        min-height: 200px;
    }
    
    .chat-messages-area {
        max-height: 200px;
    }
    
    .modal-content,
    .settings-modal-content {
        max-height: 95vh;
    }
}

/* =============================================================================
   SAFE AREA INSETS (for notched phones)
   ============================================================================= */

/* === SAFE AREA INSETS (for notched phones) === */
@supports (padding: max(0px)) {
    header {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .dashboard,
    .community-hub,
    .xp-main-grid {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    #notification-toast-container {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

/* === MOBILE PICKER & POPUP FIXES === */
@media (max-width: 580px) {
    /* Color picker */
    .color-picker-dropdown {
        left: auto;
        right: 0;
        transform: none;
        padding: 10px;
    }
    
    .color-swatch {
        width: 32px;
        height: 32px;
    }
    
    /* Font picker */
    .font-picker-dropdown {
        left: auto;
        right: 0;
        transform: none;
        max-height: 200px;
        min-width: 160px;
    }
    
    .font-option {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    /* Link input modal */
    .link-input-modal {
        width: 90vw;
        max-width: 350px;
    }
    
    .link-input-modal input {
        font-size: 16px;
        padding: 12px;
    }
    
    /* Online users modal */
    .online-modal-content {
        width: 95vw;
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .modal-users-list {
        max-height: 60vh;
    }
    
    /* Quick stats in sidebar */
    .quick-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-box {
        padding: 10px 8px;
    }
    
    .stat-box .stat-value {
        font-size: 1.1rem;
    }
    
    /* Auth buttons */
    .auth-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Profile display */
    .profile-btn-display {
        max-width: 100px;
    }
    
    .profile-display-name {
        font-size: 0.75rem;
        max-width: 60px;
    }
}

/* === PREVENT ZOOM ON INPUT FOCUS (iOS) === */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px;
    }
}

/* =============================================================================
   CLAN DIRECTORY
   ============================================================================= */

/* === CLAN DIRECTORY === */

.clan-directory {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0;
    margin-top: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.directory-header {
    background: var(--bg-card);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.directory-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.directory-title svg { color: var(--accent); }
.directory-title h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.directory-subtitle {
    color: var(--text-sub);
    font-size: 0.85rem;
    margin: 0 0 16px 0;
}

.directory-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.directory-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    transition: 0.2s;
}
.directory-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.15);
}
.directory-search svg { color: var(--text-muted); flex-shrink: 0; }
.directory-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 12px;
    font-size: 0.9rem;
}
.directory-search input:focus { outline: none; }
.directory-search input::placeholder { color: var(--text-dim); }

.directory-controls select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}
.directory-controls select:hover { border-color: var(--border-light); }
.directory-controls select:focus { border-color: var(--accent); outline: none; }

.add-clan-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.add-clan-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.directory-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-dark);
    font-size: 0.85rem;
}
#directory-count { color: var(--text-sub); }
.directory-hint { color: var(--text-dim); }

.clan-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 0 24px 0;
    max-height: calc(100vh - 280px);
    min-height: 400px;
    overflow-y: auto;
    scroll-behavior: smooth;
    /* Ensure last item is fully visible */
    padding-bottom: 40px;
}

.clan-grid-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #666;
    gap: 16px;
}
.clan-grid-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.clan-grid-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.clan-grid-empty h3 { color: var(--text-sub); margin-bottom: 8px; }
.clan-grid-empty p { margin-bottom: 20px; }

/* Clan List Items */
.clan-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.clan-card:last-child {
    border-bottom: none;
}
.clan-card:hover {
    background: rgba(255, 152, 0, 0.05);
}

.clan-card-banner {
    display: none;
}

.clan-card-motif {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.clan-card-motif img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.clan-card-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 0;
}

.clan-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 200px;
    flex-shrink: 0;
}

.clan-card-desc {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: auto;
    display: block;
    -webkit-line-clamp: unset;
    min-width: 150px;
}

.clan-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    width: 180px;
    justify-content: flex-start;
}

.clan-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 152, 0, 0.12);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
}
.clan-tag.recruiting {
    background: rgba(76, 175, 80, 0.15);
    color: var(--green);
}
.clan-tag.apply {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
}
.clan-tag.closed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-sub);
}

.clan-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    min-width: 220px;
    justify-content: flex-end;
}

.clan-card-members {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-sub);
}
.clan-card-members svg { color: var(--text-muted); }

.clan-card-daily-xp {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--green);
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.clan-card-daily-xp svg { 
    color: var(--green); 
    width: 12px; 
    height: 12px; 
}
.clan-card-daily-xp .daily-xp-value {
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.clan-card-world {
    font-size: 0.8rem;
    color: #666;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.clan-card-discord {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5865F2;
    border-radius: 6px;
    transition: all 0.2s;
}
.clan-card-discord:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}
.clan-card-discord svg { color: #fff; width: 16px; height: 16px; }

/* Clan Refresh Button */
.clan-refresh-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.clan-refresh-btn svg {
    color: #888;
    transition: color 0.2s;
}
.clan-refresh-btn:hover {
    background: rgba(255,255,255,0.15);
}
.clan-refresh-btn:hover svg {
    color: var(--accent, #0af);
}
.clan-refresh-btn.refreshing {
    pointer-events: none;
}
.clan-refresh-btn.refreshing svg {
    animation: spin 1s linear infinite;
    color: var(--accent, #0af);
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Clan card added by display */
.clan-card-added-by {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

/* =============================================================================
   ADD CLAN MODAL
   ============================================================================= */

/* Add Clan Modal */
.add-clan-modal-content {
    max-width: 500px !important;
    width: 95vw !important;
}

.add-clan-form { padding: 8px 0; }

.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 6px;
}
.form-group label .required { color: #f66; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    padding: 12px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-hint.char-count { text-align: right; }

.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group { flex: 1; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =============================================================================
   PROFILE VERIFICATION
   ============================================================================= */

/* Verified badge shown next to player name */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-full);
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: default;
}

/* Verify Modal — compact popup, must override all .modal-content responsive rules */
.verify-modal-content {
    max-width: 420px !important;
    width: 92vw !important;
    max-height: 85vh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: auto !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}
.verify-modal-content .modal-header {
    flex-shrink: 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}
.verify-modal-content .modal-header h3 {
    font-size: 1rem;
    margin: 0;
}
.verify-modal-content .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.verify-modal-content .form-actions {
    margin-top: 14px;
    padding-top: 14px;
}

.verify-player-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.verify-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}
.verify-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.verify-rsn {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.verify-desc {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.verify-info-box {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(79, 195, 247, 0.08);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.78rem;
    color: var(--blue);
    line-height: 1.4;
}
.verify-info-box svg {
    flex-shrink: 0;
    margin-top: 2px;
    width: 14px;
    height: 14px;
}

.verify-requirements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 6px;
}
.verify-req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* Skill Picker (Step 1) */
.verify-skill-picker-section {
    margin: 10px 0 4px 0;
}
.verify-picker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.verify-pick-count {
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--text-sub);
    transition: color 0.2s;
}
.verify-pick-count.complete {
    color: var(--green);
}
.verify-skill-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.verify-skill-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    position: relative;
    min-height: 0;
}
.verify-skill-tile:hover {
    border-color: rgba(255, 152, 0, 0.4);
    background: rgba(255, 152, 0, 0.06);
}
.verify-skill-tile.selected {
    border-color: var(--green, #4caf50);
    background: rgba(76, 175, 80, 0.18);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3), inset 0 0 12px rgba(76, 175, 80, 0.08);
    transform: scale(1.04);
}
.verify-skill-tile.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}
.verify-tile-icon {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain;
    transition: filter 0.15s;
}
.verify-skill-tile.selected .verify-tile-icon {
    filter: brightness(1.2) drop-shadow(0 0 3px rgba(76, 175, 80, 0.5));
}
.verify-tile-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-sub);
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.15s;
}
.verify-skill-tile.selected .verify-tile-name {
    color: var(--green, #4caf50);
    font-weight: 700;
}
.verify-skill-tile .tile-check {
    display: none;
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: var(--green, #4caf50);
    border-radius: 50%;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.verify-skill-tile.selected .tile-check {
    display: flex;
}

/* Reset selections button */
.verify-reset-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    transition: color 0.15s, background 0.15s;
}
.verify-reset-btn:hover {
    color: var(--red, #ff5252);
    background: rgba(255, 82, 82, 0.1);
}

/* Cancel challenge button */
#verify-cancel-btn {
    color: var(--red, #ff5252);
    border-color: rgba(255, 82, 82, 0.3);
}
#verify-cancel-btn:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.5);
}

/* Step 2: Challenge */
.verify-challenge-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}
.verify-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.verify-challenge-box {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}
.verify-challenge-box h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #fff;
}
.verify-challenge-desc {
    font-size: 0.88rem;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.verify-skills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.verify-skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.15);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.verify-skill-item .skill-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.verify-skill-item .skill-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.verify-skill-item .skill-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}
.verify-skill-item.gained {
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.08);
}
.verify-skill-item.not-gained {
    border-color: rgba(255, 51, 51, 0.3);
    background: rgba(255, 51, 51, 0.06);
}

.verify-tips {
    font-size: 0.82rem;
    color: var(--text-sub);
    line-height: 1.6;
}
.verify-tips strong {
    color: var(--text-main);
}
.verify-tips ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}
.verify-tips li {
    margin-bottom: 4px;
}

/* Step 3: Result */
.verify-result {
    text-align: center;
    padding: 20px 10px;
}
.verify-result-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.verify-result h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}
.verify-result p {
    color: var(--text-sub);
    font-size: 0.9rem;
    line-height: 1.5;
}
.verify-result.success h3 { color: var(--green); }
.verify-result.failure h3 { color: var(--urgent-red); }

.verify-gains-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
    text-align: left;
}
.verify-gain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.verify-gain-item.gained {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.25);
    color: var(--green);
}
.verify-gain-item.not-gained {
    background: rgba(255, 51, 51, 0.08);
    border: 1px solid rgba(255, 51, 51, 0.2);
    color: var(--urgent-red);
}
.verify-gain-skill {
    flex: 1;
    margin-left: 8px;
    font-weight: 500;
}
.verify-gain-xp {
    margin-right: 8px;
    opacity: 0.8;
    font-size: 0.8rem;
}
.verify-gain-icon {
    font-size: 1rem;
}
.skill-check-status {
    font-size: 0.9rem;
}
.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin-small 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin-small {
    to { transform: rotate(360deg); }
}

/* Privacy-toggle verification (max-XP players) */
.verify-privacy-toggle-box {
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 14px 0;
}
.privacy-state-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.privacy-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    min-width: 110px;
}
.privacy-state div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.privacy-state-icon {
    font-size: 1.6rem;
    line-height: 1;
}
.privacy-state-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-sub);
    font-weight: 600;
}
.privacy-state-value {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: capitalize;
}
.current-state {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.current-state .privacy-state-value {
    color: var(--text-sub);
}
.expected-state {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.25);
}
.expected-state .privacy-state-value {
    color: var(--green);
}
.privacy-arrow {
    color: var(--gold);
    flex-shrink: 0;
}

/* =============================================================================
   CUSTOMIZER PREVIEW
   ============================================================================= */

/* Preview Ornaments */
.preview-ornament {
    display: inline;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* Customizer Preview Styles */
#preview-banner-area {
    transition: height 0.3s ease, background 0.3s ease;
}
#preview-banner-center {
    transition: all 0.3s ease;
    object-fit: contain;
}
#preview-clan-name {
    transition: font-family 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}
#preview-clan-blurb {
    transition: font-family 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}

/* =============================================================================
   PAGINATION CONTROLS
   ============================================================================= */

/* Pagination Controls */
.clan-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    margin: 16px 0;
    flex-wrap: wrap;
}
.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pagination-btn:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}
.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.pagination-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}
.pagination-ellipsis {
    color: var(--text-dim);
    padding: 0 8px;
    font-size: 1rem;
}

/* Load More Button */
.clan-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-top: 10px;
}
.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #e68900 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}
.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}
.load-more-btn:active {
    transform: translateY(-1px);
}

/* Mobile */
@media (max-width: 768px) {
    .directory-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .directory-search { max-width: none; }
    .clan-grid { grid-template-columns: 1fr; padding: 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .clan-pagination {
        gap: 4px;
        padding: 12px;
    }
    .pagination-btn {
        width: 32px;
        height: 32px;
    }
    .pagination-info {
        font-size: 0.8rem;
        min-width: 80px;
    }
}

/* =============================================================================
   DESKTOP 1080p OPTIMIZATION (Compact Clan Layout)
   ============================================================================= */

@media (min-width: 1200px) {
    /* On 1080p+, show a compact version of the unified banner+stats */
    #clan-results .clan-header-banner-wrap {
        min-height: 100px !important;
        border-radius: 8px 8px 0 0;
    }

    /* Show compact clan name in the stats overlay when on desktop */
    #clan-results .clan-name-compact {
        display: none;
    }
    
    /* Compact stats overlay styling for 1080p */
    #clan-results .clan-compact-header,
    #clan-results .clan-banner-stats-overlay {
        padding: 6px 16px;
        gap: 10px;
    }
    
    /* Add clan name to compact header on 1080p */
    #clan-results .clan-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    #clan-results .mini-stat {
        padding: 3px 6px;
        min-width: 45px;
    }
    
    #clan-results .mini-val {
        font-size: 0.85rem;
    }
    
    #clan-results .mini-lbl {
        font-size: 0.6rem;
    }
    
    /* More compact ticker */
    #clan-results .clan-ticker-slim {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* Slightly tighter main grid */
    #clan-results .clan-main-grid {
        padding: 8px;
        gap: 8px;
    }
    
    /* Smaller panel headers */
    #clan-results .panel-head {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    /* Ensure left column panels all fit on 1080p screens */
    #clan-results .clan-left-col {
        max-height: 100%;
        overflow-y: auto;
    }
    
    /* Compact member activity panel for 1080p */
    #clan-results .member-changes-panel {
        max-height: 200px;
        min-height: 120px;
    }
    
    /* Ensure podium panels stay visible */
    #clan-results .clan-left-col > .clan-panel[data-panel="xp-podium"],
    #clan-results .clan-left-col > .clan-panel[data-panel="activity-podium"] {
        flex-shrink: 0;
        min-height: 100px;
    }
    
    /* Compact podium cards for 1080p */
    #clan-results .podium-row {
        padding: 8px;
        gap: 6px;
    }
    
    #clan-results .podium-card {
        padding: 6px 4px;
    }
    
    #clan-results .podium-avatar {
        width: 30px;
        height: 30px;
    }
    
    #clan-results .podium-name {
        font-size: 0.65rem;
    }
    
    #clan-results .podium-val {
        font-size: 0.6rem;
    }
    
    /* Table row height for consistent 8 rows display */
    #clan-results .clan-table td {
        padding: 8px 6px;
    }
}

/* =============================================================================
   COMPACT SEARCH CONTROLS FOR CLAN PAGE (1080p+)
   ============================================================================= */

@media (min-width: 1200px) {
    /* When clan results are visible, make search controls more compact */
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls.triple-search,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls.triple-search {
        padding: 6px 15px;
        gap: 8px;
        margin: 5px auto;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .search-section,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .search-section {
        gap: 4px;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .search-label,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .search-label {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .search-box-styled,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .search-box-styled {
        height: 32px;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .search-box-styled input,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .search-box-styled input {
        font-size: 0.8rem;
        padding: 0 10px;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .fav-popup-btn,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .fav-popup-btn {
        width: 28px;
        height: 28px;
    }
    
    body.xp-page:has(#clan-results[style*="display: block"]) .tracker-controls .search-divider,
    body.xp-page:has(#clan-results[style*="display:block"]) .tracker-controls .search-divider {
        height: 28px;
    }
}

/* =============================================================================
   LARGE SCREENS (1440p+)
   ============================================================================= */

/* Large screens (1440p+) - more breathing room for unified banner */
@media (min-width: 1440px) {
    /* Show banner with generous height on 1440p+ */
    #clan-results .clan-header-banner-wrap {
        display: flex !important;
        min-height: 100px !important;
        max-height: none;
    }
    
    /* Hide compact clan name when banner is shown */
    #clan-results .clan-name-compact {
        display: none !important;
    }
    
    #clan-results .member-changes-panel {
        max-height: 300px;
        min-height: 180px;
    }
    
    #clan-results .clan-left-col > .clan-panel[data-panel="xp-podium"],
    #clan-results .clan-left-col > .clan-panel[data-panel="activity-podium"] {
        min-height: 115px;
    }
    
    #clan-results .podium-row {
        padding: 10px;
    }
    
    #clan-results .podium-avatar {
        width: 34px;
        height: 34px;
    }
    
    #clan-results .clan-table td {
        padding: 10px 8px;
    }
}

/* Skill picker responsive */
@media (max-width: 480px) {
    .verify-modal-content {
        width: 96vw !important;
        max-height: 88vh !important;
        border-radius: 10px !important;
    }
    .verify-modal-content .modal-body {
        padding: 12px 14px;
    }
    .verify-skill-picker {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    .verify-tile-icon {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }
    .verify-tile-name {
        font-size: 0.6rem;
    }
    .verify-skill-tile {
        padding: 5px 2px;
        gap: 2px;
    }
}