:root {
    --primary: #D23F77;
    --primary-dark: #B93269;
    --light: #F9F0F5;
    --text: #333333;
    --text-light: #777777;
    --danger: #DC3545;
    --success: #28A745;
    --border: #E8E8E8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.iphone-frame {
    position: relative;
    width: 390px;
    height: 844px;
    background-color: white;
    border-radius: 45px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 10px solid #f0f0f0;
}

/* Status Bar */
.status-bar {
    height: 40px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.time {
    font-weight: 600;
    font-size: 14px;
}

.icons {
    display: flex;
    gap: 6px;
}

/* Content Area */
.content {
    padding: 16px;
    height: calc(100% - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Nav Bar */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    padding: 10px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

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

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

.header h1 {
    font-size: 24px;
    font-weight: 700;
}

.btn {
    background-color: transparent;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

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

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--light);
}

.btn-outline-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn i {
    margin-right: 8px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 0 15px;
    margin-bottom: 20px;
    height: 45px;
}

.search-bar i {
    color: var(--text-light);
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    height: 100%;
    font-size: 15px;
}

/* Avatar */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 100px;
    height: 100px;
}

/* Card */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Community Card */
.community-card {
    position: relative;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.community-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

.community-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.community-members {
    font-size: 14px;
    opacity: 0.8;
}

/* User Card */
.user-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.user-info {
    flex: 1;
    margin-left: 15px;
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.user-bio {
    font-size: 14px;
    color: var(--text-light);
}

/* Chat List */
.chat-list {
    display: flex;
    flex-direction: column;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

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

.chat-info {
    flex: 1;
    margin-left: 15px;
    overflow: hidden;
}

.chat-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.chat-name span:first-child {
    font-weight: 600;
}

.chat-time {
    color: var(--text-light);
    font-size: 13px;
}

.chat-preview {
    color: var(--text-light);
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 280px;
}

/* Messages */
.message-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message-received {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: var(--text);
    border-bottom-left-radius: 5px;
}

.message-sent {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

/* Profile Sections */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.profile-name {
    font-size: 22px;
    font-weight: 600;
    margin: 10px 0 5px;
}

.profile-location {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 13px;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    background-color: var(--light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.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: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

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

/* Settings Styles */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-heading {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    padding-left: 5px;
}

.settings-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: var(--text);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 18px;
    margin-right: 15px;
}

.settings-info {
    flex: 1;
}

.settings-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.settings-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.settings-arrow {
    color: var(--text-light);
    font-size: 14px;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.welcome-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    background-color: var(--primary);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.welcome-logo i {
    font-size: 64px;
    color: white;
}

.welcome-actions {
    padding: 30px 20px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}