body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('output-onlinegiftools.gif');
    background-size: cover;
    background-repeat: repeat;
    background-position: center;
    color: #e0e0e0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(30, 30, 30, 0.8);
    color: #ffffff;
    padding: 3rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 300;
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #4a90e2;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #357abd;
}

footer {
    background-color: rgba(10, 10, 10, 0.8);
    color: #bbbbbb;
    padding: 1.5rem;
    width: 100%;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

#interests-section {
    background-color: rgba(30, 30, 30, 0.8);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#interests label {
    background-color: #444444;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#interests label:hover {
    background-color: #555555;
    transform: translateY(-2px);
}

#interests input:checked + span {
    color: #ffffff;
    font-weight: bold;
}

#interests input {
    accent-color: #4a90e2;
}

#chat-window {
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#messages {
    height: 400px;
    overflow: hidden;
    background-color: #2a2a2a; /* Warmer gray */
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 2px, transparent 2px); /* Subtle grid noise texture for coziness */
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

#messages-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.local-message,
.remote-message,
.system-message {
    font-family: 'Cascadia Code', monospace;
    font-weight: 600;
    font-size: 1.2rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Slight texture effect */
    padding: 1rem 1.5rem;
    border-radius: 20px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.local-message {
    align-self: flex-end;
    background-color: #cccccc; /* Lighter gray */
}

.remote-message {
    align-self: flex-start;
    background-color: #888888; /* Darker gray */
}

.system-message {
    align-self: center;
    background-color: #444444;
    color: #bbbbbb;
    font-style: italic;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#message-input {
    flex: 1;
    padding: 1rem;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 8px;
}

#send-message, #end-chat {
    padding: 1rem 1.5rem;
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-message:hover, #end-chat:hover {
    background-color: #357abd;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#user-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.bubble {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.gray {
    background-color: gray;
}

.green {
    background-color: #4caf50;
}