/* Design Theme - Based on sample-player-auth-ui.html */
:root {
    --bg: #0b0f14;
    --card: #121926;
    --muted: #93a4b8;
    --text: #e7eef8;
    --line: #233149;
    --ok: #46d39a;
    --warn: #ffd166;
    --bad: #ff5c77;
    --focus: #6ea8ff;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 28px;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: radial-gradient(1200px 600px at 20% 0%, #13243b 0%, var(--bg) 55%) fixed;
    color: var(--text);
    min-height: 100vh;
}

.wrap {
    max-width: 980px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd166, #6ea8ff);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}

h1 {
    font-size: 20px;
    margin: 0;
}

.sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

/* Navigation */
nav {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(18, 25, 38, .86);
    border: 1px solid rgba(35, 49, 73, .9);
    border-radius: var(--radius);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(35, 49, 73, .8);
    background: rgba(0, 0, 0, .14);
    font-size: 13px;
    transition: .15s transform, .15s background, .15s color;
}

nav a:hover {
    transform: translateY(-1px);
    background: rgba(110, 168, 255, .14);
    border-color: rgba(110, 168, 255, .45);
}

nav a.active {
    color: var(--text);
    background: rgba(110, 168, 255, .14);
    border-color: rgba(110, 168, 255, .45);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card {
    background: rgba(18, 25, 38, .86);
    border: 1px solid rgba(35, 49, 73, .9);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.card-h {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(35, 49, 73, .8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.pill {
    font-size: 12px;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(35, 49, 73, .8);
    background: rgba(0, 0, 0, .18);
    white-space: nowrap;
}

.card-b {
    padding: 18px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
}

.tab {
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(35, 49, 73, .8);
    background: rgba(0, 0, 0, .14);
    transition: .15s transform, .15s background, .15s color;
}

.tab:hover {
    transform: translateY(-1px);
}

.tab.active {
    color: var(--text);
    background: rgba(110, 168, 255, .14);
    border-color: rgba(110, 168, 255, .45);
}

/* Forms */
form {
    display: block;
}

/* For tabbed forms (if needed) */
form.hidden {
    display: none;
}

form.active {
    display: block;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 700px) {
    .row {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 6px;
}

input,
select,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, .18);
    color: var(--text);
    border: 1px solid rgba(35, 49, 73, .9);
    border-radius: 12px;
    padding: 11px 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    font-size: 14px;
}

/* Select dropdown styling */
select {
    background-color: rgba(0, 0, 0, .18) !important;
    color: var(--text) !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2393a4b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select::-ms-expand {
    display: none;
}

select option {
    background-color: var(--card) !important;
    color: var(--text) !important;
    padding: 10px;
}

select option:hover,
select option:focus {
    background-color: rgba(110, 168, 255, .2) !important;
}

select option:checked {
    background-color: rgba(110, 168, 255, .3) !important;
    color: var(--text) !important;
}

textarea {
    min-height: 82px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(110, 168, 255, .65);
    box-shadow: 0 0 0 3px rgba(110, 168, 255, .18);
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.35;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

button {
    cursor: pointer;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(35, 49, 73, .9);
    background: linear-gradient(180deg, rgba(42, 61, 95, .9), rgba(29, 42, 64, .9));
    color: var(--text);
    font-weight: 600;
    transition: .15s transform, .15s filter;
    font-family: inherit;
    font-size: 14px;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.secondary {
    background: rgba(0, 0, 0, .16);
    font-weight: 600;
}

button.danger {
    background: rgba(255, 92, 119, .12);
    border-color: rgba(255, 92, 119, .35);
}

/* Messages */
.msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .16);
    font-size: 13px;
    display: none;
}

.msg.show {
    display: block;
}

.msg.ok {
    border-color: rgba(70, 211, 154, .45);
    background: rgba(70, 211, 154, .10);
}

.msg.bad {
    border-color: rgba(255, 92, 119, .45);
    background: rgba(255, 92, 119, .10);
}

.msg.warn {
    border-color: rgba(255, 209, 102, .45);
    background: rgba(255, 209, 102, .10);
}

/* Password Meter */
.pw-meter {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(35, 49, 73, .9);
    flex: 1;
    overflow: hidden;
}

.bar>div {
    height: 100%;
    width: 0%;
    transition: width .3s, background-color .3s;
}

.pw-label {
    font-size: 12px;
    color: var(--muted);
    min-width: 110px;
    text-align: right;
}

/* Profile Picture */
.profile-pic-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}

.profile-pic-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(35, 49, 73, .9);
    object-fit: cover;
    background: rgba(0, 0, 0, .18);
}

.profile-pic-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-input-label {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .16);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition: .15s transform, .15s background;
}

.file-input-label:hover {
    transform: translateY(-1px);
    background: rgba(110, 168, 255, .14);
    border-color: rgba(110, 168, 255, .45);
}

/* Checkbox */
.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
}

.check input {
    width: auto;
    margin-top: 3px;
}

/* Links */
.muted-link {
    color: #9cc3ff;
    text-decoration: none;
}

.muted-link:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(110, 168, 255, .3);
    border-top-color: var(--focus);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Profile Display */
.profile-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 700px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

.profile-item {
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .16);
    display: flex;
    flex-direction: column;
    min-height: 70px;
    justify-content: center;
}

.profile-item-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.profile-item-value {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
}

.profile-pic-container {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(35, 49, 73, .6);
}

.profile-pic-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(35, 49, 73, .9);
    object-fit: cover;
    background: rgba(0, 0, 0, .18);
    display: block;
    margin: 0 auto;
}

.profile-pic-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    margin: 0 auto;
}

/* Wallet Display */
.wallet-info {
    display: grid;
    gap: 12px;
}

.wallet-item {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(35, 49, 73, .9);
    background: rgba(0, 0, 0, .16);
    text-align: center;
}

.wallet-item-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.wallet-item-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ok);
}

/* Code */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    color: #d9e6ff;
    background: rgba(0, 0, 0, .25);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(35, 49, 73, .9);
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.split {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 14px;
    }

    .card-b {
        padding: 14px;
    }
}
