* {
    font-family: Helvetica Neue, Segoe UI, sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #eaeaea;
    padding: 0;
    margin: 0;
    color: #303030;
    height: 100vh;
}

#app {
    max-width: 1200px;
    height: 100vh;
    margin: 0 auto;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #fff;
    padding: 16px;
    margin: 0;
    background-color: #128c7e;
}

h2 {
    color: #128c7e;
    margin: 16px 0 8px 0;
    font-size: 1.3rem;
}

h3 {
    color: #075e54;
    margin: 16px 0 8px 0;
    font-size: 1.1rem;
}

h4 {
    color: #075e54;
    margin: 0 0 4px 0;
    font-size: 1rem;
}

button, 
input[type="submit"] {
    background-color: #128c7e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
    background-color: #075e54;
}

.back-btn {
    background-color: #34b7f1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    background-color: #0099e5;
}

.back-btn::before {
    content: "←";
    font-size: 1.2em;
}

.edit-btn {
    background-color: #34b7f1;
    padding: 4px 12px;
    font-size: 0.9rem;
    margin-left: 8px;
}

.cancel-btn {
    background-color: #888;
}

.delete-btn {
    background-color: #dc3545;
}

.action-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
    margin-right: 5px;
    border-radius: 4px;
}

button:disabled,
input[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

input[type="text"],
input[type="date"],
textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    margin: 5px 0;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #128c7e;
    box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.2);
}

fieldset {
    display: contents;
    border: none;
    padding: 0;
    margin: 0;
}

.logout-btn {
    position: absolute;
    top: 14px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.2);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tabs {
    display: flex;
    background-color: #fff;
    padding: 0 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tabs button {
    padding: 15px 20px;
    margin: 0;
    background-color: transparent;
    color: #555;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tabs button.active {
    color: #128c7e;
    border-bottom: 3px solid #128c7e;
    background-color: transparent;
}

.chat-list {
    margin-top: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}

.chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: #fff;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.chat-item-content {
    flex-grow: 1;
    cursor: pointer;
}

.chat-item:hover {
    background-color: #f5f5f5;
    border-left-color: #34b7f1;
}

.chat-item.selected {
    background-color: #e6f7ff;
    border-left-color: #128c7e;
}

.chat-item .delete-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
    padding: 4px 8px;
}

.chat-item:hover .delete-btn {
    opacity: 1;
}

.chat-view {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    background-color: #e5ded8;
    border-radius: 8px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #ededed; 
    border-bottom: 1px solid #ddd;
}

.chat-title {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.chat-title h2 {
    margin: 0;
    color: #075e54;
}

.rename-form {
    display: flex;
    align-items: center;
    margin-left: 10px;
    flex-grow: 1;
    gap: 10px;
}

.no-messages, .no-drafts {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background-color: rgba(255,255,255,0.7);
    border-radius: 8px;
    margin: 20px;
}

.message-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 10px;
}

.message {
    position: relative;
    margin-bottom: 15px;
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-other {
    background-color: #fff;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.own-message {
    background-color: #dcf8c6;
    align-self: flex-end;
    margin-left: auto;
    border-top-right-radius: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-header strong {
    color: #128c7e;
}

.timestamp {
    color: #888;
    font-size: 0.8rem;
}

.message-content {
    margin-bottom: 5px;
    word-break: break-word;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.edit-message-form {
    width: 100%;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    gap: 8px;
}

.message-form {
    display: flex;
    padding: 15px;
    gap: 10px;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
}

.message-form input[type="text"] {
    flex-grow: 1;
    border-radius: 20px;
    padding: 12px 20px;
}

.send-btn {
    min-width: 80px;
    border-radius: 20px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.send-btn:hover {
    transform: scale(1.1);
    background-color: #075e54;
}

.send-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.drafts-tab, .profile-tab {
    padding: 20px;
    background-color: #fff;
    height: calc(100vh - 150px);
    overflow-y: auto;
}

.draft-form {
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 5px solid #128c7e;
}

.input-row {
    margin-bottom: 15px;
}

.input-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #075e54;
}

.draft-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 15px;
    gap: 10px;
}

.home-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    margin: 20px;
}

.reaction-bar {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}
  
.reaction-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2px 6px;
    cursor: pointer;
}
  
