body,
html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0a0f1c;
}

/* Main app container with top bar space */
#app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

#glcanvas {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    z-index: 10;
    pointer-events: none;
}

.right-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background-color: #0a0f1c;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 16px 20px;
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: "Material Symbols Outlined";
    font-size: 20px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variation-settings:
        "FILL" 0,
        "wght" 300,
        "GRAD" 0,
        "opsz" 20;
}

.icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.icon-btn.active {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-variation-settings:
        "FILL" 0,
        "wght" 300,
        "GRAD" 0,
        "opsz" 20;
}

.panel-content {
    flex: 1;
    padding: 20px;
}

.panel-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    width: 100%;
    padding: 10px 16px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s ease;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn:active {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(1px);
}

/* Combat step navigation */
.combat-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.combat-nav-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
}

.nav-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: "Material Symbols Outlined";
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variation-settings:
        "FILL" 0,
        "wght" 300,
        "GRAD" 0,
        "opsz" 20;
}

.nav-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

.nav-btn:disabled {
    color: rgba(255, 255, 255, 0.15);
    cursor: default;
}

/* Hex info panel */
.hex-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hex-info-ship {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ship-icon {
    width: 32px;
    height: 32px;
}

.ship-mine .ship-icon {
    filter: hue-rotate(330deg) saturate(2) brightness(1);
}

.ship-opponent .ship-icon {
    filter: hue-rotate(180deg) saturate(2) brightness(1.1);
    transform: rotate(180deg);
}

.ship-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.hex-info-stat {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.stat-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-family: monospace;
}

.hex-info-weapon {
    padding: 4px 4px 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.weapon-header {
    display: flex;
    justify-content: space-between;
}

.weapon-name {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    text-transform: capitalize;
}

.weapon-range {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: monospace;
}

.weapon-volley {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
}

.volley-stat {
    color: rgba(255, 255, 255, 0.45);
    font-size: 10px;
    font-family: monospace;
}

.roll-value {
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
}

.roll-hit {
    color: #22c55e;
}

.roll-miss {
    color: #ef4444;
}

.roll-nat20 {
    color: #f59e0b;
}

/* Login overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(10, 15, 28, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.login-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 280px;
}

.login-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    text-align: center;
    letter-spacing: 1px;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    border-radius: 2px;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-btn {
    margin-top: 4px;
}

.login-error {
    color: #ef4444;
    font-size: 12px;
    text-align: center;
}

.login-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.google-login-btn {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.google-login-btn:hover {
    background-color: #357ae8;
}

.dev-login-fallback {
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.dev-login-fallback summary {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    user-select: none;
}

.dev-login-fallback summary:hover {
    color: rgba(255, 255, 255, 0.7);
}

.dev-login-fallback form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Top bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #0a0f1c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    box-sizing: border-box;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.info-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.info-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s ease;
}

.info-links a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.info-separator {
    color: rgba(255, 255, 255, 0.2);
    user-select: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.persona-switcher {
    position: relative;
}

.persona-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.persona-trigger:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.persona-icon,
.persona-chevron {
    font-family: "Material Symbols Outlined";
    font-size: 16px;
    font-variation-settings:
        "FILL" 0,
        "wght" 300,
        "GRAD" 0,
        "opsz" 20;
}

.persona-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.persona-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background-color: #141a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 4px 0;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
}

.persona-item {
    display: block;
    width: 100%;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.persona-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.persona-item.active {
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(255, 255, 255, 0.04);
}

.persona-new {
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
    padding-top: 8px;
}

.persona-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.persona-logout {
    color: rgba(239, 68, 68, 0.8);
}

.persona-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.95);
}

.persona-create-form {
    padding: 4px 8px;
}

.persona-create-input {
    width: 100%;
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    border-radius: 2px;
    outline: none;
    box-sizing: border-box;
}

.persona-create-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.persona-create-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.persona-error {
    display: block;
    padding: 4px 12px;
    color: #ef4444;
    font-size: 11px;
}

/* Admin Panel */
.admin-panel-overlay {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
}

.admin-panel {
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 120px);
    background-color: #141a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-panel-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.admin-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.info-page-panel {
    width: 90%;
    max-width: 900px;
    max-height: calc(100vh - 120px);
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.info-page-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-page-header .icon-btn {
    color: rgba(0, 0, 0, 0.5);
}

.info-page-header .icon-btn:hover {
    color: rgba(0, 0, 0, 0.9);
    background-color: rgba(0, 0, 0, 0.05);
}

.info-page-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #ffffff;
}

.info-page-content h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 24px;
}

.info-page-content h2 {
    color: #34495e;
    margin-top: 30px;
    font-size: 20px;
}

