:root {
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-color: #667eea;
    --primary-light: rgba(102, 126, 234, 0.1);
    --primary-focus: rgba(102, 126, 234, 0.15);
}

@keyframes rainbow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--primary-light), 0 0 10px var(--primary-light);
    }

    50% {
        box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-light), 0 0 30px var(--primary-light);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

[data-theme="blue"] {
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-color: #667eea;
    --primary-light: rgba(102, 126, 234, 0.1);
    --primary-focus: rgba(102, 126, 234, 0.15);
}

[data-theme="rainbow"] {
    --primary-start: #ff0000;
    --primary-end: #ff7f00;
    --primary-color: #ff0000;
    --primary-light: rgba(255, 0, 0, 0.1);
    --primary-focus: rgba(255, 0, 0, 0.15);
}

[data-theme="rainbow"] html,
[data-theme="rainbow"] body {
    background: linear-gradient(-45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    animation: rainbow 8s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

[data-theme="pink"] {
    --primary-start: #f093fb;
    --primary-end: #f5576c;
    --primary-color: #f093fb;
    --primary-light: rgba(240, 147, 251, 0.1);
    --primary-focus: rgba(240, 147, 251, 0.15);
}

[data-theme="green"] {
    --primary-start: #4facfe;
    --primary-end: #00f2fe;
    --primary-color: #4facfe;
    --primary-light: rgba(79, 172, 254, 0.1);
    --primary-focus: rgba(79, 172, 254, 0.15);
}

[data-theme="dark"] {
    --primary-start: #2d3748;
    --primary-end: #1a202c;
    --primary-color: #4a5568;
    --primary-light: rgba(74, 85, 104, 0.1);
    --primary-focus: rgba(74, 85, 104, 0.15);
}

[data-theme="sunset"] {
    --primary-start: #ff6a00;
    --primary-end: #ee0979;
    --primary-color: #ff6a00;
    --primary-light: rgba(255, 106, 0, 0.1);
    --primary-focus: rgba(255, 106, 0, 0.15);
}

[data-theme="ocean"] {
    --primary-start: #00d2ff;
    --primary-end: #3a7bd5;
    --primary-color: #00d2ff;
    --primary-light: rgba(0, 210, 255, 0.1);
    --primary-focus: rgba(0, 210, 255, 0.15);
}

[data-theme="forest"] {
    --primary-start: #11998e;
    --primary-end: #38ef7d;
    --primary-color: #11998e;
    --primary-light: rgba(17, 153, 142, 0.1);
    --primary-focus: rgba(17, 153, 142, 0.15);
}

[data-theme="candy"] {
    --primary-start: #fc6c8f;
    --primary-end: #6c5ce7;
    --primary-color: #fc6c8f;
    --primary-light: rgba(252, 108, 143, 0.1);
    --primary-focus: rgba(252, 108, 143, 0.15);
}

[data-theme="fire"] {
    --primary-start: #f83600;
    --primary-end: #f9d423;
    --primary-color: #f83600;
    --primary-light: rgba(248, 54, 0, 0.1);
    --primary-focus: rgba(248, 54, 0, 0.15);
}

[data-theme="galaxy"] {
    --primary-start: #7f00ff;
    --primary-end: #e100ff;
    --primary-color: #7f00ff;
    --primary-light: rgba(127, 0, 255, 0.1);
    --primary-focus: rgba(127, 0, 255, 0.15);
}

[data-theme="mint"] {
    --primary-start: #56ab2f;
    --primary-end: #a8e063;
    --primary-color: #56ab2f;
    --primary-light: rgba(86, 171, 47, 0.1);
    --primary-focus: rgba(86, 171, 47, 0.15);
}

[data-theme="peach"] {
    --primary-start: #ed4264;
    --primary-end: #ffedbc;
    --primary-color: #ed4264;
    --primary-light: rgba(237, 66, 100, 0.1);
    --primary-focus: rgba(237, 66, 100, 0.15);
}

[data-theme="night"] {
    --primary-start: #0f2027;
    --primary-end: #2c5364;
    --primary-color: #203a43;
    --primary-light: rgba(32, 58, 67, 0.1);
    --primary-focus: rgba(32, 58, 67, 0.15);
}

[data-theme="lavender"] {
    --primary-start: #a18cd1;
    --primary-end: #fbc2eb;
    --primary-color: #a18cd1;
    --primary-light: rgba(161, 140, 209, 0.1);
    --primary-focus: rgba(161, 140, 209, 0.15);
}

[data-theme="cherry"] {
    --primary-start: #eb3349;
    --primary-end: #f45c43;
    --primary-color: #eb3349;
    --primary-light: rgba(235, 51, 73, 0.1);
    --primary-focus: rgba(235, 51, 73, 0.15);
}

[data-theme="gold"] {
    --primary-start: #f7971e;
    --primary-end: #ffd200;
    --primary-color: #f7971e;
    --primary-light: rgba(247, 151, 30, 0.1);
    --primary-focus: rgba(247, 151, 30, 0.15);
}

[data-theme="cyberpunk"] {
    --primary-start: #ff00cc;
    --primary-end: #00ffff;
    --primary-color: #ff00cc;
    --primary-light: rgba(255, 0, 204, 0.1);
    --primary-focus: rgba(255, 0, 204, 0.15);
}

* {
    box-sizing: border-box;
}

html,
body {
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    color: #2d3748;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    width: 550px;
    max-width: 90%;
    margin: 1rem auto;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f7fafc;
}

input[type="password"] {
    padding-right: 6rem;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

input[type="text"]:read-only {
    background-color: #edf2f7;
    cursor: pointer;
}

input[type="button"] {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--primary-light);
}

input[type="button"]:active {
    transform: translateY(0);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.eye-btn {
    position: absolute;
    right: 0.5rem;
    bottom: 0.375rem;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    flex-shrink: 0;
    z-index: 10;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.eye-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.eye-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background: var(--primary-focus);
}

.eye-btn:active {
    transform: scale(0.95);
}

input[type="radio"] {
    cursor: pointer;
    margin: 0 0.25rem;
    accent-color: var(--primary-color);
}

#hint {
    position: absolute;
    right: 3rem;
    bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    font-family: monospace;
    background: transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 5;
    pointer-events: none;
}

.row {
    margin-bottom: 1.5rem;
    position: relative;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.row:nth-child(1) {
    animation-delay: 0.1s;
}

.row:nth-child(2) {
    animation-delay: 0.2s;
}

.row:nth-child(3) {
    animation-delay: 0.3s;
}

.row:nth-child(4) {
    animation-delay: 0.4s;
}

.row.hash-row {
    position: relative;
}

.hidden {
    display: none !important;
}

#settings {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

#settings.hidden {
    display: none;
}

.form-group h2 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 700;
}

.form-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-group li {
    padding: 0.5rem 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.form-group label {
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
    margin: 0;
}

.form-group.radio ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.form-group.radio li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.form-group.radio li:hover {
    background: #edf2f7;
}

.form-group.radio label {
    font-weight: 500;
    color: #4a5568;
    min-width: 25px;
}

.form-group.radio input {
    margin-right: 0.5rem;
}

.checkboxlabel {
    cursor: pointer;
    user-select: none;
}

.col {
    width: 100%;
}

/* Responsive design */
@media (min-width: 768px) {
    form {
        padding: 2.5rem;
    }

    .row.main-fields {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        align-items: start;
    }

    .col:first-child {
        flex: 1;
    }

    .col:last-child {
        width: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    #settings .col {
        display: inline-block;
        width: 48%;
        vertical-align: top;
        margin-right: 2%;
    }

    #settings .col:last-child {
        margin-right: 0;
    }
}

@media (max-width: 767px) {

    html,
    body {
        min-height: 100vh;
        height: auto;
    }

    body {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    form {
        margin: 0;
        padding: 1.25rem;
        width: 100%;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .row {
        margin-bottom: 1rem;
    }

    input[type="button"] {
        margin-top: 0.5rem;
    }

    #hint {
        right: 2.5rem;
        bottom: 0.65rem;
    }

    .eye-btn {
        right: 0.375rem;
        bottom: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {

    html,
    body {
        font-size: 14px;
    }

    form {
        padding: 1rem;
    }

    label {
        font-size: 0.85rem;
    }

    .form-group h2 {
        font-size: 1rem;
    }
}

/* Notyf notification styles - Modern redesign */
@keyframes notyfSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes notyfSlideDown {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
}

@keyframes progressBar {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.notyf__icon--alert,
.notyf__icon--confirm {
    height: 24px;
    width: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: iconBounce 0.5s ease;
}

.notyf__icon--alert:after,
.notyf__icon--alert:before {
    content: "";
    background: #fff;
    display: block;
    position: absolute;
    width: 3px;
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.notyf__icon--alert:before {
    height: 10px;
    top: 4px;
}

.notyf__icon--alert:after {
    height: 3px;
    top: 16px;
}

.notyf__icon--confirm:after,
.notyf__icon--confirm:before {
    content: "";
    background: #fff;
    display: block;
    position: absolute;
    width: 3px;
    border-radius: 3px;
}

.notyf__icon--confirm:after {
    height: 6px;
    transform: rotate(-45deg);
    left: 7px;
    top: 10px;
}

.notyf__icon--confirm:before {
    height: 11px;
    transform: rotate(45deg);
    right: 7px;
    top: 6px;
}

.notyf__toast {
    display: block;
    overflow: hidden;
    animation: notyfSlideUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    border-radius: 12px;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    min-width: 300px;
}

.notyf__toast::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    animation: progressBar 2s linear forwards;
    border-radius: 0 0 12px 12px;
}

.notyf__toast.notyf--alert {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.notyf__toast.notyf--confirm {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.notyf__toast.notyf--disappear {
    animation: notyfSlideDown 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.notyf__toast.notyf--disappear .notyf__message,
.notyf__toast.notyf--disappear .notyf__icon {
    animation: none;
}

.notyf__wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 12px;
}

.notyf__icon {
    flex-shrink: 0;
    font-size: 1.3em;
    opacity: 1;
}

.notyf__message {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    opacity: 1;
    letter-spacing: 0.3px;
}

.notyf {
    position: fixed;
    bottom: 30px;
    right: 30px;
    max-width: 400px;
    color: #fff;
    z-index: 10000;
    pointer-events: none;
}

@media only screen and (max-width:736px) {
    .notyf__container {
        width: 90%;
        margin: 0 auto;
        display: block;
        right: 0;
        left: 0
    }
}