body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--bg-color, #fff);
    color: var(--text-color, #000);
}

h1,
h2,
h3 {
    color: var(--heading-color, #333);
}

p,
li {
    color: var(--text-color, #555);
}

.date {
    color: var(--date-color, grey);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color, #ccc);
    margin: 20px 0;
}

.friends-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.friend {
    text-align: center;
    max-width: 100px;
}

.friend img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.theme-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-switch button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
}

.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #ccc;
    --heading-color: #fff;
    --date-color: #bbb;
    --border-color: #444;
    --chat-bg: #2c2c2c;
    --chat-text: #ddd;
    --input-bg: #333;
    --input-border: #555;
    --button-bg: #007bff;
    --button-hover: #0056b3;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.2em;
    }

    p,
    li {
        font-size: 1em;
    }

    .friend img {
        width: 60px;
        height: 60px;
    }
}

#chat-container {
    display: flex;
    flex-direction: column;
    background: var(--bg-color, #fff);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Chat box */
#chat-box {
    height: 300px;
    overflow-y: auto;
    background: var(--chat-bg, #f4f4f4);
    border: 1px solid var(--border-color, #ccc);
    border-radius: 8px;
    padding: 5px; /* Reduced padding */
    font-size: 14px;
    color: var(--chat-text, #333);
    white-space: pre-wrap;
    margin-bottom: 10px;
}

/* Chat message formatting */
#chat-box li {
    list-style: none;
    padding: 5px; /* Reduced padding */
    border-bottom: 1px solid var(--border-color, #ddd);
    display: flex;
    flex-direction: column; /* Stack timestamp, username, and message vertically */
    gap: 5px; /* Add space between elements */
}

#chat-box li:last-child {
    border-bottom: none;
}

.timestamp {
    font-size: 0.8em;
    color: var(--date-color, grey);
    margin-right: 10px; /* Add space between timestamp and username */
}

.username {
    font-weight: bold; /* Make username bold */
    color: var(--heading-color, #333); /* Use heading color for username */
}

.message {
    color: var(--text-color, #555); /* Use text color for message */
}

/* Inline chat form */
#chat-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

input, button {
    padding: 10px;
    font-size: 14px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 5px;
    background: var(--input-bg, #fff);
    color: var(--text-color, #000);
}

#username {
    flex: 1;
    max-width: 150px;
}

#message {
    flex: 2;
}

button {
    background-color: var(--button-bg, #404040);
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: var(--button-hover, #6b6b6b);
}

/* Dark mode styles */
.dark-mode #chat-box {
    background: var(--chat-bg, #2c2c2c);
    color: var(--chat-text, #ddd);
    border-color: var(--border-color, #444);
}

.dark-mode input, .dark-mode button {
    background: var(--input-bg, #333);
    color: var(--text-color, #ccc);
    border-color: var(--input-border, #555);
}

.small-rectangle-image {
  width: 100%;
  height: auto;
  display: block;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* spacing between badges */
    padding: 10px;
}

.tech-badges img {
    height: 40px; /* control size of badges */
    width: auto;
    transition: transform 0.2s;
}

.tech-badges img:hover {
    transform: scale(1.1);
}

    
/* Desktop */
@media (min-width: 992px) {
  .small-rectangle-image {
    width: 700px;
  }
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
  .small-rectangle-image {
    width: 600px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .small-rectangle-image {
    width: 100%;
  }
}

.small-rectangle-youtube {
  width: 100%;
  height: 100%;
  display: block;
}

/* Desktop */
@media (min-width: 992px) {
  .small-rectangle-youtube {
    width: 700px;
    height: 370px;

  }
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
  .small-rectangle-youtube {
    width: 600px;
    height: 300px;

  }
}

/* Mobile */
@media (max-width: 767px) {
  .small-rectangle-youtube {
    width: 100%;
    height: 100%;

  }
}


/* Responsive design */
@media (max-width: 768px) {
    #chat-form {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    #username, #message, button {
        width: 100%;
    }

    #chat-box {
        height: 250px;
    }
}

