/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

*::-webkit-scrollbar {
    width: 12px;
}

*::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 10px;
    border: 3px solid #333;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #007bff #333;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: #121212;
    color: #E0E0E0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

main {
    display: block;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

a {
    background-color: transparent;
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline dotted;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

img {
    border-style: none;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    appearance: none; /* Standard property for compatibility */
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    appearance: button; /* Standard property for compatibility */
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
}

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    appearance: textfield; /* Standard property for compatibility */
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    appearance: button; /* Standard property for compatibility */
    font: inherit;
}

details {
    display: block;
}

summary {
    display: list-item;
}

template {
    display: none;
}

[hidden] {
    display: none;
}

.title-bar {
    background-color: #1E1E1E;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display:flex;
    align-items: center;
    justify-content: center;
    gap:30px;
}

.title-bar h1 {
    margin: 0;
    font-size: 1.5em;
}

.title-bar button{
    font-size: 1.2em;
    border:1px solid white;
    border-radius: 50%;
    height:2em; width:2em;
    cursor:pointer;
    margin-right:-2em;
}

.left-column, .middle-column, .right-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tabs {
    display: flex;
    width:max-content;
    border-radius: 10px;
}

.tabs .tab:first-child{
    border-radius: 10px 0 0 10px;
}

.tabs .tab:last-child{
    border-radius: 0 10px 10px 0;
}

.tab {
    background-color: #1E1E1E;
    color: #E0E0E0;
    border: 1px solid #333;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius:10px;
}

.tab.active {
    background-color: #00BCD4;
    color: #FFFFFF;
    border-bottom: none;
}

.tab-content {
    display: none;
    width: 100%;
    background-color: #1E1E1E;
    border: 1px solid #333;
    border-radius: 0 0 5px 5px;
    overflow-y: auto;
    flex-grow:1;
    border-radius:10px;
}

.tab-content.active {
    display: block;
}

.preview-container {
    background-color: #1E1E1E;
    border-radius: 10px;
    width: 100%;
    min-height: 400px;
    display:flex;
    align-items: center;
    justify-content: center;
    flex-grow:1;
}

.preview-container::-webkit-scrollbar {
    width: 12px;
}

.preview-container::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 10px;
    border: 3px solid #333;
}

.box {
    width: 200px;
    height: 200px;
    background-color: #ffffff;
    margin: 0 auto;
}

.controls{
    display:flex; flex-direction: column;
    gap:20px;
    padding:20px;
    background-color: whitesmoke;
    margin-top:20px;
    color:black;
    border-radius:10px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.controls.dragging {
    opacity: 0.5;
}

.controls.removing {
    animation: fadeOut 0.3s ease-out;
}

.controls.flashing {
    animation: flash 0.3s ease-out;
}

.controls.moving-up {
    animation: moveUp 0.3s ease-out;
}

.controls.moving-down {
    animation: moveDown 0.3s ease-out;
}

.drag-handle {
    display: none;
}

.controls-container{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
}

.controls-container {
    display: none;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.controls-container.open {
    display: grid;
    animation: grow 0.3s ease-out;
}

.controls-container.closed {
    animation: shrink 0.3s ease-out;
}

.button-group{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:20px;
}

.move-up, .move-down {
    background-color: transparent;
    color: black;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

#shadows-container{
    flex-grow:1;
    overflow-y:auto;
    background-color:#1e1e1e;
}

.move-up:hover, .move-down:hover {
    color: #333;
}

.move-up.disabled, .move-down.disabled {
    opacity: 0;
    pointer-events: none;
}

.shadow-title {
    font-size: 1.4em;
    font-weight: bold;
    color: black;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shadow-title span {
    flex-grow: 1;
    text-align: left;
    margin-left: 10px;
}

.toggle-controls {
    background-color: transparent;
    color: black;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

.toggle-controls:hover {
    color: #333;
}

.controls-container {
    display: none;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.controls-container.open {
    display: grid;
    max-height: 1000px; /* Arbitrary large value to allow for smooth transition */
}

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

.toggle 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: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

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

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

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

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

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

.toggle-shadow input:checked + .slider {
    background-color: #007bff;
}

.toggle-shadow input:checked + .slider:before {
    transform: translateX(14px);
}

.css-output {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    position: relative;
}

#css-code {
    width: 100%;
    height: 200px;
    background-color: #1E1E1E;
    color: #E0E0E0;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow: auto;
    word-wrap: break-word;
    border:1px dotted white;
}

#css-code .property {
    color: #a2d5ff;
}

#css-code .value {
    color: #ffc15d;
}

#css-code .punctuation {
    color: #ffffff;
}

#css-code::selection {
    background: #264f78;
}

