/*body{
    background: linear-gradient(135deg, #0f172a 0%, #111827 50%, #1f2937 100%);
    color: #e5e7eb;
    font-family: 'Roboto',"Roboto Fallback", sans-serif;
    font-size: 1.2em;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/


.loadmore {
    margin-bottom: 60px;
    margin-top: 8px;
    /* padding: 5px; */
    text-align: center;
    /* font-size: large; */
    /* background-color: #fff; */
    /* color: #000; */
    border-radius: 4px;
}

#result {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* text-align: center; */
    margin: 8px;
}

.input-group {
    margin: 2px 6px;
}

.content {
    padding: 8px 12px;
    background-color: rgba(255,255,255,0.06);
    border: 1px dashed #6c757d;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    min-height: 50px;
    max-height: 70px;
    border-radius: 8px;
    margin:2px;
    font-size: 1.5em;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    font-weight: 500;
    overflow: hidden;
}

.content .content-text {
    flex: 1 1 auto;
    word-break: break-word;
    line-height: 1.3;
    max-height: 54px; /* Approximately 2 rows */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Custom scrollbar for content text */
.content .content-text::-webkit-scrollbar {
    width: 6px;
}

.content .content-text::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.content .content-text::-webkit-scrollbar-thumb {
    background: rgba(108,117,125,0.6);
    border-radius: 3px;
}

.content .content-text::-webkit-scrollbar-thumb:hover {
    background: rgba(108,117,125,0.8);
}

.content:hover{
    border-color: #495057;
    background-color: rgba(255,255,255,0.08);
}

/* Sticky input container wrapper */
.fancy-font-container > h1,
.fancy-font-container > br:nth-of-type(1),
.fancy-font-container > br:nth-of-type(2),
.fancy-font-container > .input-wrapper-container {
    position: sticky;
    top: 10px;
    z-index: 100;
    background: #ffffff;
    padding-top: 10px;
}

/* Input wrapper with border around everything */
.input-wrapper-container {
    position: relative;
    width: 99%;
    margin: 4px auto 15px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #6c757d;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.95);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Input field with larger font */
textarea,
.form-control.fancytext {
    height: 100px;
    border-radius: 6px;
    font-size: 1.8em;
    text-align: center;
    width: 100% !important;
    padding: 10px !important;
    margin: 0;
    background-color: rgba(255,255,255,0.95) !important;
    color: #000000;
    border: 1px solid #dee2e6 !important;
    display: block;
    box-sizing: border-box;
    font-weight: 500;
    box-shadow: none;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

/* Custom scrollbar for input field */
textarea.fancytext::-webkit-scrollbar,
.form-control.fancytext::-webkit-scrollbar {
    width: 6px;
}

textarea.fancytext::-webkit-scrollbar-track,
.form-control.fancytext::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

textarea.fancytext::-webkit-scrollbar-thumb,
.form-control.fancytext::-webkit-scrollbar-thumb {
    background: rgba(108,117,125,0.6);
    border-radius: 3px;
}

textarea.fancytext::-webkit-scrollbar-thumb:hover,
.form-control.fancytext::-webkit-scrollbar-thumb:hover {
    background: rgba(108,117,125,0.8);
}

/* Buttons outside textarea on the right - stacked vertically */
.textarea-actions-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.textarea-actions-inline .btn {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}

.textarea-actions-inline .btn i {
    font-size: 0.85rem;
}

.textarea-actions-inline .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}



@media screen and (max-width: 768px) {
    #result {
        display: block;
        margin: 4px 0;
    }

    .content {
        width: 100%;
        min-height: 48px;
        max-height: 65px;
        font-size: 1em;
        border-radius: 8px;
        cursor: pointer;
    }
    
    .content .content-text {
        max-height: 50px;
        overflow-y: auto;
    }
    
    .input-wrapper-container {
        gap: 6px;
        padding: 6px;
    }
    
    textarea,
    .form-control.fancytext {
        font-size: 1.2em;
        height: 90px;
        padding: 8px !important;
    }
    
    .textarea-actions-inline .btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .textarea-actions-inline .btn i {
        font-size: 0.75rem;
    }
}


/* Tighter vertical spacing + side margins for each output row */
#result{
  display: grid !important;
  grid-template-columns: 1fr !important; /* always one per row */
  gap: 5px !important;                 /* 5px gap between rows */
}

/* Always one per row across all breakpoints */
@media (min-width: 992px){
  #result{ grid-template-columns: 1fr !important; }
}

#result .input-group{
  width: 100% !important;
  margin: 0 auto 5px !important;           /* 5px bottom margin */
}

/* Optional: slightly tighter inner padding for the preview bar */
#result .content{
  display: flex;
  width: 100% !important;
  padding: 5px;                  /* 5px padding */
  box-sizing: border-box;
  margin: 0 !important;
}

/* (Optional) reduce side margins on very small screens */
@media (max-width: 420px){
  #result .input-group{ margin: 0 auto 5px !important; }
  #result{ gap: 5px !important; }
}

/* Responsive widths: input and outputs */
@media (min-width: 992px){
  textarea,
  .form-control.fancytext{ width: 100% !important; }
  .input-wrapper-container{ width: 99% !important; }
  #result .input-group{ width: 99% !important; }
}