.info-page-content h3 {
    color: #555;
    margin-top: 20px;
    font-size: 16px;
}

.info-page-content p {
    margin: 12px 0;
    color: #333;
    line-height: 1.6;
}

.info-page-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-page-content li {
    margin: 8px 0;
    color: #333;
}

.info-page-content a {
    color: #3498db;
    text-decoration: none;
}

.info-page-content a:hover {
    text-decoration: underline;
}

.info-page-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    color: #d63384;
}

.info-page-content .warning {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    color: #721c24;
}

.info-page-content .info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 20px 0;
    color: #0c5460;
}

.info-page-content .security-tip {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 20px 0;
    color: #0c5460;
}

.info-page-content strong {
    font-weight: 600;
    color: #000;
}

.info-page-content em {
    color: #666;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1f35 0%, #0f1425 100%);
    border-top: 2px solid #3498db;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-notice-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-notice-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.cookie-notice-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-notice-link:hover {
    color: #5dade2;
    text-decoration: underline;
}

.cookie-notice-link strong {
    font-weight: 700;
    color: #3498db;
}

.cookie-notice-link:hover strong {
    color: #5dade2;
}

.cookie-notice-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-notice-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.admin-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.admin-tab.active {
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section h3 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    border-radius: 3px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    padding: 6px 12px;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.key-created {
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 3px;
}

.key-created strong {
    display: block;
    margin-bottom: 8px;
    color: #22c55e;
    font-size: 13px;
}

.created-key-display {
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    word-break: break-all;
    margin-bottom: 8px;
}

.error-msg {
    margin-top: 12px;
    padding: 8px 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 3px;
    color: #ef4444;
    font-size: 12px;
}

.keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-item {
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.key-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.key-code {
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.key-status {
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-used {
    background-color: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.status-expired {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.key-memo {
    margin-bottom: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.key-perms {
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.key-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Lobby Overlay */
.lobby-overlay {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 15, 28, 0.95);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.lobby-panel {
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 100px);
    background-color: #141a2e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 24px;
    overflow-y: auto;
}

.lobby-loading {
    text-align: center;
    padding: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.lobby-no-permission {
    text-align: center;
    padding: 20px;
}

.lobby-no-permission h2 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.lobby-no-permission p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

.lobby-in-game {
    text-align: center;
}

.lobby-in-game h2 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.lobby-in-game p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.lobby-waiting {
    color: rgba(255, 193, 7, 0.9) !important;
    font-weight: 500;
}

.lobby-ready {
    color: rgba(34, 197, 94, 0.9) !important;
    font-weight: 500;
}

.lobby-list h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.lobby-list h3 {
    margin: 20px 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.lobby-create-btn {
    width: 100%;
    padding: 12px 24px;
    background-color: #3b82f6;
    border: 1px solid #3b82f6;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 16px;
}

.lobby-create-btn:hover:not(:disabled) {
    background-color: #2563eb;
}

.lobby-create-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lobby-games {
    margin-top: 16px;
}

.lobby-refresh-btn {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    float: right;
}

.lobby-refresh-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.12);
}

.lobby-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lobby-no-games {
    margin: 16px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-style: italic;
}

.lobby-game-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lobby-game-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.15s ease;
}

.lobby-game-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.lobby-game-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lobby-game-id {
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.lobby-game-players {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.lobby-join-btn {
    padding: 8px 20px;
    background-color: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    font-size: 13px;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lobby-join-btn:hover:not(:disabled) {
    background-color: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.6);
}

.lobby-join-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lobby-error {
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: #ef4444;
    font-size: 13px;
    text-align: center;
}

.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.lobby-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.lobby-toggle-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-family: "Material Symbols Outlined";
    font-size: 20px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variation-settings:
        "FILL" 0,
        "wght" 300,
        "GRAD" 0,
        "opsz" 20;
}

.lobby-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.lobby-create {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.lobby-memo-input {
    flex: 1;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.15s ease;
}

.lobby-memo-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.lobby-memo-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.lobby-create-btn-inline {
    padding: 8px 20px;
    background-color: #3b82f6;
    border: 1px solid #3b82f6;
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.lobby-create-btn-inline:hover:not(:disabled) {
    background-color: #2563eb;
}

.lobby-create-btn-inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lobby-refresh-btn-inline {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.lobby-refresh-btn-inline:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.12);
}

.lobby-refresh-btn-inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lobby-game-memo {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* Permissions Management */
.personalities-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.personality-item {
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.personality-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.personality-header strong {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.personality-id {
    font-family: monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
}

.permission-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.success-msg {
    margin-top: 12px;
    padding: 8px 12px;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 3px;
    color: #22c55e;
    font-size: 12px;
}
