/* Comprehensive Responsive Design for Wiki Pages */
/* Includes hamburger menu and multi-breakpoint support */

/* CSS Variables and Base Styles */
:root {
    /* Dark Professional Theme */
    --primary-dark: #0a0a0a;
    --secondary-dark: #1a1a1a;
    --tertiary-dark: #2a2a2a;
    --accent-gold: #c9a96e;
    --bright-gold: #e6c884;
    --muted-gold: #8b7355;
    --virtue-purple: #6b46c1;
    --deep-purple: #4c1d95;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-dark: #374151;
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --shadow-medium: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --glow-gold: 0 0 30px rgba(201, 169, 110, 0.5);
    --glow-purple: 0 0 30px rgba(107, 70, 193, 0.4);
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 50%, var(--tertiary-dark) 100%);
    --gradient-card: linear-gradient(145deg, rgba(42, 42, 42, 0.8) 0%, rgba(26, 26, 26, 0.9) 100%);
    --gradient-gold: linear-gradient(135deg, var(--accent-gold) 0%, var(--bright-gold) 100%);
    --gradient-purple: linear-gradient(135deg, var(--virtue-purple) 0%, var(--deep-purple) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Professional Dark Background */
.uo-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 20%, rgba(201, 169, 110, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 70, 193, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--primary-dark) 0%, var(--secondary-dark) 50%, var(--primary-dark) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pro-grid" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.5" fill="%23c9a96e" opacity="0.1"/><line x1="0" y1="20" x2="40" y2="20" stroke="%236b46c1" stroke-width="0.1" opacity="0.1"/><line x1="20" y1="0" x2="20" y2="40" stroke="%236b46c1" stroke-width="0.1" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23pro-grid)"/></svg>');
}

/* Professional Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    /* backdrop-filter: blur(8px) saturate(150%); */
    z-index: 1000;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-dark);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: none;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    width: 100%;
    position: relative;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: absolute;
    left: 2rem;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px var(--accent-gold));
}