.reaction-button.active {
    background-color: #dcf8c6;
    border-color: #128c7e;
}

.profile-tab {
    padding: 20px;
    background-color: #fff;
    height: calc(100vh - 150px);
    overflow-y: auto;
}

.profile-container {
    display: flex;
    gap: 20px;
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid #128c7e;
}

.profile-picture-container {
    flex-shrink: 0;
}

.profile-avatar {
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #128c7e;
    background-color: #128c7e;
}

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

.profile-avatar .placeholder {
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-form {
    flex-grow: 1;
}

.profile-save-btn {
    margin-top: 15px;
}

.profile-preview {
    margin-top: 30px;
}

.profile-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.profile-card-info {
    flex: 1;
}

.profile-card-info p {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
}

.profile-card-description {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.profile-card-description p {
    color: #444;
    line-height: 1.5;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-name {
    font-weight: bold;
    color: #075e54;
    font-size: 1.1rem;
}

.draft-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #34b7f1;
}

.draft-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.draft-content {
    margin-bottom: 15px;
    color: #555;
}

input[type="file"] {
    padding: 8px;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    width: 100%;
}
@keyframes thumbsUpBounce {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.3) rotate(10deg);
    }
    60% {
        transform: scale(0.95) rotate(5deg);
    }
    80% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.reaction-button:hover {
    animation: thumbsUpBounce 0.6s ease forwards;
}

.reaction-button.active {
    background-color: #dcf8c6;
    border-color: #128c7e;
    animation: thumbsUpBounce 0.6s ease;
}
@keyframes messageBounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.own-message.sending {
    animation: messageBounceIn 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.drafts-menu {
    position: absolute;
    bottom: 80px;
    right: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    border: 1px solid #ddd;
}

.drafts-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #f5f5f5;
}

.drafts-menu-header h4 {
    margin: 0;
}

.drafts-menu-close {
    background-color: transparent;
    color: #666;
    padding: 2px 6px;
    font-size: 16px;
    border-radius: 50%;
}

.drafts-menu-close:hover {
    background-color: #eee;
    color: #333;
}

.drafts-menu-list {
    padding: 10px;
}

.drafts-menu-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.drafts-menu-item:hover {
    background-color: #f5f5f5;
}

.drafts-menu-item-content {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #333;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drafts-menu-item-footer {
    display: flex;
    justify-content: flex-end;
}

.drafts-menu-use {
    background-color: #128c7e;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.drafts-menu-use:hover {
    background-color: #075e54;
}

.drafts-toggle-btn {
    background-color: #f2f2f2;
    color: #444;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    position: absolute;
    bottom: 25px;
    right: 106px;
    z-index: 5;
}

.drafts-toggle-btn:hover {
    background-color: #e6e6e6;
}

.drafts-toggle-btn i {
    font-size: 1.1rem;
}

.drafts-badge {
    background-color: #128c7e;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.no-relevant-drafts {
    padding: 15px;
    text-align: center;
    color: #888;
    font-style: italic;
}

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

.drafts-menu {
    animation: slideUp 0.3s ease forwards;
}

.emoji-picker {
    position: absolute;
    bottom: 80px;
    left: 20px;
    display: flex;
    flex-wrap: wrap;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    max-width: 280px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
  }
  
  .emoji-picker button {
    background: none;
    border: none;
    font-size: 24px;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }
  
  .emoji-picker button:hover {
    background-color: #f0f0f0;
    transform: scale(1.2);
  }
  
  .emoji-btn {
    background: none;
    border: none;
    font-size: 18px;
    padding: 0 10px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
  }
  
  .emoji-btn:hover {
    opacity: 1;
  }

  .current-user-display {
    background-color: rgba(18, 140, 126, 0.1);
    padding: 8px 16px;
    margin: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #075e54;
    border-left: 3px solid #128c7e;
}

.current-user-display strong {
    font-weight: bold;
}

.login-btn {
    margin: 20px auto;
    display: block;
    width: 200px;
    font-size: 1.1rem;
    padding: 12px 20px;
    background-color: #34b7f1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.login-btn:hover {
    background-color: #0099e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.reaction-count {
    display: inline-block;
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.8em;
    margin-left: 2px;
    min-width: 18px;
    text-align: center;
  }