* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


@font-face {
    font-family: 'handwriting1';
    src: url('./fonts/handwriting1.ttf') format('truetype');

}

@font-face {
    font-family: 'handwriting2';
    src: url('./fonts/handwriting2.ttf') format('truetype');
}

@font-face {
    font-family: 'handwriting3';
    src: url('./fonts/handwriting3.ttf') format('truetype');
}

@font-face {
    font-family: 'handwriting4';
    src: url('./fonts/handwriting4.ttf') format('truetype');
}

@font-face {
    font-family: 'handwriting5';
    src: url('./fonts/handwriting5.ttf') format('truetype');
}

body {
    font-family: Arial, sans-serif;
}


.intro {
    margin: 25px 25px 40px 25px;
}

.controls {
    margin: 10px 0;
    text-align: center;
}

.main-div {
    height: 1020px;
}

.side {
    /* height: 95%; */
    /* height: auto; */
    height: 1020px;
}

.main-area {
    transform: scale(0.95);
    transform-origin: top;
}

.editable-area {
    --font-size: 24px;
    width: 816px;
    height: 1020px;
    font-size: var(--font-size);
    line-height: 1.5;
    background-color: white;
    border: 1px solid #ddd;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    color: black;
}

.editable-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background-color: white;
    z-index: 1;
}

.editable-area.with-lines {
    background-image: linear-gradient(rgba(255, 108, 108, 0.3) 1px, transparent 1px);
    background-size: 100% calc(var(--font-size) * 1.5);
    /* Initial value */
}


.margin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 1020px;
    border-right: 1.8px solid rgba(0, 0, 0, 0.3);
    z-index: 1;
    display: none;

}

.editable-area.with-margin .margin-overlay {
    display: block;
}

.content {
    padding-left: 17px;
    padding-top: 9px;
    position: relative;
    z-index: 2;
    padding-right: 5px;
    outline: none;
    font-size: var(--font-size);
}


.editable-area.with-margin::before {
    /* height: calc(var(--font-size) * 3.1); */
    height: 74.4px;
    border-bottom: 1.8px solid rgba(0, 0, 0, 0.3);
}

.editable-area.with-margin .content {
    padding-left: 86px;
    padding-top: 86px;
    padding-right: 3px;
}


.tooltip {
    position: relative;
    /* display: inline-block; */
    cursor: pointer;
    bottom: 19px;
    left: 6px;
    z-index: 10;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 130px;
    font-size: 13px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -130px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.image-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
}

.image-container .img-wrapper {
    margin: 10px;
    text-align: center;
    display: inline-block;
}

.image-container img {
    width: 250px;
}

.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 6px;
    background-color: #4CAF50;
    color: white;
    border-radius: 7px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
}

.download-btn:hover {
    background-color: #45a049;
}

.remove-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 6px;
    background-color: #e63946;
    color: white;
    border-radius: 7px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
}

.remove-btn:hover {
    background-color: #d62828;
}


.kofi-button:hover img {
    filter: brightness(0.95);

}

@media (max-width: 640px) {

    .main-div {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .side {
        width: 100%;
        height: auto;
    }


    .main-div {
        height: auto;
    }

    .editable-area {
        width: 100%;
        min-width: 100%;
        overflow-y: hidden;
    }

    .margin-overlay {
        width: 50px;
        /* Adjust margin overlay width for smaller screens */
    }
}


@media (min-width: 641px) and (max-width: 1024px) {
    .side {
        width: 100%;
        height: auto;
    }

    .main-area {
        transform: scale(0.95);
        transform-origin: top left;
        width: 100%;
    }

    .main-div {
        height: auto;
    }

    .editable-area {
        transform-origin: top left;
        width: auto;
        overflow: hidden;
    }

    .coffee {
        transform: scale(0.6);
        transform-origin: center;
        margin: 0 auto;
    }
}

/* ... (previous styles remain the same) ... */

/* Dark mode styles */
.dark body {
    background-color: #1a202c;
    color: #e2e8f0;
}

.dark .bg-white {
    background-color: #2d3748;
}

.dark .text-gray-800 {
    color: #e2e8f0;
}

.dark .text-gray-600 {
    color: #a0aec0;
}

.dark .border-gray-200 {
    border-color: #4a5568;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.dark .bg-blue-600 {
    background-color: #4299e1;
}

.dark .bg-green-600 {
    background-color: #38a169;
}

.dark .hover\:bg-blue-700:hover {
    background-color: #3182ce;
}

.dark .hover\:bg-green-700:hover {
    background-color: #2f855a;
}

.dark .editable-area {
    background-color: white;
    border-color: #4a5568;
    color: black;
}

.dark .editable-area.with-lines {
    background-image: linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px);
}

.dark .margin-overlay {
    border-right-color: rgba(0, 0, 0, 0.3);
}

.dark .editable-area.with-margin::before {
    border-bottom-color: rgba(0, 0, 0, 0.3);
}

/* Improved dropdown and button styles for dark mode */
.dark select,
.dark input[type="file"]::file-selector-button {
    background-color: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

.dark select:hover,
.dark input[type="file"]::file-selector-button:hover {
    background-color: #2d3748;
}

/* Scrollbar styles for dark mode */
.dark ::-webkit-scrollbar {
    width: 12px;
}

.dark ::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: #4a5568;
    border-radius: 6px;
    border: 3px solid #2d3748;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #718096;
}

/* For Firefox */
.dark * {
    scrollbar-color: #4a5568 #2d3748;
}


/* Styles for range input (sliders) */
input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none   ;
    width: 85%;
    height: 5px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

/* Slider thumb styles */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    /* Blue color for light mode */
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    /* Blue color for light mode */
    cursor: pointer;
}

/* Dark mode styles */
.dark input[type="range"] {
    background: #4a5568;
    /* Darker background for the slider track in dark mode */
}

.dark input[type="range"]::-webkit-slider-thumb {
    background: #a0aec0;
    /* Softer gray color for dark mode */
}

.dark input[type="range"]::-moz-range-thumb {
    background: #a0aec0;
    /* Softer gray color for dark mode */
}

/* Hover effects */
input[type="range"]:hover {
    opacity: 1;
}

.dark input[type="range"]:hover::-webkit-slider-thumb {
    background: #cbd5e0;
    /* Lighter gray on hover in dark mode */
}

.dark input[type="range"]:hover::-moz-range-thumb {
    background: #cbd5e0;
    /* Lighter gray on hover in dark mode */
}

/* ... (previous styles remain the same) ... */

/* Checkbox styles */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #3b82f6; /* Blue color for light mode */
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
}

input[type="checkbox"]:checked {
    background-color: #3b82f6; /* Blue color for light mode */
}

input[type="checkbox"]:checked::after {
    content: '\2714'; /* Checkmark symbol */
    font-size: 14px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Dark mode checkbox styles */
.dark input[type="checkbox"] {
    border-color: #a0aec0; /* Softer gray color for dark mode */
}

.dark input[type="checkbox"]:checked {
    background-color: #a0aec0; /* Softer gray color for dark mode */
}

/* Hover effects */
input[type="checkbox"]:hover {
    border-color: #2563eb; /* Darker blue on hover in light mode */
}

.dark input[type="checkbox"]:hover {
    border-color: #cbd5e0; /* Lighter gray on hover in dark mode */
}

.dark input[type="checkbox"]:checked:hover {
    background-color: #cbd5e0; 
}

