@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');
@import url("https://www.nerdfonts.com/assets/css/webfont.css");

* {
        font-family: 'CTMKF', 'Rubik', system-ui, -apple-system, sans-serif;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
:root {
    --primary: #d351b0;
    --primary-light: #e578c4;
    --primary-glow: rgba(211, 81, 176, 0.3);
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-quaternary: #252525;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #808080;
    --border: #333333;
    --border-light: #444444;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
}

.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    gap: 5px;
    background: var(--bg-secondary);
    border-bottom: 3px outset var(--border);
}

.header-bg {
    position: sticky;
    top: 0;
    background: linear-gradient(0deg, transparent 50%, var(--primary));
    height: 500px;
    margin: -500px 0 0 0;
    z-index: 0;
    pointer-events: none;
}

.navigation a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: var(--border) 0 0 0 1px inset;
    transition: all 0.3s, color 0.3s;
}
.navigation a.active {
    background: linear-gradient(180deg, var(--bg-secondary) 70%, var(--primary));
    color: var(--text-primary);
    
}

.navigation a:hover {
    background: var(--primary);
    color: var(--bg-primary);
}

.header {
    background: color-mix(in srgb, var(--bg-tertiary) 40%, transparent);
    backdrop-filter: blur(50px);
    padding: 20px;
    margin: 30px auto;
    text-align: center;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-width: fit-content;
    filter: drop-shadow(0 15px 15px var(--bg-primary))drop-shadow(0 20px 15px var(--bg-primary));
    z-index: 1;
}
.header-left {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    align-items: flex-start;
}

.hero-container {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    padding: 20px;
    max-width: min(1200px, 85%);
}

.hero {
    background: color-mix(in srgb, var(--bg-secondary) 40%, transparent);
    backdrop-filter: blur(50px);
    padding: 40px 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.hero-intro :is(h1,
        h2,
        h3,
        h4,
        h5,
        h6) {
    font-weight: bold;
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: -35px auto;
    padding: 20px;
    max-width: min(1200px, 85%);
    z-index: 4;
}

.feature-card {
    background: color-mix(in srgb, var(--bg-secondary) 60%, transparent);
    backdrop-filter: blur(50px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 4;
}
.feature-card .nf {
    font-size: 50px;
    color: var(--primary);
}
.feature-card h2 {
    margin: 10px 20px 0 0 ;
}

.contactinfo-container {
    /* display: flex; */
    justify-content: center;
    margin: 20px auto;
    padding: 20px;
    width: 100%;
    max-width: min(1200px, 85%);
}
.contactinfo {
    background: color-mix(in srgb, var(--bg-secondary) 80%, transparent);
    backdrop-filter: blur(50px);
    padding: 40px 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    width: 100%;
}
.contactinfo h1 {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}
.contactinfo ul {
    list-style: none;
}
.contactinfo li {
    margin: 10px 0;
}
.contactinfo a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 10px;
    border-bottom: 1px solid var(--primary);
    transition: all 0.3s, color 0.3s;
}
.contactinfo a:hover {
    color: var(--primary);
    border-bottom: 1px solid transparent;
}

.footer {
    background: var(--bg-secondary);
    padding: 20px;
    text-align: center;
    border-top: 3px outset var(--border);
    margin-top: 40px;
}
code {
    background: var(--bg-secondary);
    padding: 2px 5px;
    border-radius: 5px;
    border: 1px solid var(--border);
    font-family: 'Courier New', Courier, monospace;
}

/* Container & Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
    backdrop-filter: blur(50px);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* Metadata Display */
.meta-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.meta-item {
    background: var(--bg-quaternary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.meta-label {
    font-weight: 600;
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.meta-value {
    color: var(--text-primary);
}

/* Section Styles */
.intro-section {
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
    backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.intro-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.intro-section p:last-child {
    margin-bottom: 0;
}

.section {
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
    backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.section:hover {
    border-color: rgba(211, 81, 176, 0.5);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(211, 81, 176, 0.3);
}

.section h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.section p:last-child {
    margin-bottom: 0;
}

.section strong {
    color: var(--primary-light);
    font-weight: 600;
}

.section em {
    color: var(--primary);
    font-style: italic;
}

.section ul, .section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Info Boxes */
.penalty-info {
    background: var(--bg-quaternary);
    border: 1px solid #ff4757;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #ff4757;
}

.penalty-info strong {
    color: #ff4757;
}

.policy-info {
    background: var(--bg-quaternary);
    border: 1px solid #ffa726;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #ffa726;
}

.policy-info strong {
    color: #ffa726;
}

.note-info {
    background: var(--bg-quaternary);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary);
}

.note-info strong {
    color: var(--primary);
}

/* Modpack Cards */
.modpacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.modpack-card {
    background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
    backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modpack-card:hover {
    border-color: rgba(211, 81, 176, 0.5);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(211, 81, 176, 0.3);
    transform: translateY(-4px);
}

.modpack-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-quaternary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modpack-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modpack-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-light);
    margin: 0;
    text-align: center;
}

.modpack-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.modpack-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(211, 81, 176, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 16px rgba(211, 81, 176, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-quaternary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--bg-quaternary) 70%, var(--primary) 30%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .meta-info {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 1.5rem;
    }

    .section h2 {
        font-size: 1.4rem;
    }

    .section h3 {
        font-size: 1.2rem;
    }
}

/* Status Page Specific Styles */

/* Main Content */
.main-content {
    flex: 1;
}

/* Status Indicator */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    white-space: nowrap;
}

header.header .status {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4757;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px currentColor;
}

.status.connected .status-indicator {
    background: #00ff88;
}

.status.error .status-indicator {
    background: #ff4757;
    animation: flash 1s ease-in-out infinite;
}

.status-text {
    font-weight: 500;
    color: var(--text-secondary);
}

.last-update {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 800px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d351b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-select:hover {
    border-color: var(--primary-light);
}

/* Toggle Switch */
.friend-rooms-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-quaternary);
    transition: 0.4s;
    border-radius: 24px;
    border: 1px solid var(--border-light);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: var(--text-primary);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary-light);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background-color: white;
}

.toggle-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    user-select: none;
}

