:root {
    --sidebar-bg: rgba(26, 17, 29, 0.75);
    --sidebar-width: 300px;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --accent: #7c6caf;
    --accent-hover: #9080c8;
    --danger: #e74c3c;
    --success: #81FF2D;
    --glass-bg: rgba(152, 152, 152, 0.15);
    --glass-border: #646464;
    --glass-shadow: 0 4px 4px rgba(0, 0, 0, 0.10);
    --glass-bg-strong: rgba(152, 152, 152, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-handle: 'Inria Sans', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    background: #1a1020;
}

/* ========== Layout ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    z-index: 10;
    padding: 1.5rem 1rem 1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.sidebar-brand {
    margin-bottom: 1.5rem;
    text-align: center;
}

.brand-logo {
    width: 190px;
}

/* New Connection Button */
.btn-new-connection {
    display: block;
    width: 100%;
    padding: 1rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1.25rem;
}
.btn-new-connection:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Connections Section */
.connections-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.connections-heading {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    margin-bottom: 0.6rem;
    padding: 0 0.25rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    margin-bottom: 0.75rem;
}
.search-box input::placeholder {
    color: var(--text-muted);
}
.search-box input:focus {
    border-color: var(--accent);
}

/* Connection Cards in Sidebar */
.connections-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.connection-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    cursor: pointer;
}
.connection-card:last-child {
    border-bottom: none;
}
.connection-card:hover {
    background: var(--glass-bg);
}

.connection-card-body {
    flex: 1;
    min-width: 0;
}

.connection-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 10px;
}

.connection-card-right {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.connection-preview {
    color: var(--text-muted);
    font-size: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.15rem;
    line-height: 1.4;
}

.online-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A24343;
    display: inline-block;
    flex-shrink: 0;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A24343;
    display: inline-block;
    margin-left: auto;
    flex-shrink: 0;
}

.empty-state-small {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 1rem 0.25rem;
    text-align: center;
}

/* Sidebar Bottom / Profile */
.sidebar-bottom {
    padding-top: 0.75rem;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: background 0.2s;
}
.profile-button:hover {
    background: var(--glass-bg-strong);
}

.profile-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.profile-avatar .avatar-medium {
    width: 70px;
    height: 70px;
}

.tier-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.50);
    background: var(--glass-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
    width: fit-content;
}

.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
}

.profile-info .handle {
    font-family: var(--font-handle);
    color: rgba(255, 255, 255, 1);
    font-size: 0.85rem;
}

.credits-display {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    margin-top: auto;
    position: relative;
    top: 2px;
}

.credits-number {
    font-size: 48px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.50);
    line-height: 1;
}

.credits-label {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.50);
    line-height: 1.4;
    position: relative;
    top: -2px;
}

/* Profile Menu (logout) */
.profile-menu {
    display: none;
    padding: 0.5rem 0;
}
.profile-menu.is-open {
    display: block;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow);
    color: var(--text-secondary);
    text-align: center;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}
.btn-logout:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    color: var(--danger);
}

.sidebar-footer {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    padding-top: 0.75rem;
}

/* Auth nav for logged-out state */
.sidebar-nav-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-nav-auth .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}
.sidebar-nav-auth .nav-link:hover {
    color: var(--text-primary);
}

/* ========== Main Content ========== */
#sky-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#sky-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ========== Avatars ========== */
.avatar-small {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    flex-shrink: 0;
}
.avatar-medium {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

/* ========== Handle ========== */
.handle {
    font-family: var(--font-handle);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    color: var(--text-primary);
}
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
}
.btn-outline:hover { border-color: var(--text-secondary); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

/* ========== Forms ========== */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}
.form-group input,
textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
}
.form-group input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.field-error, .error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ========== Home ========== */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 700px;
    position: relative;
}

.home-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    -webkit-transition: margin-bottom 0.4s ease;
    transition: margin-bottom 0.4s ease;
}

.match-form {
    width: 100%;
    transition: all 0.4s ease;
}

/* Searching state transitions */
.match-form {
    position: absolute;
    width: 100%;
    -webkit-transition: opacity 0.4s ease;
    transition: opacity 0.4s ease;
    opacity: 1;
}

.match-form.fade-out {
    opacity: 0;
    pointer-events: none;
}

.home-spacer {
    height: 197px;
    -webkit-transition: height 0.4s ease;
    transition: height 0.4s ease;
    position: relative;
    width: 100%;
}

.searching-state .home-spacer {
    height: 0;
}

.searching-state .home-title {
    margin-bottom: 0.75rem;
    max-width: 700px;
    white-space: nowrap;
}

.match-input-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 19px;
    box-shadow: var(--glass-shadow);
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
}

.match-input-box textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    resize: none;
    outline: none;
    height: 94px;
}
.match-input-box textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
}

.btn-connect {
    display: block;
    margin-left: auto;
    margin-top: 0.75rem;
    padding: 0.6rem 1.75rem;
    background: #482E44;
    border: 1px solid #42293E;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-connect:hover {
    background: var(--accent-hover);
}

.active-users {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.5rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: var(--glass-shadow);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}

.cta-box {
    margin-top: 1rem;
}
.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ========== Auth ========== */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.auth-container h2 { margin-bottom: 1.5rem; }
.auth-form { margin-bottom: 1rem; }
.auth-form .btn { width: 100%; margin-top: 0.5rem; }
.auth-alt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}
.auth-alt a { color: var(--accent); }

