body { 
    background: #ffe6ea; /* Softer pink background */
    padding: 0;
    margin: 0;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #664444; /* Warm brown text color */
    background-image: radial-gradient(circle, #fff6f8 10%, transparent 10%),
        radial-gradient(circle, #fff6f8 10%, transparent 10%);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    /* Creates a softer sprinkle-like pattern */
}

h1 { 
    color: #d44d5c; /* Deeper raspberry color for better contrast */
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255,133,162,0.2);
    font-size: 2.5em;
    margin: 20px 0;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "\1F9C1";  /* Unicode for cupcake emoji */
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
}

.editor, .preview {
    width: 50%;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff9f2; /* Warm vanilla cake color */
    border-radius: 25px;
    box-shadow: 0 8px 0 #ffdab9, 0 15px 20px rgba(0,0,0,0.1);
    /* Looks like layered cake with peachy frosting at the bottom */
}

.preview {
    border-left: 2px dashed #ffd1dc; /* Soft pink dashed border like piping */
    width: 50%;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fffaf4; /* Slightly different vanilla shade for contrast */
    
}

.CodeMirror {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 93% !important;
    width: 100%;
    background-color: #fffbf7 !important; /* Warm white background */
    color: #664444 !important; /* Warm brown text */
    font-size: 15px;
    padding: 10px;
    border-radius: 15px;
}

.CodeMirror-gutters {
    background-color: #fff5f7 !important; /* Soft pink for gutters */
    border-right: 1px dashed #ffd1dc !important; /* Matching the dashed border theme */
}

#code-editor {
    flex: 1;
    position: relative;
    /* Remove overflow: auto from here since CodeMirror handles scrolling */
}

#container {
    display: flex;
    height: 100vh;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.5); /* Slight white overlay */
}

.snippet-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: linear-gradient(45deg, #e64e66, #ff7088);  /* Deeper pink for better contrast */
    color: #fff;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    font-size: 20px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    box-shadow: 0 4px 0 #d44d5c;  /* Darker shadow */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);  /* Better text readability */
}

.dropbtn::before {
    content: "\1F370";  /* Unicode for cake emoji */
    margin-right: 8px;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.1));
}

.dropbtn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #d44d5c;
    background: linear-gradient(45deg, #ff7088, #ff8fa3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff6fa;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(255,133,162,0.2);
    z-index: 1;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #ffe0ed;
    /* Sprinkle border pattern */
    background-image: 
        linear-gradient(90deg, #ff85a2 50%, transparent 50%),
        linear-gradient(90deg, #ff85a2 50%, transparent 50%),
        linear-gradient(0deg, #ff85a2 50%, transparent 50%),
        linear-gradient(0deg, #ff85a2 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 15px 2px, 15px 2px, 2px 15px, 2px 15px;
    background-position: 0px 0px, 0px 100%, 0px 0px, 100% 0px;
}

.dropdown-content a {
    color: #ff85a2;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-content a::before {
    content: "\1F9C1";  /* Unicode for cupcake emoji */
    margin-right: 8px;
    font-size: 1.2em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-content a:hover::before {
    opacity: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: dropdownAppear 0.4s ease;
}

@keyframes dropdownAppear {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-content a:hover {
    background-color: #fff0f5;
    color: #ff5c8a;
    padding-left: 25px;
}

#html-output {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff6fa;
    border-radius: 25px;
    box-shadow: inset 0 0 20px rgba(255,133,162,0.2);
    padding: 25px;
    position: relative;
}

#html-output::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(45deg, #ffe0ed 25%, transparent 25%) -5px 0,
                linear-gradient(-45deg, #ffe0ed 25%, transparent 25%) -5px 0,
                linear-gradient(45deg, transparent 75%, #ffe0ed 75%),
                linear-gradient(-45deg, transparent 75%, #ffe0ed 75%);
    background-size: 10px 10px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    /* Creates a decorative frosting-like border at the bottom */
}

#apply-button {
    background: linear-gradient(45deg, #e64e66, #ff7088);
    color: #fff;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    font-size: 20px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    box-shadow: 0 4px 0 #d44d5c;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

#apply-button::before {
    content: "\1F9C1";  /* Unicode for cupcake emoji */
    margin-right: 8px;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.1));
}

#apply-button:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #d44d5c;
    background: linear-gradient(45deg, #ff7088, #ff8fa3);
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

#container {
    display: flex;
    height: 100vh;
}

.editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Prevent scrolling at container level */
}

.snippet-menu {
    flex-shrink: 0;
}

#code-editor {
    flex: 1;
    position: relative;
    /* Remove overflow: auto from here since CodeMirror handles scrolling */
}

/* CodeMirror styles are defined above */

.button-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.button-container button {
    padding: 8px 16px;
    border: none;
    border-radius: 15px;
    background: #ff9eaf;
    color: white;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 3px 0 #ff7c91;
}

.button-container button:hover {
    background: #ff7c91;
    transform: translateY(-2px);
}

.button-container button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #ff7c91;
}

.editor-buttons {
    margin-bottom: 10px;
}

.editor-buttons button {
    background: linear-gradient(45deg, #e64e66, #ff7088);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.editor-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.editor-buttons button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.button-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.button-row:first-child button {
    width: 100%;
}

.button-row:not(:first-child) {
    justify-content: space-between;
}

.button-row:not(:first-child) button {
    flex: 1;
}

/* Apply styles to all buttons in the preview section */
.preview-buttons button {
    background: linear-gradient(45deg, #e64e66, #ff7088);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.preview-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.preview-buttons button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Make the Bake button stand out more */
#apply-button {
    font-size: 1.2em;
    padding: 12px 24px;
}
