:root {
    --bg-dark: #121417;
    --bg-card: #1c2026;
    --bg-input: #262b33;
    --primary: #2ecc71;
    --primary-hover: #27ae60;
    --accent: #9b59b6;
    --danger: #e74c3c;
    --text: #ecf0f1;
    --text-muted: #95a5a6;
    --border: #2f3640;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background: var(--bg-dark); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background: var(--bg-card); border-bottom: 2px solid var(--border);
}
.logo { font-size: 1.4rem; font-weight: bold; color: var(--primary); }
.nav-links a { color: var(--text); margin-left: 18px; font-weight: 500; }
.btn-admin { background: var(--bg-input); padding: 7px 14px; border-radius: 6px; border: 1px solid var(--border); }

.hero {
    text-align: center; padding: 60px 20px;
    background: linear-gradient(135deg, #16222A 0%, #1c2833 100%);
    border-bottom: 3px solid var(--primary);
}
.hero h1 { font-size: 2.3rem; margin-bottom: 10px; }
.hero p { color: var(--text-muted); margin-bottom: 20px; }

.ip-box {
    display: inline-block; background: var(--bg-card); border: 2px dashed var(--primary);
    padding: 12px 28px; border-radius: 8px; font-size: 1.25rem; font-weight: bold;
    cursor: pointer; user-select: none; transition: 0.2s;
}
.ip-box:hover { transform: scale(1.03); background: #222830; }
.ip-box small { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: normal; }

.container { max-width: 1100px; margin: 30px auto; padding: 0 20px; }
.section { margin-bottom: 45px; }
.section h2 { margin-bottom: 18px; border-left: 4px solid var(--primary); padding-left: 12px; }

.card { background: var(--bg-card); padding: 24px; border-radius: 10px; border: 1px solid var(--border); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.news-meta { font-size: 0.85rem; color: var(--primary); margin-bottom: 6px; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }

input[type="text"], input[type="password"], input[type="url"], select, textarea {
    width: 100%; padding: 10px 12px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }

.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.tab-btn {
    background: var(--bg-input); color: var(--text); border: 1px solid var(--border);
    padding: 9px 18px; border-radius: 6px; cursor: pointer; font-weight: bold; display: inline-block;
}
.tab-btn.active { background: var(--primary); color: #000; border-color: var(--primary); }

.btn-primary {
    background: var(--primary); color: #000; border: none; padding: 11px 22px;
    border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1rem;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; padding: 6px 12px; border-radius: 5px; }
.btn-small { font-size: 0.8rem; padding: 5px 10px; border-radius: 4px; background: var(--bg-input); color: var(--text); border: 1px solid var(--border); margin-left: 5px; }
.btn-small.btn-danger { background: var(--danger); border: none; }

.alert { padding: 14px; border-radius: 6px; margin-bottom: 20px; font-weight: bold; }
.alert.success { background: rgba(46, 204, 113, 0.18); border: 1px solid var(--primary); color: var(--primary); }
.alert.error { background: rgba(231, 76, 60, 0.18); border: 1px solid var(--danger); color: var(--danger); }

/* Tickets & Live-Chat */
.ticket-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.ticket-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.ticket-answers { background: var(--bg-input); padding: 12px; border-radius: 6px; margin-bottom: 15px; }
.ticket-answers p { margin-bottom: 6px; }

.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; margin-right: 8px; }
.badge.support { background: #3498db; color: #fff; }
.badge.apply { background: var(--accent); color: #fff; }
.status-pill { background: var(--bg-input); padding: 4px 10px; border-radius: 12px; font-size: 0.85rem; border: 1px solid var(--border); }

.chat-box { background: #16191e; border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.chat-messages { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chat-msg { padding: 9px 13px; border-radius: 8px; max-width: 80%; font-size: 0.95rem; }
.chat-msg.user { background: #262b33; align-self: flex-start; border-left: 3px solid #3498db; }
.chat-msg.staff { background: rgba(46, 204, 113, 0.15); align-self: flex-end; border-right: 3px solid var(--primary); }
.chat-msg.system { background: rgba(155, 89, 182, 0.15); align-self: center; font-size: 0.85rem; text-align: center; }
.chat-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.chat-form { display: flex; gap: 10px; }
.chat-form input { flex: 1; }

/* Party Onboarding Overlay */
.party-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9999;
    display: flex; justify-content: center; align-items: center; padding: 20px;
}
.party-card {
    background: var(--bg-card); border: 2px solid var(--primary); border-radius: 14px;
    padding: 30px; max-width: 450px; width: 100%; text-align: center;
    box-shadow: 0 0 35px rgba(46, 204, 113, 0.4);
}
.party-emoji { font-size: 4rem; margin-bottom: 10px; animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* Admin Grids */
.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-box { width: 100%; max-width: 400px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 20px; }
.admin-list { list-style: none; margin-top: 10px; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: var(--bg-input); margin-bottom: 8px; border-radius: 6px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--bg-input); padding: 12px; border-radius: 6px; }
.perm-grid label { font-weight: normal; font-size: 0.9rem; cursor: pointer; }
.muted { color: var(--text-muted); }
