body.dark-mode {
    --primary-color: #E33A22;    /* Red from logo palette */
    --secondary-color: #F2B014;  /* Orange from logo palette */
    --success-color: #4DB5B0;    /* Teal from logo palette */
    --error-color: #FA5252;      /* Bright red for error states */
    --background-color: #121212; /* Deep dark background */
    --card-color: #1E1E1E;       /* Slightly lighter dark for cards */
    --text-color: #ECE0B0;       /* Beige from logo palette for main text */
    --light-text: #A0A0A0;       /* Orange for accent/highlight text */
    --border-color: #E33A22;     /* Red border for contrast */
    --chip-bg: #4D1C11;          /* Deep red-brown for chips */
    --chip-hover: #6D2C21;       /* Slightly lighter red-brown for hover */
    --accent-color: #F2B014;     /* Orange as an additional accent color */
    --transition: all 0.3s ease;
}

body.light-mode {
    --primary-color: #4C6EF5;
    --secondary-color: #F06595;
    --success-color: #40C057;
    --error-color: #FA5252;
    --background-color: #F8F9FA;
    --card-color: #FFFFFF;
    --text-color: #343A40;
    --light-text: #6C757D;
    --border-color: #DEE2E6;
    --chip-bg: #EDF2FF;
    --chip-hover: #DBE4FF;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
}

.card {
    background-color: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.input-section {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--chip-hover);
}

.primary-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(76, 110, 245, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
/*.success-animation {*/
/*    text-align: center;*/
/*    padding: 2rem 0;*/
/*}*/

/*.success-animation p {*/
/*    margin-top: 1rem;*/
/*    color: var(--success-color);*/
/*    font-weight: 600;*/
/*}*/

/*.checkmark-circle {*/
/*    width: 56px;*/
/*    height: 56px;*/
/*    position: relative;*/
/*    display: inline-block;*/
/*    vertical-align: top;*/
/*    margin-left: auto;*/
/*    margin-right: auto;*/
/*}*/

/*.checkmark-circle .background {*/
/*    width: 56px;*/
/*    height: 56px;*/
/*    border-radius: 50%;*/
/*    background: var(--success-color);*/
/*    position: absolute;*/
/*}*/

/*.checkmark {*/
/*    border-radius: 50%;*/
/*    display: block;*/
/*    stroke-width: 6;*/
/*    stroke: var(--success-color);*/
/*    stroke-miterlimit: 10;*/
/*    margin: 10% auto;*/
/*    box-shadow: inset 0px 0px 0px var(--success-color);*/
/*    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;*/
/*    position: relative;*/
/*    width: 56px;*/
/*    height: 56px;*/
/*}*/

/*.checkmark-circle .checkmark.draw:after {*/
/*    animation-delay: 100ms;*/
/*    animation-duration: 1s;*/
/*    animation-timing-function: ease;*/
/*    animation-name: checkmark;*/
/*    transform: scaleX(-1) rotate(135deg);*/
/*    animation-fill-mode: forwards;*/

/*    content: '';*/
/*    transform-origin: left top;*/
/*    border-right: 3px solid var(--success-color);*/
/*    border-top: 3px solid var(--success-color);*/
/*    border-radius: 2.5px !important;*/
/*    position: absolute;*/
/*    left: 14px;*/
/*    top: 26px;*/
/*    width: 25px;*/
/*    height: 12.5px;*/
/*}*/

/*@keyframes checkmark {*/
/*    0% {*/
/*        height: 0;*/
/*        width: 0;*/
/*        opacity: 1;*/
/*    }*/
/*    20% {*/
/*        height: 0;*/
/*        width: 10px;*/
/*        opacity: 1;*/
/*    }*/
/*    40% {*/
/*        height: 5px;*/
/*        width: 25px;*/
/*        opacity: 1;*/
/*    }*/
/*    100% {*/
/*        height: 12.5px;*/
/*        width: 25px;*/
/*        opacity: 1;*/
/*    }*/
/*}*/

/*!* Error Message *!*/
/*.error-message {*/
/*    text-align: center;*/
/*    padding: 2rem 0;*/
/*}*/

/*.error-message p {*/
/*    margin-top: 1rem;*/
/*    color: var(--error-color);*/
/*    font-weight: 600;*/
/*}*/

/*.error-icon {*/
/*    width: 56px;*/
/*    height: 56px;*/
/*    border-radius: 50%;*/
/*    background-color: var(--error-color);*/
/*    color: white;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    font-size: 32px;*/
/*    font-weight: bold;*/
/*    margin: 0 auto;*/
/*}*/

.examples {
    text-align: center;
    margin-bottom: 2rem;
}

.examples h3 {
    margin-bottom: 1rem;
    color: var(--light-text);
    font-weight: 500;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.chip {
    background-color: var(--chip-bg);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-color);
}

.chip:hover {
    background-color: var(--chip-hover);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
    padding-top: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.85rem;
}

footer a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.user-info, .date-info {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .example-chips {
        flex-direction: column;
        align-items: center;
    }

    .chip {
        width: 80%;
    }
}

.success-message {
    text-align: center;
    padding: 2rem 0;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    color: #4CAF50;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #4CAF50;
    stroke-miterlimit: 10;
    margin: 0 auto 1rem;
    box-shadow: 0px 0px 0px #4CAF50;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4CAF50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4CAF5000;
    }
}

.timestamp {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #adb5bd;
}

/* Theme Toggle Switch - Updated */
.theme-toggle-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
    gap: 10px;
    z-index: 1000;
}

.theme-text {
    color: var(--text-color);
    font-weight: 600;
}

.theme-toggle {
    position: relative;
    width: 60px;
    height: 35px;
}

.theme-switch {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-color);
    transition: var(--transition);
    border-radius: 34px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-switch-inner {
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    border-radius: 34px;
    transition: var(--transition);
}

.theme-switch-inner:before {
    content: "☀️";
    position: absolute;
    left: 10px;
    bottom: 2px;
    font-size: 14px;
}

.theme-switch-inner:after {
    content: "🌙";
    position: absolute;
    right: 10px;
    bottom: 2px;
    font-size: 14px;
}

.theme-switch-switch {
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.theme-switch:checked + .theme-switch-label {
    background-color: var(--chip-bg);
}

.theme-switch:checked + .theme-switch-label .theme-switch-switch {
    transform: translateX(30px);
    background-color: var(--secondary-color);
}

.theme-switch:focus + .theme-switch-label {
    box-shadow: 0 0 3px var(--primary-color);
}

/* App Promo Card */
.promo-card {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.app-icon {
    /*width: 250px;*/
    height: 325px;
}

.promo-text {
    flex: 1;
}

.promo-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.promo-text p {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.app-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.app-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .promo-content {
        flex-direction: column;
        text-align: center;
    }

    .promo-text {
        text-align: center;
    }
}

/* Theme-specific images */
.dark-mode-image {
    display: none;
}

.light-mode-image {
    display: none;
}

body.dark-mode .dark-mode-image {
    display: block;
}

body.dark-mode .light-mode-image {
    display: none;
}

body.light-mode .dark-mode-image {
    display: none;
}

body.light-mode .light-mode-image {
    display: block;
}

/* Altcha Widget */
.altcha-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.char-counter.limit-reached {
    color: var(--error-color);
    font-weight: 600;
}

/* Model Selection Dropdown */
.model-selection {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-selection label {
    margin-bottom: 0;
    min-width: 80px;
}

.model-selection select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.model-selection select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--chip-hover);
}