* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PT Sans', sans-serif;
    background: transparent;
    color: #f5f5dc;
    min-height: 100vh;
    overflow-x: hidden;
}

#container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('items/f-image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* #background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 59, 54, 0.3) 0%, rgba(26, 59, 54, 0.1) 100%);
    z-index: 1;
} */

#content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

#chat-container {
    background: transparent;
    border-radius: 20px;
    padding: 30px;
    border: none;
    box-shadow: none;
}

#messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

#messages::-webkit-scrollbar {
    width: 6px;
}

#messages::-webkit-scrollbar-track {
    background: rgba(218, 165, 32, 0.1);
    border-radius: 3px;
}

#messages::-webkit-scrollbar-thumb {
    background: rgba(218, 165, 32, 0.6);
    border-radius: 3px;
}

.message {
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    max-width: 85%;
}

.character-message {
    background: linear-gradient(135deg, rgba(45, 90, 80, 0.95) 0%, rgba(26, 59, 54, 0.95) 100%);
    backdrop-filter: blur(10px);
    color: #f5f5dc;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(218, 165, 32, 0.3);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
    }
    to {
        box-shadow: 0 0 25px rgba(218, 165, 32, 0.4);
    }
}

.user-message {
    background: rgba(218, 165, 32, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(218, 165, 32, 0.4);
    margin-left: auto;
    border-bottom-right-radius: 5px;
    color: #f5f5dc;
}

#input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#question-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(218, 165, 32, 0.4);
    border-radius: 25px;
    background: rgba(26, 59, 54, 0.9);
    backdrop-filter: blur(10px);
    color: #f5f5dc;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#question-input:focus {
    border-color: #daa520;
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.3);
}

#question-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#ask-button {
    padding: 15px 25px;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #1a3b36;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}

#ask-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

#ask-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #666 0%, #999 100%);
}

.hidden {
    display: none !important;
}

#error-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a3b36 0%, #0d1f1c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    text-align: center;
    padding: 40px;
    background: rgba(26, 59, 54, 0.9);
    border-radius: 20px;
    border: 2px solid rgba(218, 165, 32, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(218, 165, 32, 0.1);
}

.error-content h1 {
    color: #daa520;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.error-content p {
    color: #f5f5dc;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.error-content a {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #1a3b36;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.error-content a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

@media (max-width: 768px) {
    #content {
        padding: 10px;
    }
    
    #chat-container {
        padding: 20px;
    }
    
    .message {
        max-width: 90%;
    }
    
    #input-container {
        flex-direction: column;
    }
    
    #question-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #ask-button {
        width: 100%;
    }
}