.friend-rooms-disclaimer {
    background: var(--bg-quaternary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 600px;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.disclaimer-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.disclaimer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Rooms */
.rooms-wrapper {
    min-height: 100vh;
    position: relative;
}

.rooms-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    opacity: 1;
    transition: opacity 200ms ease;
    padding: 0 2rem;
}

.rooms-container.updating {
    opacity: 0.6;
    pointer-events: none;
}

.room-card {
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
    backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.room-card:hover {
    border-color: rgba(211, 81, 176, 0.5);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(211, 81, 176, 0.3);
}

.room-card:hover::before {
    opacity: 1;
}

.room-card.friend-room {
    border-color: var(--primary-light);
    background: linear-gradient(to bottom right, var(--bg-tertiary), var(--bg-quaternary));
}

.room-card.friend-room::before {
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    opacity: 1;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.room-id {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-quaternary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    font-family: 'CTMKF', system-ui;
}

.room-gamemode {
    background: linear-gradient(135deg, var(--primary), #b8439a);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.room-gamemode:not(.friend-room-badge):hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: scale(1.05);
}

.friend-room-badge {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    font-weight: 700;
    letter-spacing: 0.5px;
}

.friend-room-badge:hover {
    background: linear-gradient(135deg, var(--primary), #b8439a);
    transform: scale(1.05);
}

.room-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-quaternary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: var(--bg-secondary);
    border-color: rgba(211, 81, 176, 0.5);
}

.info-label {
    color: #b0b0b0;
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.no-rooms {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.3rem;
    padding: 4rem 2rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    border: 2px dashed var(--border);
    box-shadow: var(--shadow-md);
}

.filter-suggestion {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 3rem 2rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    border: 2px dashed var(--border);
    box-shadow: var(--shadow-md);
}

.filter-suggestion .suggestion-text {
    margin-bottom: 1rem;
}

.filter-suggestion .suggestion-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.filter-suggestion .suggestion-link:hover {
    color: var(--primary-light);
}

/* Players */
.players-section {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.players-header {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.player-card {
    font-family: "CTMKF", "Rubik", system-ui;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.player-card:hover {
    border-color: rgba(211, 81, 176, 0.5);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.player-card:hover::before {
    transform: scaleX(1);
}

/* WFC Owner Styling */
.player-card.wfc-owner {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(211, 81, 176, 0.1) 0%, var(--bg-quaternary) 100%);
    box-shadow: inset 0 0 20px rgba(211, 81, 176, 0.4), var(--shadow-md);
    animation: wfc-glow 2s ease-in-out infinite;
}

@keyframes wfc-glow {
    0%, 100% {
        box-shadow: inset 0 0 20px rgba(211, 81, 176, 0.4), var(--shadow-md);
    }
    50% {
        box-shadow: inset 0 0 30px rgba(211, 81, 176, 0.6), var(--shadow-lg);
    }
}

.player-card.wfc-owner:hover {
    border-color: var(--primary-light);
    box-shadow: inset 0 0 35px rgba(211, 81, 176, 0.7), var(--shadow-lg);
}

.wfc-owner-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(211, 81, 176, 0.5);
}

.wfc-owner-name {
    color: var(--primary-light);
    text-shadow: 0 0 10px rgba(211, 81, 176, 0.6);
    animation: wfc-name-glow 2s ease-in-out infinite;
}

@keyframes wfc-name-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(211, 81, 176, 0.6);
    }
    50% {
        text-shadow: 0 0 20px rgba(211, 81, 176, 0.8);
    }
}

/* WFC Custom Styling */
.player-card.wfc-custom {
    --wfc-accent: #f38ba8;
    box-shadow: inset 0 0 20px rgba(243, 139, 168, 0.4), var(--shadow-md);
    animation: wfc-custom-glow 2s ease-in-out infinite;
}

@keyframes wfc-custom-glow {
    0%, 100% {
        box-shadow: inset 0 0 20px rgba(243, 139, 168, 0.4), var(--shadow-md);
    }
    50% {
        box-shadow: inset 0 0 30px rgba(243, 139, 168, 0.6), var(--shadow-lg);
    }
}

.player-card.wfc-custom:hover {
    box-shadow: inset 0 0 35px rgba(243, 139, 168, 0.7), var(--shadow-lg);
}

.player-card.wfc-custom .wfc-owner-name {
    color: var(--wfc-accent);
    text-shadow: 0 0 10px rgba(243, 139, 168, 0.6);
    animation: wfc-custom-name-glow 2s ease-in-out infinite;
    font: italic bold 1.1rem 'Rubik', 'CTMKF', system-ui;
}

@keyframes wfc-custom-name-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(243, 139, 168, 0.6);
    }
    50% {
        text-shadow: 0 0 20px rgba(243, 139, 168, 0.8);
    }
}

.player-card.wfc-custom .wfc-owner-badge {
    background: linear-gradient(135deg, var(--wfc-accent) 0%, rgba(243, 139, 168, 0.8) 100%);
    box-shadow: 0 0 12px rgba(243, 139, 168, 0.5);
}

.mii-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.mii-avatar:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 15px var(--primary-glow);
}

.mii-avatar.loading {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.openhost-badge {
    position: absolute;
    bottom: -6px;
    left: -6px;
    background: #ff69b4;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 8px;
    border: 2px solid var(--bg-quaternary);
    box-shadow: var(--shadow-md);
    z-index: 1;
    user-select: none;
    cursor: help;
}

.guest-avatar {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--bg-quaternary);
    box-shadow: var(--shadow-md);
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: help;
}

.guest-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
    font-family: 'Rubik', 'CTMKF', system-ui!important;
    font-display: 'Rubik', 'CTMKF', system-ui!important;
}

.crown-icon {
    color: #ffa726;
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px rgba(255, 167, 38, 0.6));
    animation: crown-glow 2s ease-in-out infinite alternate;
}

