@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-300.TTF) format("truetype");
	font-weight: 300;
	font-style: normal;
	font-display: swap
}

@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-400.TTF) format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap
}

@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-500.TTF) format("truetype");
	font-weight: 500;
	font-style: normal;
	font-display: swap
}

@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-600.TTF) format("truetype");
	font-weight: 600;
	font-style: normal;
	font-display: swap
}

@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-700.TTF) format("truetype");
	font-weight: 700;
	font-style: normal;
	font-display: swap
}

@font-face {
	font-family: GILROY;
	src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-800.TTF) format("truetype");
	font-weight: 800;
	font-style: normal;
	font-display: swap
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: GILROY, sans-serif;
}

body {
    width: 100vw;
    font-family: GILROY, sans-serif;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.widget {
    background: #1f1f24;
    border-radius: 25px;
    width: 100vw;
    border: 1px solid #202225;
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid #303035;
}

.widget.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.widget.hide {
    transform: translateY(100px) scale(0.9);
    opacity: 0;
}

.widget-header {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    gap: 12px;
    flex: 1;
    height: 50px;
    align-items: center;
}

.avatar-container {
    position: relative;
}

.avatar-container img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid #23272a;
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #3ba55c;
    border: 2px solid #36393f;
    border-radius: 50%;
    display: none;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.duration {
    font-size: 12px;
    font-weight: 500;
    color: #b9bbbe;
    font-family: 'Source Code Pro', monospace;
}

.close-button {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    display: none;
}

.close-button:hover {
    background: #ed4245;
    color: #ffffff;
}

.audio-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-control {
    flex-shrink: 0;
    display: none;
}

.play-button {
    width: 32px;
    height: 32px;
    background: #3ba55c;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(59, 165, 92, 0.3);
}

.play-button:hover {
    background: #2d7d32;
    transform: scale(1.05);
}

.play-button:active {
    transform: scale(0.95);
}

.waveform-section {
    flex: 1;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.waveform-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1px;
}

.waveform-bar {
    flex: 1;
    background: #4f545c;
    border-radius: 1px;
    transition: all 0.1s ease;
    min-height: 2px;
    max-height: 24px;
    cursor: pointer;
    border-radius: 100px;
}

.waveform-bar.active {
    background: #33e96c;
}

.waveform-bar:hover {
    background: #5865f2;
}

.message-content {
    color: #dcddde;
    font-size: 20px;
    line-height: 1.375;
    word-wrap: break-word;
    font-weight: 400;
}

.speaker-name {
    color: #5865f2;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.1s ease;
}

.speaker-name:hover {
    color: #4752c4;
    text-decoration: underline;
}

.separator {
    color: #dcddde;
    margin: 0 2px;
}

.message-text {
    color: white;
    word-break: break-word;
    /* line-height: 1; */
    font-weight: 500;
}



/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget.show .message-content {
    animation: fadeIn 0.3s ease 0.2s both;
}

.widget.show .audio-section {
    animation: fadeIn 0.3s ease 0.1s both;
}

.message-content::-webkit-scrollbar {
    width: 4px;
}

.message-content::-webkit-scrollbar-track {
    background: #2f3136;
}

.message-content::-webkit-scrollbar-thumb {
    background: #202225;
    border-radius: 2px;
}

.message-content::-webkit-scrollbar-thumb:hover {
    background: #36393f;
}
