:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #dcdde1;
    --highlight-background: #8d0be5;
    --highlight-text: #ffffff;
    --highlight-colors: #ff7979, #badc58, #7ed6df, #e056fd, #686de0, #30336b;
    --warning-color: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 20px;
    font-size: 18px;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2.5em;
}

.settings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.mode-selector {
    text-align: center;
    margin-bottom: 30px;
}

.mode-selector label {
    display: block;
    font-weight: bold;
    font-size: 1.2em;
}

.mode-buttons {
    display: inline-flex;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 5px;
    border: 2px solid var(--border-color);
}

.mode-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    font-weight: 500;
}

.mode-btn:hover {
    background: rgba(52, 152, 219, 0.1);
}

.mode-btn.active {
    background: var(--secondary-color);
    color: white;
}

.seed-input {
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.seed-input label {
    margin-right: 15px;
    font-weight: bold;
    font-size: 1.2em;
}

.seed-input input {
    padding: 17px 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.1em;
    width: 350px;
    transition: all 0.3s ease;
}

.seed-input input.warning {
    border-color: var(--warning-color);
    background-color: rgba(231, 76, 60, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

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

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

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

.text-containers {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.text-container {
    flex: 1;
}

h2 {
    margin-bottom: 15px;
    font-size: 1.4em;
    color: var(--primary-color);
}

.text-field {
    min-height: 300px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background-color: white;
    overflow-y: auto;
    font-size: 1em;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.text-field:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

/* Highlight styles */
.encrypted-highlight {
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: inline;
    background-color: var(--highlight-background) !important;
    color: var(--highlight-text);
}

#original-text .encrypted-highlight {
    background-color: transparent !important;
    color: inherit;
    padding: 0;
    cursor: text;
}

.encrypted-highlight:hover {
    opacity: 0.8;
}

.hidden {
    display: none !important;
}