html {
    height: 100%;
    background-color: #3d2415;
    background-image: url('/img/site/background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
}

body {
    margin: 0;
    padding: 30px 0; 
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; 
}

@keyframes fadeScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.form-container {
    position: relative;
    padding: 24px;
    width: 280px;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(150deg, #5b3a22 0%, #4b301c 50%, #3d2415 100%);
    border: 2px solid #2a1a11;
    box-shadow: 0 6px 18px rgba(0,0,0,0.75), inset 0 0 5px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: fadeScaleIn 0.6s ease-out forwards;
}

.logo {
    width: 180px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55));
}

input[type="text"],
input[type="email"],
input[type="password"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    padding: 7px;
    border: 2px solid #2c1b10;
    border-radius: 5px;
    margin-top: 8px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #2e1e13, #3c281c);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.45);
    font-family: 'VT323', monospace;
    font-size: var(--fs-base);
    color: #e8d8c3;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.password-wrapper {
    position: relative;
    display: inline-block;
    width: 90%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 38px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: #a89070;
    width: auto;
    box-shadow: none;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #d9b37e;
}

.password-toggle::before {
    display: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

input:focus {
    border-color: #a87a43;
    outline: none;
    box-shadow: 0 0 8px rgba(160,110,60,0.45), inset 0 0 6px rgba(0,0,0,0.4);
}

.hint {
    width: 90%;
    font-size: var(--fs-x-small);
    color: #c9a86b;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
    pointer-events: none;
    text-align: center;
}

.hint.second {
    margin-top: 0;
}

input:focus + .hint,
input:focus + .hint + .hint.second,
.password-wrapper:has(input:focus) + .hint,
.password-wrapper:has(input:focus) + .hint + .hint.second {
    opacity: 1;
    transform: translateY(0);
    max-height: 3em;
    margin: -6px auto 6px;
}

input:focus + .hint + .hint.second,
.password-wrapper:has(input:focus) + .hint + .hint.second {
    margin-top: -2px;
    max-height: 6em;
}

button {
    width: 92%;
    padding: 13px 10px;
    margin: 12px 0;
    background: linear-gradient(180deg, #d5b06a 0%, #b07b3c 100%);
    border: 3px solid #2d1b0d;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #1a0e05;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 #2d1b0d,
        0 6px 12px rgba(0,0,0,0.7);
    transition: background .25s;
    text-align: center;
}

button::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 5px;
    background: linear-gradient(120deg,
        #e8d08c,
        #f9e49a,
        #c89a5a,
        #e8d08c
    );
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity .25s;
}

button:hover::before {
    opacity: .5;
}

@keyframes innerGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

button span {
    position: relative;
    z-index: 1;
}

.button-disabled {
    opacity: .45;
    pointer-events: none;
    user-select: none;
}

.terms-container {
    width: 90%;
    margin: 4px auto 8px;
    display: flex;
    align-items: center;
    text-align: left;
    line-height: 1.4;
    font-size: var(--fs-small);
    color: #e8d8c3;
}

.terms-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #a87a43;
}

.terms-container a {
    color: #d9b37e;
    text-decoration: none;
}

.terms-container a:hover {
    text-decoration: underline;
}

.toggle-link {
    margin-top: 16px;
    font-size: var(--fs-small);
    color: #e8d8c3;
    line-height: 1.5;
}

.toggle-link a {
    color: #d9b37e;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-link a:hover:not(.disabled) {
    text-decoration: underline;
    color: #e8c99a;
}

.toggle-link a.disabled {
    color: #7a6550;
    cursor: not-allowed;
    pointer-events: none;
}

.welcome-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.welcome-wrapper h2,
.welcome-wrapper p,
.welcome-wrapper form {
    margin: 0;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: var(--fs-small);
    color: #e8d8c3;
    margin-bottom: 2px;
}

.welcome-plants {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-plants-name {
    flex: 1;
    color: #e8d8c3;
    font-size: var(--fs-small);
    text-align: center;
    line-height: 1.4;
}

.welcome-plants-shelf {
    position: relative;
    background: linear-gradient(145deg, #2e1e13, #3c281c);
    border: 2px solid rgba(44, 27, 16, 0.95);
    border-radius: 8px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.35);
    padding: 10px 20px;
}

.welcome-plants-niche {
    background: linear-gradient(135deg, #5b3a22 0%, #4b301c 100%);
    border: 3px solid #2a1a11;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 0 6px rgba(0,0,0,0.4);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-plants-viewport {
    width: 64px;
    height: 64px;
    overflow: hidden;
    position: relative;
}

.welcome-plants-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.welcome-plants-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: pixelated;
}

.welcome-plants-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 44px;
    background: linear-gradient(180deg, #d5b06a 0%, #b07b3c 100%);
    border: 2px solid #2d1b0d;
    border-radius: 4px;
    box-shadow: 0 3px 0 #2d1b0d, 0 4px 8px rgba(0,0,0,0.6);
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #1a0e05;
    font-size: 22px;
    line-height: 1;
    overflow: hidden;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    z-index: 1;
}

.welcome-plants-prev {
    left: -14px;
}

.welcome-plants-next {
    right: -14px;
}

.welcome-plants-arrow::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 2px;
    background: linear-gradient(120deg, #e8d08c, #f9e49a, #c89a5a, #e8d08c);
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

.welcome-plants-arrow:hover::before {
    opacity: 0.5;
}

.welcome-plants-arrow:hover {
    background: linear-gradient(180deg, #e8c99a 0%, #c89a5a 100%);
    box-shadow: 0 3px 0 #2d1b0d, 0 5px 10px rgba(0,0,0,0.7);
}

.welcome-plants-arrow:active {
    transform: translateY(calc(-50% + 2px));
    box-shadow: 0 1px 0 #2d1b0d, 0 2px 4px rgba(0,0,0,0.5);
}

.welcome-plants-arrow span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    line-height: 1;
}

.guest-btn {
    width: 92%;
    padding: 13px 10px;
    margin: 12px 0;
    background: linear-gradient(180deg, #6b7c3f 0%, #5a6b35 100%);
    border: 3px solid #7d8f4a;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 #2d1b0d,
        0 6px 12px rgba(0,0,0,0.7);
    transition: background .25s;
    text-align: center;
}

.guest-btn::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 5px;
    background: linear-gradient(120deg,
        #7d8f4a,
        #8ba055,
        #6b7c3f,
        #7d8f4a
    );
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity .25s;
}

.guest-btn:hover::before {
    opacity: .5;
}

.guest-btn:hover {
    background: linear-gradient(180deg, #7d8f4a 0%, #6b7c3f 100%);
}

.guest-btn span {
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .form-container {
        width: 90%;
        padding: 20px;
        box-sizing: border-box;
    }
	
    .logo {
        width: 160px;
    }
	
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 9px;
    }
	
    button {
        padding: 13px;
        margin-top: 14px;
        margin-bottom: 10px;
    }
	
    .terms-container {
        margin-bottom: 12px;
        font-size: var(--fs-base);
        line-height: 1.5;
    }
	
    .terms-container input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin-right: 8px;
    }
}