@keyframes crown-glow {
    from { filter: drop-shadow(0 0 5px rgba(255, 167, 38, 0.6)); }
    to { filter: drop-shadow(0 0 10px rgba(255, 167, 38, 0.8)); }
}

.player-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
}

.player-fc {
    font-size: 0.85rem;
    color: #b0b0b0;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.guest-player {
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 500;
    padding: 2px 6px;
    background: var(--bg-secondary);
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.player-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.score-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.score-label {
    font-weight: 600;
    color: #b0b0b0;
}

.score-value {
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* Connection Map */
.connection-map-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.connection-map-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.connection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.connection-modal.active {
    display: flex;
}

.connection-modal-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.connection-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.connection-modal-title {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connection-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.connection-modal-close:hover {
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.connection-map-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    background: var(--bg-quaternary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 1rem;
}

.connection-map {
    border-collapse: collapse;
    width: 100%;
    min-width: 400px;
    font-size: 0.9rem;
}

.connection-map th,
.connection-map td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border);
}

.connection-map th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
}

.connection-map tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.connection-map .player-row {
    text-align: left;
    font-weight: 500;
    font-family: 'Rubik', 'CTMKF', system-ui;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connection-map .player-id {
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.5rem;
}

.connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.connection-dot.good {
    background-color: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.connection-dot.unstable {
    background-color: #ffa726;
    box-shadow: 0 0 8px #ffa726;
}

.connection-dot.dropped {
    background-color: #ff4757;
    box-shadow: 0 0 8px #ff4757;
}

.connection-dot.self {
    background-color: var(--text-muted);
    position: relative;
}

.connection-dot.self::before {
    content: '/';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: bold;
}

.connection-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #b0b0b0;
}

/* Tooltip */
.tooltip-container {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    display: none;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-container::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--border);
}

.tooltip-container::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--bg-primary);
    z-index: 1;
}

/* Status Page Header */
header.header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 10;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    min-height: auto;
    margin: 1.5rem auto;
    max-width: 1400px;
    width: 90%;
    border-radius: 20px;
    gap: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 0;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-bottom {
    margin-top: 0.25rem;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-logo {
    height: 40px;
    width: auto;
    margin-top: 2px;
}

.header h1 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 20px var(--primary-glow);
    margin: 0;
    font-family: 'CTMKF', system-ui;
    line-height: 1.2;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.refresh-btn {
    background: linear-gradient(135deg, var(--primary), #b8439a);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Responsive Design for Status Page */
@media (max-width: 768px) {
    header.header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .header-left {
        justify-content: flex-start;
    }

    .header-right {
        justify-content: center;
    }

    header.header .status {
        align-self: center;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    body {
        padding-top: 80px;
    }

    .main-content {
        padding: 0 1rem 2rem;
    }

    .room-card {
        padding: 1.5rem;
    }

    .room-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .players-grid {
        grid-template-columns: 1fr;
    }

    .player-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        min-height: auto;
    }

    .mii-avatar {
        align-self: center;
    }

    .player-scores {
        justify-content: center;
        gap: 2rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .connection-modal-content {
        padding: 1rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3rem;
    }

    .refresh-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .room-card {
        padding: 1rem;
    }

    .info-item {
        padding: 0.75rem 1rem;
    }
}
