:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --chat-bg: #1a1a1a;
    --chat-hover: #2a2a2a;
    --chat-bubble-sent: #2563eb;
    --chat-bubble-received: #2a2d31;
    --primary-color: #3b82f6;
    --accent-red: #ef4444;
    --accent-green: #10b981;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    background: var(--chat-bg);
    padding: 0.25rem;
    border-radius: 8px;
    width: fit-content;
    margin: 0 auto 1rem auto;
}

.lang-switch button {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flag-icon {
    display: block;
    border-radius: 2px;
}

.lang-switch button:hover {
    background: var(--chat-hover);
}

.lang-switch button.active {
    background: var(--primary-color);
    color: white;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    color: var(--heading-color);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

#description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #b5bac1;
}

.examples-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
}

h3 {
    margin-bottom: 1rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bad-example h3::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.good-example h3::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--chat-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chat-message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.chat-message.sent .message-header {
    flex-direction: row-reverse;
}

.username {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.username.co-worker {
    color: var(--accent-green);
}

.timestamp {
    font-size: 0.75rem;
    color: #80848e;
}

.text {
    margin: 0;
    padding: 0.8rem 1.2rem;
    border-radius: 16px;
    font-size: 1rem;
    background-color: var(--chat-bubble-received);
    line-height: 1.4;
}

.chat-message.sent .text {
    background-color: var(--chat-bubble-sent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .text {
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    align-self: flex-start;
    margin-top: 0.5rem;
    color: #80848e;
    font-style: italic;
    opacity: 0.7;
}

.typing-indicator .text {
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
}

.explanation {
    background: var(--chat-bg);
    padding: 2rem;
    border-radius: 12px;
}

.explanation h2 {
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.explanation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.explanation li {
    font-size: 1.05rem;
    position: relative;
    padding-left: 1.5rem;
}

.explanation li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.explanation strong {
    color: var(--heading-color);
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: #80848e;
    font-size: 0.9rem;
}

.github-link {
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.github-link:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .chat-container {
        padding: 1rem;
    }

    .typing-indicator {
        padding-left: 0;
    }
}