body {
    font-family: 'Lato', sans-serif;
    background-color: #e0f7fa;
    color: #2c2c2c;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #0d47a1;
    color: #e3f2fd;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 4px solid #1e88e5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px #1565c0;
}

#conversation-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#conversation {
    background-color: #ffffff;
    border: 2px solid #0d47a1;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.message-card {
    border: 1px solid #64b5f6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.message-content {
    display: flex;
    align-items: flex-start;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.portrait {
    float: left;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin-right: 15px;
    margin-bottom: 10px;
    border: 2px solid #1e88e5;
}

.speaker {
    font-weight: bold;
    font-size: 1.1em;
}

.dm {
    background: linear-gradient(120deg, #dbd9f1 0%, #c9c9ff 100%);    
}

.player {
    background: linear-gradient(120deg, #bbdefb 0%, #e3f2fd 100%);    
}

.text-content {
    flex: 1;
    min-width: 0;
}

.ooc-content {
    clear: both;
    margin-top: 10px;
    padding: 10px;
    background-color: #e1f5fe;
    border-radius: 5px;
    border: 1px solid #64b5f6;
}

.ooc-toggle {
    display: block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #0d47a1;
    color: #e3f2fd;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.ooc-toggle:hover {
    background-color: #1e88e5;
}

button {
    display: block;
    width: 200px;
    padding: 10px;
    background-color: #0d47a1;
    color: #e3f2fd;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: center;
}

button:hover {
    background-color: #1e88e5;
}

.button-disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    display: none;
}

#intro {
    background-color: #e1f5fe;
    border: 1px solid #0d47a1;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-message {
    background-color: #ffcccc;
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

.spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0,0,0,.3);
    border-radius: 50%;
    border-top-color: #0d47a1;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-container {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 5px;
}

.generated-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
}

.image-loading-placeholder {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    font-style: italic;
    color: #666;
}

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

    .message-card {
        padding: 10px;
    }

    .portrait {
        width: 48px;
        height: 48px;
    }

    #start-button {
        width: 100%;
    }
}

/* Container for buttons */
#button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#continue-button:hover, #influence-button:hover {
    background-color: #1976d2;
}

/* Influence form styling */
#influence-form {
    margin: 20px;
    background-color: #e1f5fe;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 90%;
}

#ooc-input, #ic-input {
    height: 120px;
}

#influence-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#influence-form select, #influence-form textarea {
    width: 90%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #64b5f6;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

#submit-influence:hover {
    background-color: #1565c0;
}
