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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --bg: #f7fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
}

.logo h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

.auth-forms {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.form-switch {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fed7d7;
    color: #c53030;
    border-radius: 0.5rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* App Screen */
.app-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Compact Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: max(env(safe-area-inset-top), 1rem) 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-title {
    font-size: 1.5rem;
    margin: 0;
}

.user-display-name {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-icon .mobile-icon {
    display: none;
    font-size: 1.2rem;
}

.btn-icon .desktop-text {
    display: inline;
}

/* Sticky Friend Selector Bar */
.friend-selector-bar {
    background: var(--bg);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.friend-action-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.change-friend-btn {
    flex: 1;
    background: var(--white);
    border: 2px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
    min-height: 48px;
}

.change-friend-btn:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.change-friend-btn.has-selection {
    border-color: var(--primary);
    color: var(--primary);
}

.label-mobile {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

#selected-friend-name {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-icon {
    font-size: 0.75rem;
    color: var(--text-light);
    transition: transform 0.2s;
}

.change-friend-btn.open .dropdown-icon {
    transform: rotate(180deg);
}

.send-vibe-trigger {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.send-vibe-trigger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.send-vibe-trigger:active:not(:disabled) {
    transform: translateY(0);
}

.send-vibe-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-vibe-trigger .mobile-text {
    display: inline;
}

.send-vibe-trigger .desktop-text {
    display: none;
}

/* Multi-select button */
.btn-multi-select {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-multi-select:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-multi-select.active {
    background: var(--primary);
    color: var(--white);
}

.multi-select-count {
    background: var(--white);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Friend Picker Dropdown */
.friend-picker {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    max-height: 50vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 98;
}

.friend-picker-content {
    padding: 1rem;
}

.friend-picker-content h3 {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 1rem;
}

.friend-list-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friend-picker-item {
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.friend-picker-item:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.friend-picker-item.selected {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* Old friend selector - deprecated but keeping for backwards compat */
.friend-selector {
    display: none;
}

.friend-select {
    width: 100%;
}

/* Desktop Vibe Buttons Section */
.desktop-vibe-section {
    display: none; /* Hidden on mobile by default */
    padding: 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.vibe-buttons-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.desktop-vibe-btn {
    padding: 1.5rem 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--white);
    text-transform: uppercase;
    box-shadow: var(--shadow);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-vibe-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.desktop-vibe-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.vibe-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem;
}

.vibe-btn {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--white);
    text-transform: uppercase;
    box-shadow: var(--shadow);
}

.vibe-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.vibe-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.vibe-btn[data-vibe="Yo"],
.desktop-vibe-btn[data-vibe="Yo"] {
    background: linear-gradient(135deg, #FFB75E 0%, #ED8F03 100%);
}

.vibe-btn[data-vibe="Rizz"],
.desktop-vibe-btn[data-vibe="Rizz"] {
    background: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
}

.vibe-btn[data-vibe="Slay"],
.desktop-vibe-btn[data-vibe="Slay"] {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}

.vibe-btn[data-vibe="Cap"],
.desktop-vibe-btn[data-vibe="Cap"] {
    background: linear-gradient(135deg, #FF6B6B 0%, #C92A2A 100%);
}

.vibe-btn[data-vibe="FR"],
.desktop-vibe-btn[data-vibe="FR"] {
    background: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
}

.vibe-btn[data-vibe="Bet"],
.desktop-vibe-btn[data-vibe="Bet"] {
    background: linear-gradient(135deg, #48BB78 0%, #38A169 100%);
}

/* Vibes Section (Unified Feed) */
.vibes-section {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vibes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.vibes-header h3 {
    margin: 0;
    color: var(--text);
}

.btn-mark-read {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mark-read:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--bg);
    padding: 0.5rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.filter-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Vibes List */
.vibes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 60vh;
    padding-right: 0.5rem;
}

.vibes-list::-webkit-scrollbar {
    width: 6px;
}

.vibes-list::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 3px;
}

.vibes-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.vibes-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Vibe Item */
.vibe-item {
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.vibe-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vibe-item.sent {
    border-left-color: var(--secondary);
    background: #f5f3ff;
}

.vibe-item.received {
    border-left-color: var(--primary);
}

.vibe-item.unread {
    background: #ebf4ff;
    border-left-color: var(--success);
}

.load-more-indicator {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.notification-sender {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.unread-count {
    display: inline-block;
    background: #FF6B6B;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* Reaction Picker */
.reaction-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

.reaction-picker-content {
    background: rgba(0, 0, 0, 0.95);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.reaction-options {
    display: flex;
    gap: 8px;
    align-items: center;
}

.reaction-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.reaction-btn.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.3);
}

.reaction-btn.remove-btn {
    font-size: 14px;
    padding: 12px;
    background: rgba(255, 107, 107, 0.2);
    border-color: #FF6B6B;
}

.reaction-btn.remove-btn:hover {
    background: rgba(255, 107, 107, 0.4);
}

.reactions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.reaction-emoji {
    display: inline-block;
    transition: transform 0.2s ease;
}

.reaction-emoji:hover {
    transform: scale(1.2);
}

/* Floating Action Button (FAB) */
.vibe-fab {
    position: fixed;
    bottom: calc(2rem + env(safe-area-inset-bottom));
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vibe-fab:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.vibe-fab:active:not(:disabled) {
    transform: scale(0.95);
}

.vibe-fab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-light);
}

.fab-icon {
    font-size: 2rem;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
    pointer-events: none;
}

.bottom-sheet.show {
    display: block;
    pointer-events: auto;
}

.bottom-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.bottom-sheet.show .bottom-sheet-backdrop {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-sheet.show .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 1.25rem 1.5rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--white) 100%);
}

.bottom-sheet-handle {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    opacity: 0.6;
}

.bottom-sheet-header h3 {
    margin: 0;
    margin-top: 0.5rem;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.bottom-sheet .close-btn {
    position: absolute;
    right: 1rem;
    top: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.bottom-sheet .close-btn:hover {
    background: var(--border);
    transform: rotate(90deg);
}

.bottom-sheet .vibe-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.bottom-sheet .vibe-btn {
    padding: 1.25rem 0.5rem;
    font-size: 1rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.bottom-sheet .vibe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.bottom-sheet .vibe-btn:active::before {
    opacity: 1;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    color: var(--primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.search-section,
.friends-list-section {
    margin-bottom: 2rem;
}

.search-section h3,
.friends-list-section h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.search-results {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-item,
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 0.5rem;
}

.user-item button,
.friend-item button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary);
    color: var(--white);
}

.user-item button:hover {
    background: var(--primary-dark);
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Install Instructions */
.install-instructions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.install-section {
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.install-section h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.install-section ol {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.install-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.install-section .note {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #fff3cd;
    color: #856404;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Responsive - Mobile First */

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    /* Auth screen adjustments */
    .logo h1 {
        font-size: 2.5rem;
    }

    /* Header - show icons only */
    .app-title {
        font-size: 1.25rem;
    }

    .user-display-name {
        font-size: 0.75rem;
    }

    .btn-icon .desktop-text {
        display: none;
    }

    .btn-icon .mobile-icon {
        display: inline;
    }

    .btn-icon {
        padding: 0.5rem;
        min-width: 44px;
    }

    /* Friend selector bar - more compact */
    .friend-selector-bar {
        padding: 0.5rem 0.75rem;
        top: 50px;
    }

    .friend-action-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .selected-friend-display .label {
        font-size: 0.8rem;
    }

    .change-friend-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        flex: 1 1 100%;
    }

    .btn-multi-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .multi-select-text {
        font-size: 0.8rem;
    }

    .send-vibe-trigger {
        flex: 1 1 auto;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    /* Filter tabs more compact */
    .filter-tabs {
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .filter-tab {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Vibes section */
    .vibes-section {
        padding: 1rem;
    }

    .vibes-header h3 {
        font-size: 1rem;
    }

    .btn-mark-read {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Bottom sheet vibe buttons - 2 columns on very small screens */
    .bottom-sheet .vibe-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem;
    }

    .bottom-sheet .vibe-btn {
        padding: 1rem 0.5rem;
        font-size: 1rem;
        min-height: 56px;
    }

    /* FAB slightly smaller */
    .vibe-fab {
        width: 56px;
        height: 56px;
        bottom: calc(1.5rem + env(safe-area-inset-bottom));
        right: 1.5rem;
    }

    .fab-icon {
        font-size: 1.75rem;
    }

    /* Vibes list */
    .vibes-list {
        max-height: 50vh;
    }

    .vibe-item {
        padding: 0.75rem;
    }

    .notification-message {
        font-size: 1.1rem;
    }
}

/* Medium Mobile and Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Header - show text on larger phones */
    .btn-icon .mobile-icon {
        display: none;
    }

    .btn-icon .desktop-text {
        display: inline;
    }

    /* Bottom sheet - 3 columns */
    .bottom-sheet .vibe-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets and Desktop (769px+) */
@media (min-width: 769px) {
    /* Header stays full size */
    .app-header {
        padding: 1.5rem;
    }

    /* Friend selector can be larger */
    .friend-selector-bar {
        padding: 1rem 1.5rem;
    }

    /* Show desktop vibe buttons section */
    .desktop-vibe-section {
        display: block;
    }

    /* Hide FAB on desktop */
    .vibe-fab {
        display: none;
    }

    /* Vibes can use more space */
    .vibes-list {
        max-height: 70vh;
    }

    /* Bottom sheet hidden on desktop (still accessible if needed) */
    .bottom-sheet {
        display: none !important;
    }
}

/* Landscape Orientation - Optimize horizontal space */
@media (orientation: landscape) and (max-height: 600px) {
    /* More compact header in landscape */
    .app-header {
        padding: 0.75rem 1rem;
    }

    .app-title {
        font-size: 1.25rem;
    }

    /* Compact friend selector */
    .friend-selector-bar {
        padding: 0.5rem 1rem;
        top: 45px;
    }

    /* Vibes take less space */
    .vibes-list {
        max-height: 40vh;
    }

    /* Bottom sheet more compact */
    .bottom-sheet .vibe-buttons {
        grid-template-columns: repeat(6, 1fr);
        padding: 1rem;
    }

    .bottom-sheet .vibe-btn {
        padding: 0.75rem 0.25rem;
        font-size: 0.9rem;
    }

    .bottom-sheet-content {
        max-height: 80vh;
    }
}

/* Dark Mode Support (Optional - respects system preference) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-icon,
    .change-friend-btn,
    .vibe-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
