/* Global Styles */
body {
    margin: 0;
    height: 100vh;
    background-color: #ffffff; /* White */
    font-family: 'Arial', sans-serif;
    color: #333333; /* Dark gray */
}

/* Index Page Styles */
#index-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#message {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1em;
    color: #666666; /* Medium gray */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    white-space: nowrap;
    width: fit-content;
    max-width: 90%;
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    border-radius: 8px;
}

#rabbit {
    width: 150px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#rabbit:hover {
    transform: scale(1.05);
}

/* Analysis Page Styles */
#analysis-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Header container for dream label and rabbit */
#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    padding: 0;
}

/* Thinking Animation Styles */
#thinking-animation {
    display: flex;
    align-items: center;
}

#thinking-animation img {
    width: 70px;
    height: auto;
    animation: bounce 1s infinite alternate;
}

#static-rabbit {
    display: flex;
    align-items: center;
}

#static-rabbit img {
    width: 70px;
    height: auto;
    transition: transform 0.3s ease;
}

#static-rabbit img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* Hidden class for toggling visibility */
.hidden {
    display: none !important;
}

/* Dream label button specific styling */
#dream-label {
    margin: 5px;
    padding: 10px 20px;
    background-color: #cfd8dc; /* Light blue-gray */
    color: #455a64; /* Dark blue-gray */
    border-radius: 8px;
    box-shadow: 3px 3px 6px rgba(69, 90, 100, 0.1);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.button-group button {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    white-space: nowrap;
}

textarea {
    width: 100%;
    height: 200px;
    margin: 20px 0;
    padding: 15px;
    background-color: #eceff1; /* Match page background */
    border: 1px solid rgba(69, 90, 100, 0.1); /* Subtle shaded border */
    border-radius: 8px;
    font-family: inherit;
    box-shadow: 3px 3px 6px rgba(69, 90, 100, 0.1);
    font-size: 0.9em;
    color: #455a64; /* Dark blue-gray */
    line-height: 1.5;
    resize: none;
}

/* Placeholder styling */
::placeholder {
    font-size: 0.66em; /* 10% larger than previous 0.6em */
    color: #90a4ae; /* Slightly darker than previous #b0bec5 */
    opacity: 0.8; /* Slightly higher opacity */
}

/* Different browser support */
::-webkit-input-placeholder {
    font-size: 0.66em;
    color: #90a4ae;
    opacity: 0.8;
}

::-moz-placeholder {
    font-size: 0.66em;
    color: #90a4ae;
    opacity: 0.8;
}

:-ms-input-placeholder {
    font-size: 0.66em;
    color: #90a4ae;
    opacity: 0.8;
}

button {
    background-color: #cfd8dc; /* Light blue-gray */
    color: #455a64; /* Dark blue-gray */
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    box-shadow: 3px 3px 6px rgba(69, 90, 100, 0.1);
    text-align: center;
    display: inline-block;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    width: fit-content;
}

button:hover {
    background-color: #b0bec5; /* Lighter blue-gray */
}

#analysis-output {
    width: 100%;
    height: 200px;
    margin: 20px 0;
    padding: 15px;
    background-color: #eceff1; /* Match page background */
    border: 1px solid rgba(69, 90, 100, 0.1); /* Subtle shaded border */
    border-radius: 8px;
    box-shadow: 3px 3px 6px rgba(69, 90, 100, 0.1);
    display: none;
    font-size: 0.9em;
    color: #455a64; /* Dark blue-gray */
    line-height: 1.5;
    overflow-y: auto;
}

#save-btn {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Responsive Styles */
@media (max-width: 600px) {
    #index-container {
        padding: 20px;
    }
    
    #rabbit {
        width: 80px;
    }
    
    #message {
        top: 10px;
        left: 10px;
        font-size: 0.9em;
        padding: 8px 16px;
    }
    
    #analysis-container {
        padding: 15px;
        box-sizing: border-box;
        width: 100%;
    }
    
    textarea {
        height: 150px;
        margin: 10px 0;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    #analysis-output {
        height: 150px;
        margin: 10px 0;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .button-group button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* Prevent zoom on input focus */
input, textarea, select {
    font-size: 16px;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
}
