:root {
    --primary-orange: #ff7849;
    --text-color: #2c3e50;
    --background-color: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #cbd5e1;
    --error-color: #dc2626;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    padding-bottom: calc(2rem + 90px);
}

.content {
    max-width: 600px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

h1 {
    font-size: 1.8rem;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    text-align: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #64748b;
    min-height: calc(100vh - 300px);
}

.empty-icon {
    margin-bottom: 1.5rem;
    color: var(--primary-orange);
}

.empty-state h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    min-height: 100px;
}

.chat-item {
    padding: 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-item:hover {
    border-color: var(--primary-orange);
    background-color: rgba(255, 120, 73, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-single {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-orange);
}

.avatar-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-group {
    width: 48px;
    height: 48px;
    position: relative;
}

.avatar-group.members-2 .avatar-group-item {
    width: 36px;
    height: 36px;
    position: absolute;
    border: 2px solid white;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-orange);
}

.avatar-group.members-2 .avatar-group-item:nth-child(1) {
    top: 0;
    left: 0;
    z-index: 2;
}

.avatar-group.members-2 .avatar-group-item:nth-child(2) {
    bottom: 0;
    right: 0;
    transform: translate(25%, 25%);
    z-index: 1;
}

.avatar-group.members-3 .avatar-group-item {
    width: 32px;
    height: 32px;
    position: absolute;
    border: 2px solid white;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-orange);
}

.avatar-group.members-3 .avatar-group-item:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.avatar-group.members-3 .avatar-group-item:nth-child(2) {
    bottom: 0;
    left: 0;
    transform: translate(-25%, 25%);
    z-index: 2;
}

.avatar-group.members-3 .avatar-group-item:nth-child(3) {
    bottom: 0;
    right: 0;
    transform: translate(25%, 25%);
    z-index: 1;
}

.avatar-group.members-4 .avatar-group-item {
    width: 32px;
    height: 32px;
    position: absolute;
    border: 2px solid white;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-orange);
}

.avatar-group.members-4 .avatar-group-item:nth-child(1) {
    top: 0;
    left: 0;
    z-index: 4;
}

.avatar-group.members-4 .avatar-group-item:nth-child(2) {
    top: 0;
    right: 0;
    transform: translateX(25%);
    z-index: 3;
}

.avatar-group.members-4 .avatar-group-item:nth-child(3) {
    bottom: 0;
    left: 0;
    transform: translateY(25%);
    z-index: 2;
}

.avatar-group.members-4 .avatar-group-item:nth-child(4) {
    bottom: 0;
    right: 0;
    transform: translate(25%, 25%);
    z-index: 1;
}

.avatar-group-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-count {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-orange);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid white;
    z-index: 5;
    transform: translate(25%, 25%); 
    border: 2px solid var(--primary-orange);
}

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

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

.chat-title {
    font-weight: 600;
    color: var(--primary-orange);
}

.chat-subtitle {
    font-weight: 600;
    color: var(--text-color);
}

.chat-preview {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.last-message {
    flex: 1;
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timestamp {
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: nowrap;
}

.unread-badge {
    background-color: var(--primary-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 8px;
}

.new-chat-button {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 120, 73, 0.2);
}

.new-chat-button:hover {
    background-color: #e66a3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 120, 73, 0.3);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-bottom: calc(1rem + 90px);
    }

    .content {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .chat-item {
        padding: 0.75rem;
    }

    .chat-title {
        font-size: 0.95rem;
    }

    .chat-subtitle {
        font-size: 0.95rem;
    }

    .last-message {
        font-size: 0.9rem;
    }

    .timestamp {
        font-size: 0.8rem;
    }

    .new-chat-button {
        bottom: 1rem;
        left: 0.75rem;
        right: 0.75rem;
        padding: 0.875rem;
        font-size: 1rem;
    }

    .empty-state {
        min-height: calc(100vh - 200px);
        padding: 1rem;
    }

    .empty-state h2 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.95rem;
    }
}