* {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

body {
    background-color: #e5ddd5;
    padding-bottom: 90px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #008069;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.left {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 70%;
}

.left i {
    font-size: 20px;
}

.left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.text h1 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text p {
    font-size: 12px;
    opacity: 0.8;
}

.right {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

main {
    padding-top: 70px;
    padding-left: 8px;
    padding-right: 8px;
}

.date {
    background: #e1f7f7;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #444;
    width: fit-content;
    margin: 10px auto;
}

.privacy-note {
    background: #feeecc;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    color: #666;
    text-align: center;
    margin: 10px 0;
}

.message-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    background-color: #cfd6dd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user {
    background: white;
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 0 12px 12px 12px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-break: break-word;
}

.user::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 15px;
    height: 20px;
    background: white;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.user .number {
    font-weight: 600;
    font-size: 13px;
    color: #f44336;
    margin-bottom: 4px;
}

.message-content {
    font-size: 14px;
    margin: 2px 0;
}

.details {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}

.details span:first-child {
    color: #007af5;
    font-weight: 600;
    letter-spacing: -2px;
    margin-right: 2px;
}

.video img {
    max-width: 220px;
    border-radius: 10px;
    cursor: pointer;
}

.voice-note {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.voice-note .play-btn {
    font-size: 28px;
    color: #008069;
    cursor: pointer;
}

.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.waveform span {
    width: 4px;
    background-color: #8696a0;
    border-radius: 4px;
}

.waveform span:nth-child(1) { height: 12px; }
.waveform span:nth-child(2) { height: 18px; }
.waveform span:nth-child(3) { height: 10px; }
.waveform span:nth-child(4) { height: 22px; }
.waveform span:nth-child(5) { height: 14px; }
.waveform span:nth-child(6) { height: 8px; }
.waveform span:nth-child(7) { height: 16px; }
.waveform span:nth-child(8) { height: 20px; }
.waveform span:nth-child(9) { height: 10px; }

.voice-duration {
    font-size: 12px;
    color: #3b4a54;
    margin-left: 4px;
    white-space: nowrap;
}

.forward {
    font-size: 11px;
    color: #777;
    margin-bottom: 3px;
}

.join-float {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 450px;
    background: #008069;
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(0, 128, 105, 0.4);
    cursor: pointer;
    z-index: 20;
    transition: 0.2s;
    text-align: center;
}

.join-float:hover {
    background: #006b54;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Payment modal specific - centered */
#paymentModal {
    align-items: center;
}

#paymentModal .modal-content {
    width: 90%;
    max-width: 380px;
    border-radius: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.profile {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px auto;
    display: block;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 10px 0 5px;
}

.created {
    color: #777;
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
}

.reactions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
}

.reactions img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid white;
    margin-right: -8px;
}

.reactions .total {
    background: #e4e4e4;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 5px;
}

.group-desc {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    margin: 15px 0;
    text-align: left;
}

.group-desc a {
    color: #008069;
    font-weight: 500;
    cursor: pointer;
    display: block;
    margin-top: 5px;
}

#joinGroupBtn {
    width: 100%;
    background: #008069;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 15px 0 5px;
    transition: 0.2s;
}

#joinGroupBtn:hover {
    background: #006b54;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small duotone success tick (filled circle + check) */
.success-tick {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    margin-right: 4px;
}
.success-tick .fa-circle {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 18px;
    color: #2e7d32; /* darker "base" tone */
}
.success-tick .fa-check {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 18px;
    color: #ffffff; /* light "cut-out" tone */
    line-height: 18px;
}
