/* 2025-10-26 17:36 PM */
:root {
    --canvas-rgb: 150, 100, 200;
    --input-bg-color: rgba(var(--canvas-rgb), 0.3);
    --wizard-border-color: hsl(270, 10%, 35%);
    --wizard-text-main: hsl(270, 20%, 85%);
    --wizard-text-header: hsl(270, 30%, 95%);
    --wizard-text-muted: hsl(270, 15%, 65%);
    --wizard-accent-color: hsl(270, 25%, 45%);
    --wizard-accent-hover-color: hsl(270, 30%, 30%);
}

#bg-image.loaded {
    opacity: 0.5;
}

.logo-title {
    font-family: "Monoton", sans-serif;
    font-weight: normal;
    text-shadow: 0 0 20px var(--accent-color);
    color: var(--text-color);
}

.logo-subtitle {
    margin-left: 0.05rem;
    letter-spacing: 0.05rem;
}

.wizard-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(10, 5, 20, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 1rem;
}
.wizard-container:not(.hidden) { opacity: 1; }

.wizard-header-controls {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 105;
    display: flex;
    gap: 0.5rem;
}
.wizard-header-btn {
    background: transparent;
    border: none;
    color: var(--wizard-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.wizard-header-btn:hover {
    color: var(--wizard-text-header);
    background: rgba(255, 255, 255, 0.1);
}
.wizard-header-btn .material-symbols-outlined {
    font-size: 24px;
}

.wizard-content {
    width: 100%;
    max-width: 30rem;
    height: auto;
    max-height: 90vh;
    text-align: center;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
}

.wizard-content.full-width {
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
    padding: 2rem 0;
    box-sizing: border-box;
}
.wizard-content.full-height {
    max-height: 90vh;
    height: auto;
}

.wizard-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: wizardStepFadeIn 0.5s ease;
    flex-grow: 1;
    min-height: 0;
}

@keyframes wizardStepFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-status-message {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    font-size: 0.9rem;
    color: var(--wizard-text-muted);
    text-align: center;
}

.wizard-instruction {
    font-size: 1rem;
    color: var(--wizard-text-muted);
    margin-top: 1.5rem;
}

.wizard-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--wizard-accent-color);
    color: #FFF;
    font-family: 'Kanit', sans-serif;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}
.wizard-button:hover {
    background: var(--wizard-accent-hover-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}
.wizard-button:active {
    transform: translateY(0);
}

.lang-modal-container.wizard-lang-modal {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 5, 20, 0.95);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wizardStepFadeIn 0.3s ease;
    transition: opacity 0.3s ease;
}
.lang-modal-container.fade-out {
    opacity: 0;
}
.lang-modal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}
.lang-modal-content {
    text-align: center;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--wizard-border-color) transparent;
    border-radius: 8px;
    scrollbar-gutter: stable;
}
.lang-modal-content::-webkit-scrollbar {
    width: 6px;
}
.lang-modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.75rem 0;
}
.lang-modal-content::-webkit-scrollbar-thumb {
    background-color: var(--wizard-border-color);
    border-radius: 3px;
}
.lang-modal-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--wizard-accent-color);
}

.lang-modal-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--wizard-text-header);
    margin-bottom: 2rem;
}
.lang-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lang-modal-content li {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--wizard-text-muted);
    padding: 0.75rem 0;
    margin: 0.75rem 0;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    background: transparent;
    backdrop-filter: none;
    transition: color 0.3s ease, border-bottom-color 0.3s ease, font-weight 0.3s ease;
}
.lang-modal-content li:hover {
    color: var(--wizard-text-header);
    font-weight: 500;
    border-bottom-color: var(--wizard-accent-color);
    background: transparent;
    transform: none;
    box-shadow: none;
}

.wizard-loading-step .icon-color {
    font-size: 3rem;
    color: var(--wizard-accent-color);
}

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

.wizard-error-step {
    gap: 1.5rem;
}
.wizard-error-message {
    color: #ffcdd2;
    font-size: 1rem;
    margin-top: 0;
}
.wizard-error-close-btn {
    background: transparent;
    border: 1px solid var(--wizard-border-color);
}
.wizard-error-close-btn:hover {
    background: var(--wizard-border-color);
}

.wizard-result-view {
    justify-content: space-between;
}
.wizard-result-frame {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--wizard-border-color);
    border-radius: 12px;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    padding: 1em;
    box-sizing: border-box;
    display: flex;
    min-height: 0;
}
.wizard-result-content {
    width: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: var(--wizard-border-color) transparent;
}
.wizard-result-content.has-scrollbar {
    padding-right: 1rem;
}
.wizard-result-content::-webkit-scrollbar {
    width: 6px;
}
.wizard-result-content::-webkit-scrollbar-track {
    background: transparent;
}
.wizard-result-content::-webkit-scrollbar-thumb {
    background-color: var(--wizard-border-color);
    border-radius: 3px;
}
.wizard-result-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--wizard-accent-color);
}

.wizard-result-footer {
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}
.wizard-result-footer.visible {
    opacity: 1;
}
.wizard-result-footer .wizard-button {
    background: var(--wizard-accent-color); 
    color: #FFFFFF;
    padding: 0.6rem; 
    font-size: 0.9rem;
    box-shadow: none;
    width: 44px; 
    height: 44px; 
    justify-content: center;
}
.wizard-result-footer .wizard-button:hover { 
    background: var(--wizard-accent-hover-color); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
}

.result-section { 
    margin-bottom: 2rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 1px dashed var(--wizard-border-color); 
}
.result-section:last-of-type { 
    margin-bottom: 0; 
    border-bottom: none; 
}
.wizard-result-title { 
    color: var(--wizard-text-muted); 
    font-size: 1rem; 
    font-weight: normal; 
    margin-bottom: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
}
.wizard-result-text { 
    font-size: 0.95rem; 
    color: var(--wizard-text-main); 
    line-height: 1.7; 
    white-space: pre-wrap; 
    word-break: keep-all; 
}

.wizard-result-text.typing::after {
    content: '|';
    animation: wizardBlink 0.7s infinite;
}
@keyframes wizardBlink {
    50% { opacity: 0; }
}

.fab.cooldown-active,
.fab.cooldown-active:hover {
    opacity: 0.4;
    cursor: not-allowed;
    transform: scale(1);
}

.fab.cooldown-active:hover .icon-color {
    opacity: 0.7;
}