.logo::before {
    content: "";
    display: inline-block;
    width: 48px;
    height: 48px;
    background-image: url('/emblem.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.75rem;
    vertical-align: middle;
    filter: brightness(1.3) contrast(1.2) saturate(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

.nav-links i {
    font-size: 0.9em;
    margin-right: 0.3rem;
}

.server-status-indicator {
    position: absolute;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vote-button {
    position: absolute;
    right: 10rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 5px;
    padding: 5px 10px;
    transition: all 0.3s ease;
    animation: aurora-glow 3s ease-in-out infinite;
    text-decoration: none;
}

.vote-text {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(201, 169, 110, 0.3);
}

.vote-button img {
    height: 30px;
    vertical-align: middle;
    display: block;
    border-radius: 3px;
}

.vote-button:hover {
    transform: scale(1.05);
}

.vote-button:hover .vote-text {
    color: var(--bright-gold);
}

.vote-reminder {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-gold), var(--bright-gold));
    color: #0a0a0a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(201, 169, 110, 0.5);
    animation: vote-bubble 3s ease-in-out 3, vote-fadeout 1s ease-out 9s forwards;
    z-index: 10;
}

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

@keyframes vote-bubble {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 0.9;
        transform: translateX(-50%) translateY(-3px);
    }
}

@keyframes vote-fadeout {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes aurora-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(201, 169, 110, 0.5),
                    0 0 20px rgba(201, 169, 110, 0.3),
                    0 0 30px rgba(201, 169, 110, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(230, 200, 132, 0.6),
                    0 0 30px rgba(230, 200, 132, 0.4),
                    0 0 45px rgba(230, 200, 132, 0.2);
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background-color: #ef4444;
    animation: none;
}

/* Hamburger menu hidden on desktop by default */
.hamburger-menu {
    display: none;
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

/* Main content area */
.main-content {
    padding: 4rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: var(--shadow-light);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 300;
}

.content-section {
    background: var(--gradient-card);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-medium);
}

.content-section h1, .content-section h2, .content-section h3, .content-section h4 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

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

.content-section ul, .content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.content-section a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.content-section a:hover {
    color: var(--bright-gold);
    border-bottom-color: var(--accent-gold);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.back-link:hover {
    color: var(--bright-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(-5px);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Desktop (Large screens) */
@media (max-width: 1200px) {
    .nav-links {
        gap: 2rem;
    }
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    .main-content {
        max-width: 900px;
        padding: 3rem 1.5rem;
    }
    .page-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
}

/* Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
    .logo {
        font-size: 0.85rem;
    }
    .logo::before {
        width: 40px;
        height: 40px;
    }
    .nav-links {
        gap: 1.5rem;
    }
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    .main-content {
        padding: 3rem 1.5rem;
        margin-top: 90px;
    }
    .page-title {
        font-size: clamp(1.8rem, 4vw, 2.3rem);
    }
    .content-section {
        padding: 2rem;
    }
}

/* Small Tablets and Large Phones - Hamburger Menu Activation */
@media (max-width: 768px) {
    /* Hide vote button on mobile */
    .vote-button {
        display: none !important;
    }

    /* Perfect mobile navbar - matches main site */
    .navbar {
        padding: 0.2rem 0 !important;
        min-height: 48px !important;
    }

    /* Hamburger Menu Button */
    .hamburger-menu {
        display: block !important;
        position: absolute !important;
        right: 1rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: none !important;
        border: none !important;
        color: var(--text-primary) !important;
        font-size: 1.2rem !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        transition: all 0.3s ease !important;
        padding: 4px !important;
    }

    .hamburger-menu:hover {
        color: var(--accent-gold);
        transform: translateY(-50%) scale(1.1);
    }

    .hamburger-menu.active {
        transform: translateY(-50%) rotate(90deg);
        color: var(--accent-gold);
    }

    /* Navigation Container */
    .nav-container {
        padding: 0 1rem !important;
        position: relative;
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        min-height: 48px !important;
    }

    .logo {
        font-size: 0.75rem !important;
        left: 1rem !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .logo::before {
        width: 35px !important;
        height: 35px !important;
        vertical-align: middle !important;
    }

    /* Mobile Navigation Menu */
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        padding: 2rem 0;
        transition: left 0.3s ease;
        z-index: 999;
        gap: 1rem;
        border-top: 1px solid var(--border-dark);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a {
        width: 90%;
        text-align: center;
        padding: 0.8rem;
        margin: 0 auto;
        border-radius: 8px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }

    .nav-links a:hover {
        background: rgba(212, 175, 55, 0.2);
        transform: scale(1.05);
    }

    /* Hide server status on mobile */
    .server-status-indicator {
        display: none;
    }

    /* Main Content */
    .main-content {
        padding: 2rem 1rem;
        margin-top: 55px;
    }

    .page-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .content-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .content-section h1 { font-size: 1.5rem; }
    .content-section h2 { font-size: 1.3rem; }
    .content-section h3 { font-size: 1.1rem; }
    .content-section h4 { font-size: 1rem; }

    .back-link {
        margin-bottom: 1.5rem;
        padding: 0.5rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    /* Even more compact navbar */
    .navbar {
        padding: 0.15rem 0 !important;
        min-height: 42px !important;
    }

    .nav-container {
        min-height: 42px !important;
        align-items: center !important;
    }

    .hamburger-menu {
        font-size: 1.1rem !important;
        right: 0.8rem !important;
        padding: 3px !important;
    }

    .logo {
        font-size: 0.65rem !important;
        left: 0.8rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .logo::before {
        width: 28px !important;
        height: 28px !important;
        margin-right: 0.4rem !important;
        vertical-align: middle !important;
    }

    .nav-links {
        top: 53px;
        padding: 1.5rem 0;
    }

    .nav-links a {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1.5rem 0.8rem;
        margin-top: 50px;
    }

    .page-title {
        font-size: clamp(1.3rem, 7vw, 1.8rem);
        margin-bottom: 0.8rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .content-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .content-section p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .content-section ul,
    .content-section ol {
        margin-left: 1.5rem;
    }

    .content-section li {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    /* Tables become horizontally scrollable */
    .content-section table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.8rem;
    }

    .content-section th,
    .content-section td {
        padding: 0.5rem;
        min-width: 100px;
    }

    .back-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Very Small Phones */
@media (max-width: 320px) {
    /* Ultra compact navbar */
    .navbar {
        padding: 0.1rem 0 !important;
        min-height: 38px !important;
    }

    .nav-container {
        min-height: 38px !important;
        align-items: center !important;
    }

    .hamburger-menu {
        font-size: 1rem !important;
        right: 0.5rem !important;
        padding: 3px !important;
    }

    .logo {
        font-size: 0.6rem !important;
        left: 0.5rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .logo::before {
        width: 25px !important;
        height: 25px !important;
        margin-right: 0.3rem !important;
        vertical-align: middle !important;
    }

    .nav-links {
        top: 43px;
        padding: 1rem 0;
    }

    .nav-links a {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1rem 0.5rem;
        margin-top: 45px;
    }

    .page-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .content-section {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .content-section p,
    .content-section li {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .content-section h1 { font-size: 1.2rem; }
    .content-section h2 { font-size: 1.1rem; }
    .content-section h3 { font-size: 1rem; }
    .content-section h4 { font-size: 0.95rem; }

    .back-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Common responsive utilities */
.resp-hide-mobile { display: block; }
.resp-hide-desktop { display: none; }

@media (max-width: 768px) {
    .resp-hide-mobile { display: none; }
    .resp-hide-desktop { display: block; }
}

/* Ensure hamburger menu is hidden on desktop and maintain main site navbar consistency */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none !important;
    }

    /* Force desktop navbar to match main site exactly */
    .navbar {
        padding: 0.25rem 0 !important;
    }

    .nav-container {
        min-height: auto !important;
    }

    /* Ensure logo positioning matches main site on desktop */
    .logo {
        top: auto !important;
        transform: none !important;
    }

    /* Ensure server status stays in correct position on desktop */
    .server-status-indicator {
        top: auto !important;
        margin-top: 0 !important;
    }

    /* Reset mobile navigation positioning for desktop */
    .nav-links {
        position: static !important;
        flex-direction: row !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        background: transparent !important;
        backdrop-filter: none !important;
        border-top: none !important;
    }

    .nav-links li {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}