#copy-css {
    background-color: transparent;
    border: 3px dotted #00BCD4;
    color: #00BCD4;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    bottom: 10px;
    right: 10px;
    transition:background-color 0.3s, color 0.3s;
    font-weight:bold;
}

#copy-css:hover {
    background-color: #0097A7;
    color: #FFFFFF;
}

#add-shadow, .delete-shadow {
    background-color: #4CAF50;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition:background-color 0.3s;
}

#add-shadow:hover {
    background-color: #388E3C;
}

.delete-shadow {
    background-color: transparent;
    color: #F44336;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

.delete-shadow:hover {
    color: #D32F2F;
}

.examples-container h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #E0E0E0;
}

.examples-carousel {
    background-color: #1E1E1E;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    row-gap:100px;
    padding: 40px;
    flex-grow: 1;
    overflow-y: auto;
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: #007bff #333;
}

.examples-carousel::-webkit-scrollbar {
    width: 12px;
}

.examples-carousel::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

.examples-carousel::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 10px;
    border: 3px solid #333;
}

.examples-carousel .box {
    width: 70px;
    height: 70px;
    background-color: #ffffff;
    cursor: pointer;
    transition: transform 0.3s;
}

.examples-carousel .box:hover {
    transform: scale(1.05);
}

.canvas-settings {
    padding: 20px;
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
    flex-grow: 1;
    overflow-y: auto;
}

.canvas-settings .setting {
    margin-bottom: 20px;
}

.canvas-settings .setting label {
    display: block;
    margin-bottom: 5px;
    color: #E0E0E0;
}

input[type="color"],
input[type="range"],
select {
    width: 100%;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 15px;
    background: #72c0ff;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    cursor:pointer;
    border-radius: 100vw;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: hsl(211, 100%, 26%);
    cursor: pointer;
    border-radius: 100vw;
}

.canvas-settings .setting .border-radius-unit,
.canvas-settings .setting .border-radius-input {
    display: inline-block;
    width: auto;
    margin-left: 10px;
}

.canvas-settings .setting .border-radius-input {
    width: 60px;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #121212;
    color: #ffffff;
}

.page-columns {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.first-column, .second-column, .third-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap:20px;

}

.first-column {
    flex: 1;

}

.second-column {
    flex: 2;
    justify-content: center;
}

.third-column {
    flex: 1;
}

.google-ad-placeholder {
    text-align: center;

    padding: 10px;
    background-color: #1e1e1e;
    color: #ffffff;
    border-radius: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes moveUp {
    from {
        transform: translateY(20px);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes moveDown {
    from {
        transform: translateY(-20px);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes flash {
    0% {
        background-color: #ffeb3b;
    }
    100% {
        background-color: whitesmoke;
    }
}

@keyframes grow {
    from {
        max-height: 0;
    }
    to {
        max-height: 1000px; /* Arbitrary large value to allow for smooth transition */
    }
}

@keyframes shrink {
    from {
        max-height: 1000px; /* Arbitrary large value to allow for smooth transition */
    }
    to {
        max-height: 0;
    }
}

@keyframes slideIn {
    from {
        top: -50px;
        opacity: 0;
    }
    to {
        top: 10px;
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        top: 10px;
        opacity: 1;
    }
    to {
        top: -50px;
        opacity: 0;
    }
}

.toast {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s forwards;
}

.toast.hide {
    animation: slideOut 0.5s forwards;
}

.toast i {
    font-size: 1.5em;
}

.help-button {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    margin-left: 10px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    display: none;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 0;
    border: 1px solid #333;
    width: 80%;
    max-width: 600px;
    max-height: 60vh;
    border-radius: 10px;
    color: white;
    animation: slideIn 0.3s ease-out;
    overflow-y: auto;

}

.modal-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
    border-bottom: 1px solid #444;
    border-radius: 10px 10px 0 0;
    position:sticky;
    top:0px;
}

.modal-title-bar h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-button {
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body p,
.modal-body h3,
.modal-body ul,
.modal-body ol {
    margin: 10px 0;
}

.modal-body ul,
.modal-body ol {
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
