body {
    background-color: #f3f3f3;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
}

.ui.container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.nyuk {
    font-family: 'Luckiest Guy', cursive;
    font-size: 7em;
    text-align: center;
    color: #d32f2f;
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 10px;
}

.nyuk span {
    display: inline-block;
    opacity: 0;
    animation: letterAnimation 1s ease-in-out forwards;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.nyuk span:nth-child(1) { animation-delay: 0s; }
.nyuk span:nth-child(2) { animation-delay: 0.2s; }
.nyuk span:nth-child(3) { animation-delay: 0.4s; }
.nyuk span:nth-child(4) { animation-delay: 0.6s; }

.subtitle {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5em;
    text-align: center;
    color: #d32f2f;
    opacity: 0;
    animation: subtitleFadeIn 2s ease-in-out forwards;
    animation-delay: 1.5s;
    margin-top: 15px;
    margin-bottom: 5px;
    line-height: .75;
}

.subtitle .nowrap {
    white-space: nowrap;
}

.ui.form .field label {
    font-size: 1.2em;
    color: #555;
    font-family: 'Luckiest Guy', cursive;
}

.ui.form .field input, .ui.form .field select {
    font-size: 1em;
    font-family: 'Arial', sans-serif;
    width: 100%;
}

.ui.form .field input {
    margin-bottom: 10px;
}

.ui.primary.button, .ui.secondary.button {
    background-color: #d32f2f;
    color: #fff;
    font-size: 1.2em;
    font-family: 'Luckiest Guy', cursive;
    font-weight: normal;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.ui.secondary.button {
    font-size: 1.2em;
    font-family: 'Luckiest Guy', cursive;
    font-weight: normal;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.ui.button {
    margin-bottom: 10px;
    font-family: 'Luckiest Guy', cursive;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.ui.message {
    font-size: 1.1em;
    text-align: center;
}

.pie {
    position: absolute;
    font-size: 4em;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    pointer-events: none;
}

@keyframes pieAnimationLeft {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

@keyframes pieAnimationRight {
    0% { transform: translateX(-100vw); }
    100% { transform: translateX(100vw); }
}

.pie-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: none;
}

.collapsible {
    background-color: #d32f2f;
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    max-width: 400px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.5em;
    font-family: 'Luckiest Guy', cursive;
    margin-top: 20px;
    border-radius: 5px;
}

.collapsible:after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    font-family: 'Luckiest Guy', cursive;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #d32f2f;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

@keyframes letterAnimation {
    0% { transform: rotate(0) translateX(0); opacity: 0; }
    100% { transform: rotate(360deg) translateX(0); opacity: 1; }
}

@keyframes subtitleFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.feature-item {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.generated-message {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.5em;
    color: #2A5CA0;
    margin-bottom: 10px;
    text-align: center;
}

.audio-container {
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #E3F2FD;
    border: 2px solid #1976D2;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.audio-player {
    width: 100%;
    margin-top: 10px;
}

.download-button {
    background-color: transparent;
    color: #d32f2f;
    border: none;
    padding: 5px;
    font-size: 1em;
    font-family: 'Luckiest Guy', cursive;
    cursor: pointer;
    border-radius: 5px;
    position: absolute;
    bottom: 0px;  /* Lowered by 10px */
    left: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.download-button:hover {
    background-color: #b71c1c;
    color: white;
}

.download-button i {
    margin: 0;
}

.panel {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

.field-spacing {
    margin-bottom: 15px;
}

.audio-message {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f5f5f5;
    position: relative;
}

.audio-message .info {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audio-message .voice-name {
    font-weight: bold;
}

.audio-message .remove-button {
    background-color: transparent;
    color: #f44336;
    padding: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    bottom: 0px;  /* Lowered by 10px */
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.audio-message .remove-button:hover {
    background-color: #d32f2f;
    color: white;
}

.audio-message .move-icon {
    cursor: move;
    font-size: 1.5em;
    color: #d32f2f;
    margin-left: 10px;
}

/* Existing CSS... */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
}


/* New Styles for Roast Tool */
.ui.form .field label,
.label {
    font-size: 1.2em;
    color: #555;
    font-family: 'Luckiest Guy', cursive;
}

.image-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.image-container {
    position: relative;
    flex: 1 1 auto;
    padding: 10px;
    max-width: 45%;
}

.uploaded-image {
    max-width: 100%;
    height: auto;
    border: 2px solid black;
    border-radius: 10px;
}

.loading-spinner {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    display: none;
    position: absolute;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.field-spacing {
    margin-bottom: 15px;
}

#roastResult {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    resize: vertical;
    box-sizing: border-box;
    font-family: Arial, sans-serif; /* Original body font */
    font-size: 1em; /* Original body font size */
}

/* Additional CSS for Pie Mode */
.pie-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.pie {
    position: absolute;
    font-size: 2rem;
}

@keyframes pieAnimationLeft {
    0% { transform: translateX(-100vw); }
    100% { transform: translateX(100vw); }
}

@keyframes pieAnimationRight {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

/* Holy Christ Mode */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.snow {
    position: absolute;
    font-size: 2rem;
    animation: snowFall 10s linear infinite;
    pointer-events: none;
}

@keyframes snowFall {
    from { transform: translateY(-50px); }
    to { transform: translateY(100vh); }
}

/* Toast Messages */
.toast-message {
    font-size: 1.5em;
    text-align: center;
    font-family: 'Blambot', cursive;
    color: #2A5CA0;
}
