:root {
    --line-green: #06C755;
    --line-green-dark: #05b34c;
    --bg-color: #ffffff;
    --chat-bg-color: #8CABD9;
    /* Classic LINE chat bg */
    --text-primary: #111111;
    --text-secondary: #888888;
    --border-color: #f0f0f0;
    --bubble-sent: #92EF6B;
    /* Typical green bubble */
    --bubble-received: #FFFFFF;
    --nav-height: 60px;
    --header-height: 60px;
    --max-width: 480px;
    /* Mobile width constraint */

    --font-main: 'Noto Sans JP', 'Inter', sans-serif;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: #f5f5f5;
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

#app {
    width: 100%;
    max-width: var(--max-width);
    height: 100%;
    background-color: var(--bg-color);
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Views */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    z-index: 10;
}

.view.active {
    display: flex;
    /* Show when active */
}

/* Specific Views */
#chat-room-view {
    /* Chat room needs special handling for animation */
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: var(--chat-bg-color);
    z-index: 100 !important;
    /* Always on top of everything including nav */
}

#chat-room-view.active {
    transform: translateX(0);
}

/* Shared Bottom Nav - LINE Style */
.bottom-nav {
    height: var(--nav-height);
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Adjust list views to not be hidden behind nav */
.content-scroll,
.chat-list {
    padding-bottom: var(--nav-height);
}

/* Headers - LINE Style */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.chat-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.chat-header h2 {
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    margin-left: 12px;
    color: #1a1a1a;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-icons i {
    font-size: 22px;
    padding: 8px;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.header-icons i:hover {
    background-color: #f5f5f5;
    color: var(--line-green);
}

/* Chat List */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: var(--nav-height);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: var(--nav-height);
}

/* Home View Specifics - LINE Style */
.my-profile {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background-color: #e0e0e0;
    margin-right: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
}

.profile-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.profile-name {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.profile-status {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.list-section-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 16px 20px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    background: #fff;
    transition: background-color 0.2s;
}

.friend-item:active {
    background-color: #f5f5f5;
}

.friend-item .avatar {
    width: 44px;
    height: 44px;
    margin-right: 12px;
}

.friend-item .profile-name {
    font-size: 15px;
    font-weight: 600;
}

.friend-item .profile-status {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    color: #999;
}

/* Chat List Items - LINE Style */
.chat-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f5f5f5;
}

.chat-item:hover {
    background-color: #fafafa;
}

.chat-item:active {
    background-color: #f0f0f0;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background-color: #e0e0e0;
    margin-right: 14px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.chat-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.chat-time {
    font-size: 12px;
    color: #BDBDBD;
}

.chat-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.unread-badge {
    background-color: var(--line-green);
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: bold;
}

/* Bottom Nav styles are defined at line 83-96 */

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #BDBDBD;
    font-size: 10px;
    position: relative;
    gap: 4px;
    padding: 8px 12px;
    transition: color 0.2s ease;
}

.nav-item i {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.nav-item.active {
    color: var(--line-green);
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item .badge {
    position: absolute;
    top: -4px;
    right: -2px;
    background-color: red;
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 10px;
    border: 2px solid #fff;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 320px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.btn-submit {
    background: var(--line-green);
    color: white;
}

/* Schedule List */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #BDBDBD;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-state::before {
    content: "📭";
    font-size: 48px;
    display: block;
}

.empty-state-text {
    font-size: 15px;
    line-height: 1.5;
}

.schedule-item {
    background: #fff;
    padding: 16px;
    margin: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--line-green);
}

.schedule-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

.schedule-row {
    display: flex;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    align-items: center;
}

.schedule-row i {
    width: 20px;
    color: var(--text-secondary);
}

/* Event Message Bubble */
.bubble.event-bubble {
    padding: 0;
    overflow: hidden;
    width: 200px;
    background: #fff;
}

.event-header {
    background: #f8f8f8;
    padding: 10px 12px;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.event-body {
    padding: 12px;
}

.event-row {
    font-size: 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.event-row i {
    width: 18px;
    color: #999;
}

.event-action {
    padding: 10px;
    border-top: 1px solid #eee;
    text-align: center;
}

.join-btn {
    width: 100%;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line-green);
    color: var(--line-green);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.join-btn.joined {
    background: var(--line-green);
    color: white;
    border-color: var(--line-green);
}

/* Settings */
.settings-section {
    background: #fff;
    margin-top: 12px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.settings-label {
    display: flex;
    flex-direction: column;
}

.settings-name {
    font-size: 16px;
    margin-bottom: 4px;
}

.settings-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* User ID Section */
.user-id-section {
    background: linear-gradient(135deg, #f8fff9 0%, #e8fae9 100%);
    border-left: 4px solid var(--line-green);
}

.user-id-section .settings-item {
    padding: 20px 16px;
}

.user-id-section .settings-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.user-id-value {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--line-green) !important;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--line-green);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Search Modal */
.search-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.search-input-wrapper button {
    padding: 0 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.search-result {
    min-height: 50px;
}

.result-card {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.result-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background-size: cover;
    background-position: center;
}

.result-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

/* Profile Edit Icon */
.profile-edit-icon {
    color: #ccc;
    font-size: 16px;
    margin-left: auto;
    padding-left: 12px;
}

.my-profile:hover .profile-edit-icon {
    color: var(--line-green);
}

/* Profile Edit Modal */
.profile-edit-content {
    max-width: 360px;
}

.profile-avatar-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
    position: relative;
    cursor: pointer;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.avatar-preview:hover {
    transform: scale(1.05);
}

.avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    border-radius: 0 0 50px 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    color: white;
    font-size: 14px;
}

.btn-avatar-change {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-avatar-change:hover {
    background: #e8fae9;
    border-color: var(--line-green);
    color: var(--line-green);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

#profile-edit-form textarea {
    resize: none;
    font-family: inherit;
}


/* Login View - LINE Style */
.login-container {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #06C755 0%, #04A847 50%, #039B40 100%);
    text-align: center;
}

.brand {
    margin-bottom: 40px;
}

.brand i {
    font-size: 64px;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Auth Steps */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

.auth-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* OTP Input Group */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-input-group input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    margin: 0;
}

.otp-input-group input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.otp-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.otp-actions .text-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

#sent-email-display,
#login-email-display,
#register-email-display {
    font-weight: bold;
    color: #fff;
}

/* Auth Mode Toggle */
.auth-mode {
    display: none;
}

.auth-mode.active {
    display: block;
}

.auth-toggle {
    margin-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.auth-toggle span {
    margin-right: 8px;
}

.login-container h2 {
    margin-bottom: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.login-container input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.login-container input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.login-container input::placeholder {
    color: #999;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: #fff;
    color: var(--line-green);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.social-login {
    margin-top: 24px;
}

.social-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    position: relative;
}

.social-text::before,
.social-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.social-text::before {
    left: 0;
}

.social-text::after {
    right: 0;
}

.social-btns {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.google {
    color: #db4437;
}

.social-btn.twitter {
    color: #1da1f2;
}

.auth-toggle {
    margin-top: 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.text-link {
    background: none;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mock-login-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mock-login-actions p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.btn-outline {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Admin View */
.admin-header {
    background: #333;
    color: white;
}

.admin-header h1 {
    color: white;
}

.btn-text {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.admin-content {
    padding: 16px;
    background: #1a1a2e;
    min-height: calc(100vh - 120px);
}

.admin-card {
    background: #16213e;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
}

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

.admin-card-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card-header h3 i {
    color: #e94560;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    background: #0f0f23;
    padding: 8px;
    gap: 8px;
}

.admin-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-tab:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.admin-tab.active {
    background: #e94560;
    color: white;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Admin Stats */
.admin-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(233, 69, 96, 0.1);
    padding: 16px 24px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #e94560;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Admin Buttons */
.btn-refresh {
    background: #e94560;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: #d63754;
    transform: translateY(-1px);
}

.btn-refresh i {
    transition: transform 0.3s ease;
}

.btn-refresh:hover i {
    transform: rotate(180deg);
}

/* User List */
.admin-user-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.admin-user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 69, 96, 0.3);
}

.admin-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.admin-user-id {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

.admin-user-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

.status-active {
    background: rgba(6, 199, 85, 0.2);
    color: #06c755;
}

.status-frozen {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.admin-user-role {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(100, 100, 255, 0.2);
    color: #8888ff;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
}

.btn-admin-action {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-freeze {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.btn-freeze:hover {
    background: rgba(255, 193, 7, 0.3);
}

.btn-unfreeze {
    background: rgba(6, 199, 85, 0.2);
    color: #06c755;
}

.btn-unfreeze:hover {
    background: rgba(6, 199, 85, 0.3);
}

.btn-delete {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.btn-delete:hover {
    background: rgba(233, 69, 96, 0.3);
}

.btn-view {
    background: rgba(100, 100, 255, 0.2);
    color: #8888ff;
}

.btn-view:hover {
    background: rgba(100, 100, 255, 0.3);
}

/* Chat List Admin */
.admin-chat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.admin-chat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 69, 96, 0.3);
}

.admin-chat-info {
    flex: 1;
}

.admin-chat-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.admin-chat-members {
    font-size: 12px;
    color: #888;
}

.admin-chat-meta {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* Message Monitor */
.admin-search-bar {
    margin-bottom: 16px;
}

.admin-search-bar select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.admin-search-bar select option {
    background: #16213e;
    color: #fff;
}

.admin-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.admin-message-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #e94560;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.admin-message-sender {
    font-weight: 600;
    color: #e94560;
    font-size: 13px;
}

.admin-message-time {
    font-size: 11px;
    color: #666;
}

.admin-message-content {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.admin-hint {
    color: #666;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    text-align: left;
    font-size: 14px;
    color: #ccc;
}

.admin-table th {
    font-weight: bold;
    color: #888;
}

/* Chat Room Messages */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-cluster {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message-row.sent {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
}

/* Social Login */
.social-login {
    margin-top: 20px;
    text-align: center;
}

.social-text {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    position: relative;
}

.social-text::before,
.social-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #ddd;
}

.social-text::before {
    left: 0;
}

.social-text::after {
    right: 0;
}

.social-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.social-btn.google {
    color: #db4437;
}

.social-btn.twitter {
    color: #1da1f2;
}

/* OTP Group Animation */
#otp-group {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    max-width: 70%;
    position: relative;
}

.bubble {
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.received .bubble {
    background-color: var(--bubble-received);
    border-top-left-radius: 4px;
}

.sent .bubble {
    background-color: var(--bubble-sent);
    border-top-right-radius: 4px;
}

.message-meta {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 2px;
}

.sent .message-meta {
    text-align: right;
    margin-right: 4px;
}

.received .message-meta {
    margin-left: 4px;
}

/* Input Area */
.input-area {
    background-color: #f8f8f8;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    /* Safety for iPhone X+ home bar */
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.input-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #ddd;
}

#message-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 4px 0;
}

.icon-btn {
    border: none;
    background: none;
    font-size: 20px;
    color: var(--line-green);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn.smile-btn {
    color: #999;
}

.send-btn {
    background-color: var(--line-green);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.1s;
}

.send-btn:active {
    transform: scale(0.9);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.bubble {
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}