/* Main container */
.snv-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f7f7f7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}

/* Controls */
.snv-controls {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    align-items: center;
    flex-wrap: wrap;
}

.snv-btn {
    background: #2271b1;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
}

.snv-btn:hover {
    background: #135e96;
}

.snv-btn:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

.snv-selector-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.snv-selector-container label {
    margin-right: 5px;
    font-size: 14px;
}

#snv-npc-selector {
    min-width: 120px;
    padding: 4px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

#snv-day-display, #snv-time-display, #snv-season-display, #snv-weather-display {
    margin-left: 10px;
    margin-right: 10px;
    font-weight: bold;
    font-size: 14px;
}

/* Simulation area */
.snv-simulation-wrapper {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: #e6f2ff;
}

#snv-simulation {
    width: 100%;
    height: 100%;
    display: block;
}

/* Details panel */
.snv-details-panel {
    padding: 15px;
    background: white;
    border-top: 1px solid #ddd;
    max-height: 250px;
    overflow-y: auto;
}

.snv-details-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

#snv-selected-details {
    font-size: 14px;
    line-height: 1.5;
}

.snv-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.snv-details-section {
    margin-bottom: 15px;
}

.snv-details-section h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.snv-details-section h5 {
    margin: 10px 0 5px 0;
    font-size: 13px;
}

.snv-details-section p {
    margin: 3px 0;
    font-size: 13px;
}

/* Thought log styling */
.snv-thoughts-log {
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
    background: #f9f9f9;
    border-radius: 3px;
}

.snv-thoughts-log p {
    margin: 3px 0;
    padding: 3px 5px;
    border-radius: 3px;
}

.snv-thoughts-log p.happy {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
}

.snv-thoughts-log p.content {
    background-color: rgba(241, 196, 15, 0.1);
    border-left: 3px solid #f1c40f;
}

.snv-thoughts-log p.neutral {
    background-color: rgba(189, 195, 199, 0.1);
    border-left: 3px solid #bdc3c7;
}

.snv-thoughts-log p.unhappy {
    background-color: rgba(230, 126, 34, 0.1);
    border-left: 3px solid #e67e22;
}

.snv-thoughts-log p.miserable, .snv-thoughts-log p.hungry, .snv-thoughts-log p.exhausted, .snv-thoughts-log p.sick {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
}

/* Relationship display */
.snv-relationships {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
}

.snv-relationship {
    display: flex;
    justify-content: space-between;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.snv-relationship.hostile {
    background-color: rgba(231, 76, 60, 0.2);
}

.snv-relationship.negative {
    background-color: rgba(230, 126, 34, 0.2);
}

.snv-relationship.neutral {
    background-color: rgba(189, 195, 199, 0.2);
}

.snv-relationship.positive {
    background-color: rgba(52, 152, 219, 0.2);
}

.snv-relationship.friendly {
    background-color: rgba(46, 204, 113, 0.2);
}

/* Memories display */
.snv-memories {
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
    background: #f9f9f9;
    border-radius: 3px;
}

.snv-memories p {
    margin: 5px 0;
    font-size: 12px;
}

.snv-memories .time-ago {
    color: #7f8c8d;
    font-size: 11px;
    font-style: italic;
}

/* House residents display */
.snv-residents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px;
}

.snv-resident {
    display: flex;
    justify-content: space-between;
    padding: 3px 8px;
    border-radius: 3px;
    background-color: rgba(52, 152, 219, 0.1);
    cursor: pointer;
}

.snv-resident:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.snv-resident .role {
    font-style: italic;
    color: #7f8c8d;
}

/* Log panel */
.snv-log-panel {
   border-top: 1px solid #ddd;
   background: #f8f8f8;
   max-height: 150px;
   overflow-y: auto;
   padding: 10px;
   font-size: 12px;
   font-family: monospace;
}

.snv-log-entry {
   margin: 2px 0;
   padding: 2px 0;
   border-bottom: 1px solid #eee;
}

.snv-log-entry.snv-log-info {
   color: #3498db;
}

.snv-log-entry.snv-log-warning {
   color: #e67e22;
}

.snv-log-entry.snv-log-error {
   color: #e74c3c;
}

.snv-log-entry.snv-log-success {
   color: #2ecc71;
}

.snv-clear-log-btn {
   background: #95a5a6;
   color: white;
   border: none;
   padding: 3px 8px;
   border-radius: 3px;
   font-size: 10px;
   cursor: pointer;
   margin-bottom: 5px;
}

.snv-clear-log-btn:hover {
   background: #7f8c8d;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 782px) {
   .snv-controls {
       flex-wrap: wrap;
   }
   
   .snv-btn {
       margin-bottom: 5px;
   }
   
   .snv-selector-container {
       width: 100%;
       margin: 5px 0;
   }
   
   #snv-day-display, #snv-time-display, #snv-season-display, #snv-weather-display {
       margin: 5px;
   }
   
   .snv-details-grid {
       grid-template-columns: 1fr;
   }
   
   .snv-relationships, .snv-residents {
       grid-template-columns: 1fr;
   }
}