/* ========== Searching ========== */
.searching-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.searching-animation {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    position: relative;
}
.pulse-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}
.searching-prompt {
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0;
    max-width: 400px;
}

/* ========== Chat ========== */
.chat-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    align-items: stretch;
    gap: 0;
}

.chat-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem;
    max-width: 700px;
}

.chat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.chat-handle {
    font-family: var(--font-handle);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chat-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.chat-messages::-webkit-scrollbar {
    display: none;
}

/* Message rows */
.chat-message-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 75%;
}

.message-own-row {
    align-self: flex-end;
}

.message-other-row {
    align-self: flex-start;
}

.avatar-chat {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Chat bubbles */
.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 24px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-other {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    border-top-left-radius: 10px;
}

.message-own {
    background: linear-gradient(to right, #482E44, #3E2F3B);
    border: 1px solid #42293E;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    border-top-right-radius: 10px;
}

/* Continuation messages: uniform corners, hidden avatar, tighter spacing */
.message-own-row + .message-own-row .message-own {
    border-top-right-radius: 24px;
}

.message-other-row + .message-other-row .message-other {
    border-top-left-radius: 24px;
}

.message-own-row + .message-own-row .avatar-chat,
.message-other-row + .message-other-row .avatar-chat {
    visibility: hidden;
}

.message-own-row + .message-own-row,
.message-other-row + .message-other-row {
    margin-top: -0.15rem;
}

.message-content {
    word-wrap: break-word;
}

/* Chat input bar */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--glass-border);
}

.chat-input-bar input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.chat-input-bar input::placeholder {
    color: rgba(255, 255, 255, 0.50);
}

.btn-icon {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.50);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--text-primary);
}

.btn-send {
    padding: 0.5rem 1.25rem;
    background: #482E44;
    border: 1px solid #42293E;
    border-radius: 999px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.btn-send:hover {
    background: var(--accent-hover);
}

/* Right sidebar — profile + keep */
.chat-sidebar-right {
    width: 350px;
    flex-shrink: 0;
    background: rgba(26, 17, 29, 0.75);
    border: 1px solid #161516;
    border-radius: 32px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    margin: 1rem 1rem 1rem 0;
}

.chat-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.chat-profile-handle {
    font-family: var(--font-handle);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-profile-bio {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.chat-actions {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.btn-unmatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.btn-unmatch:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.5);
    color: var(--danger);
}

.btn-keep {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.btn-keep:hover {
    background: rgba(152, 152, 152, 0.25);
}

.keep-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.4;
}

/* ========== Connections Page ========== */
.connections-container {
    width: 100%;
    max-width: 600px;
}
.connections-container h2 { margin-bottom: 1.5rem; }
.connections-page-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.connection-page-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.connection-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.connection-actions {
    display: flex;
    gap: 0.5rem;
}
.empty-state {
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4rem;
}

/* ========== Badges ========== */
.badge-active { color: var(--success); }
.badge-kept { color: var(--accent); }

/* ========== Modal ========== */
.match-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}
.modal-content {
    position: relative;
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ========== Messages ========== */
.messages { margin-bottom: 1rem; width: 100%; max-width: 640px; }
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ========== Profile Card ========== */
.profile-card {
    text-align: center;
}
.profile-card h3 {
    font-family: var(--font-handle);
    margin-top: 0.5rem;
}
.tier-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ========== Scrollbar ========== */
.connections-list::-webkit-scrollbar {
    width: 4px;
}
.connections-list::-webkit-scrollbar-track {
    background: transparent;
}
.connections-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Chat layout overrides — full width, no centering */
.main-content:has(.chat-layout) {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    max-width: none;
}

/* ========== Searching Card (Sidebar) ========== */
.searching-card {
    cursor: pointer;
    position: relative;
}

.searching-cancel-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}
.searching-card:hover .searching-cancel-btn { opacity: 1; }
.searching-cancel-btn:hover { color: var(--danger); }

.searching-pulse-dot {
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pulse-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    animation: sidebar-pulse 2s ease-in-out infinite;
}

.searching-pulse-dot.matched .pulse-inner {
    background: var(--success);
    animation: none;
}

@keyframes sidebar-pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ========== Match Card (Main Content) ========== */
.match-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.match-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.match-card-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.match-card-handle {
    font-family: var(--font-handle);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.match-card-prompt {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 350px;
}

.match-card-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-connect-full {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: #482E44;
    border: 1px solid #42293E;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-connect-full:hover {
    background: var(--accent-hover);
}

.btn-outline-full {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-full:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ========== Toast Notification ========== */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toast-in 0.3s ease-out;
}

.toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}

@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========== Message Delivery Status ========== */
.message-status {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    vertical-align: middle;
    line-height: 1;
}

.check-icon {
    display: inline-block;
    vertical-align: middle;
}

.check-sent {
    color: rgba(255, 255, 255, 0.35);
}

.check-delivered {
    color: rgba(255, 255, 255, 0.5);
}

.check-read {
    color: #5B9BD5;
}

/* ========== Waiting Card ========== */
.waiting-card .match-card-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.waiting-avatar {
    animation: waiting-pulse 3s ease-in-out infinite;
}

@keyframes waiting-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.waiting-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0a430;
    display: inline-block;
    animation: waiting-blink 1.5s ease-in-out infinite;
}

@keyframes waiting-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}
