/* Base Styles */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    border: none;
}

:root {
    --primary-color: #e0e5ec;
    --secondary-color: #d1d9e6;
    --text-color: #4a4a4a;
    --shadow-color: #a3b1c6;
    --highlight-color: #ffffff;
    --transition-duration: 0.2s ;
    --outer-shadow: 4px 4px 8px var(--shadow-color),
                    -4px -4px 8px var(--highlight-color);
    --outer-shadow-small: 2px 2px 4px var(--shadow-color),
                          -2px -2px 4px var(--highlight-color);
    --inner-shadow: inset 2px 2px 5px var(--shadow-color),
                    inset -2px -2px 5px var(--highlight-color);
    --inner-shadow-deep: inset 4px 4px 8px var(--shadow-color),
                         inset -4px -4px 8px var(--highlight-color);
    --text-shadow: 0.5px 0.5px 2px #00000088;
}

body, .container, .navbar, .nav-button, .option-button, .result-display, .text-input, .toast {
    background-color: var(--primary-color);
}

body, .nav-button, .option-button, .text-input, #passwordDisplay, #uuidDisplay, #totpDisplay {
    text-shadow: var(--text-shadow);
}

body, .container, .navbar, .nav-button, .option-button, .result-display, .text-input, .toast, .section, .toast {
    transition: all var(--transition-duration);
}

body, .container, .navbar, .option-button, .result-display, .toast, .options-group, .totp-display-container {
    border-radius: 15px;
}

.container, .navbar, .option-button, .result-display, .toast, .options-group, .totp-display-container {
    box-shadow: var(--outer-shadow);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container, .text-input, .result-display {
    width: 100%;
    box-sizing: border-box;
}

.container {
    padding: 30px;
    max-width: 600px;
}

.navbar, .options-group {
    display: flex;
    padding: 5px;
}

.navbar {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.navbar-slider, .timer-bar {
    position: absolute;
    height: calc(100% - 10px);
    transition: all var(--transition-duration) ease;
}

.navbar-slider {
    border-radius: 10px;
    box-shadow: var(--inner-shadow);
    z-index: 2;
}

.nav-button, .option-button {
    cursor: pointer;
    color: var(--text-color);
}

.nav-button {
    flex: 1;
    min-width: 60px;
    padding: 10px 0px;
    text-align: center;
    position: relative;
    z-index: 1;
    font-weight: normal;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: transparent;
}

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
}

.section.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

h1 {
    margin: 0 0 20px;
    font-weight: 600;
    font-size: 24px;
    text-shadow: var(--text-shadow);
}

.slider-container, .options-container {
    margin-bottom: 20px;
}

.slider-label, .options-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--primary-color);
    outline: none;
    border-radius: 3px;
    box-shadow: var(--inner-shadow);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: var(--outer-shadow);
}

.options-group {
    box-shadow: var(--inner-shadow);
}

.option-button {
    flex: 1;
    padding: 10px 0px;
    margin: 5px;
    border-radius: 10px;
}

.option-button:hover, .result-display:hover {
    box-shadow: var(--outer-shadow-small);
}

.option-button:active, .option-button.active {
    box-shadow: var(--inner-shadow);
    transform: translateY(2px);
}

.option-button:active:hover, .option-button.active:hover, .text-input:hover, .navbar-slider:hover, #qrDisplay:hover {
    box-shadow: var(--inner-shadow-deep);
}

.result-display {
    padding: 15px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

.result-display:active {
    box-shadow: var(--inner-shadow-deep);
    transform: translateY(2px);
}

.text-input {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 10px;
    outline: none;
    resize: vertical;
    box-shadow: var(--inner-shadow);
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    opacity: 0;
}

.toast.show {
    opacity: 1;
}

#passwordDisplay, #uuidDisplay, #totpDisplay {
    font-family: Consolas, 'Courier New', monospace;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#passwordDisplay, #uuidDisplay {
    font-size: 20px;
}

#totpDisplay {
    padding: 8px;
    font-size: 40px;
    position: relative;
    z-index: 2;
    border-radius: 10px;
}

#qrDisplay, .totp-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

#qrDisplay {
    min-height: 286px;
    margin-top: 10px;
    box-shadow: var(--inner-shadow);
}

.totp-display-container {
    position: relative;
    padding: 15px;
    box-shadow: var(--inner-shadow);
}

.timer-bar {
    top: 0;
    left: 0;
    width: 100%;
    background-color: #4A4A4A;
    opacity: 0.2;
    z-index: 1;
    transition: width 1s cubic-bezier(.2, .3, .3, 1);
    pointer-events: none;
    height: 100%;
    box-shadow: var(--inner-shadow-deep);
}