/* ============================================
   ModernUO Web Portal - Retro UO Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* === CSS Variables === */
:root {
    --bg-darkest: #0C0A08;
    --bg-dark: #1A1510;
    --bg-medium: #2A2218;
    --bg-light: #3A3020;
    --bg-parchment: #D4C4A0;
    --bg-parchment-dark: #B8A880;

    --gold-primary: #C8A848;
    --gold-light: #E8D068;
    --gold-dark: #A08030;
    --gold-dim: #806828;

    --text-light: #E8DCC8;
    --text-parchment: #3A3020;
    --text-gold: #C8A848;
    --text-dim: #8A7A60;
    --text-error: #D44848;
    --text-success: #48A848;

    --border-gold: #C8A848;
    --border-dark: #1A1510;
    --border-inset: #0A0806;

    --shadow-dark: rgba(0, 0, 0, 0.8);
    --shadow-gold: rgba(200, 168, 72, 0.3);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Crimson Text', serif;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-darkest);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(200, 168, 72, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(200, 168, 72, 0.02) 0%, transparent 50%);
}

/* === UO Ornate Frame === */
.uo-frame {
    border: 2px solid var(--gold-primary);
    background: var(--bg-dark);
    position: relative;
    box-shadow:
        inset 0 0 0 1px var(--bg-darkest),
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 0 10px var(--shadow-gold);
}

.uo-frame::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid var(--gold-dim);
    pointer-events: none;
}

.uo-frame-inner {
    border: 1px solid var(--gold-dim);
    background: var(--bg-medium);
    padding: 1.5rem;
}

/* === Frame Background Images === */
.uo-frame-bg-main {
    background-image: url('/img/main-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.uo-frame-bg-main > .uo-frame-inner {
    background: transparent;
    border-color: transparent;
    padding: 3.00rem;
}

.uo-frame-bg-main .connection-box {
    padding: 1.95rem;
}

.uo-frame-bg-main .connection-address {
    position: relative;
}

.uo-frame-bg-main .connection-address .addr-label {
    position: absolute;
    top: 0.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.uo-frame-bg-main .connection-address .addr-port {
    position: absolute;
    bottom: 0.15rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* === Header === */
.site-header {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
    border-bottom: 2px solid var(--gold-primary);
    padding: 1rem 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 29px;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-shadow: 0 0 10px var(--shadow-gold);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.site-title:hover {
    color: var(--gold-light);
}

.header-content .status-badge {
    align-self: center;
    line-height: 1;
}

.header-left {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.header-badge-link {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.header-badge-link:hover {
    opacity: 1;
    filter: brightness(1.3);
}

.header-badge-link img {
    width: 200px;
    height: 30px;
}

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

/* === Navigation Links === */
.nav-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    color: var(--gold-primary);
    border-color: var(--gold-dim);
    text-shadow: 0 0 5px var(--shadow-gold);
}

.nav-link.active {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

/* === Buttons === */
.uo-btn {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 50%, var(--bg-dark) 100%);
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.15s ease;
    position: relative;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.uo-btn::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid var(--gold-dim);
    pointer-events: none;
}

.uo-btn:hover {
    background: linear-gradient(180deg, var(--gold-dark) 0%, var(--gold-dim) 50%, var(--bg-light) 100%);
    color: var(--gold-light);
    text-shadow: 0 0 8px var(--shadow-gold);
    box-shadow: 0 0 15px var(--shadow-gold);
}

.uo-btn:active {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.uo-btn-primary {
    background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-dark) 50%, var(--gold-dim) 100%);
    color: var(--bg-darkest);
    border-color: var(--gold-light);
}

.uo-btn-primary::before {
    border-color: var(--gold-light);
}

.uo-btn-primary:hover {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    color: var(--bg-darkest);
}

.uo-btn-danger {
    border-color: var(--text-error);
}

.uo-btn-danger:hover {
    background: linear-gradient(180deg, #6A2020 0%, #4A1515 50%, var(--bg-dark) 100%);
    border-color: var(--text-error);
    color: var(--text-error);
}

.uo-btn-sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
}

/* === Form Inputs === */
.uo-input-group {
    margin-bottom: 1.2rem;
}

.uo-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--gold-primary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.uo-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-light);
    background: var(--bg-darkest);
    border: 2px solid var(--gold-dim);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uo-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--shadow-gold), inset 0 0 5px rgba(200, 168, 72, 0.1);
}

.uo-input::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

.uo-input-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

/* === Main Content === */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

/* === Hero Section === */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold-primary);
    text-shadow: 0 0 20px var(--shadow-gold), 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* === Server Status Badge === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
    text-decoration: none;
}

.status-online {
    color: var(--text-success);
    border-color: var(--gold-light);
    background: transparent;
}

.status-offline {
    color: var(--text-error);
    border-color: var(--text-error);
    background: rgba(212, 72, 72, 0.1);
}

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

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

/* === How to Connect Section === */
.connect-section {
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    margin: 0.5rem auto 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.step-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold-primary);
    text-shadow: 0 0 10px var(--shadow-gold);
    margin-bottom: 0.5rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* === Connection Info Box === */
.connection-box {
    text-align: center;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.connection-address {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: var(--gold-light);
    background: var(--bg-darkest);
    padding: 0.8rem 2rem;
    border: 1px solid var(--gold-dim);
    display: inline-block;
    letter-spacing: 0.1em;
    user-select: all;
}

/* === Auth Pages === */
.auth-container {
    max-width: 420px;
    margin: 2rem auto;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--gold-primary);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* === Dashboard === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card {
    padding: 1.2rem;
}

.info-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.info-value {
    font-size: 1.1rem;
    color: var(--text-light);
}

.info-value.banned {
    color: var(--text-error);
}

.info-value.active {
    color: var(--text-success);
}

/* === Alert Messages === */
.uo-alert {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid;
    font-size: 0.9rem;
}

.uo-alert-error {
    color: var(--text-error);
    border-color: var(--text-error);
    background: rgba(212, 72, 72, 0.1);
}

.uo-alert-success {
    color: var(--text-success);
    border-color: var(--text-success);
    background: rgba(72, 168, 72, 0.1);
}

.uo-alert-info {
    color: var(--gold-primary);
    border-color: var(--gold-dim);
    background: rgba(200, 168, 72, 0.05);
}

.hidden {
    display: none !important;
}

/* === Divider === */
.uo-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    margin: 1.5rem 0;
}

/* === Loading Spinner === */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-dim);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === Footer === */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--bg-medium);
    margin-top: 3rem;
}

.site-footer a {
    color: var(--gold-dim);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold-primary);
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

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

    .header-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        padding: 0;
    }

    .main-content {
        padding: 1rem;
    }

    .connection-address {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .uo-frame-bg-main .connection-address .addr-label {
        position: static;
        transform: none;
    }

    .uo-frame-bg-main .connection-address .addr-port {
        position: static;
        transform: none;
    }
}

/* === Password Strength Indicator === */
.password-strength {
    height: 4px;
    background: var(--bg-darkest);
    margin-top: 0.3rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

.strength-weak { background: var(--text-error); width: 33%; }
.strength-medium { background: var(--gold-primary); width: 66%; }
.strength-strong { background: var(--text-success); width: 100%; }

/* === Tooltip === */
.uo-tooltip {
    position: relative;
    cursor: help;
}

.uo-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darkest);
    color: var(--text-light);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--gold-dim);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.uo-tooltip:hover::after {
    opacity: 1;
}

