:root {
    --zen-background: #f0f4f0;
    --moss-green: #6b8e23;
    --stone-gray: #8b8989;
    --bamboo-text: #2c4b36;
    --water-accent: #87ceeb;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--zen-background);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    perspective: 1000px;
}

.zen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.signin-panel {
    position: relative;
    width: 400px;
    height: 550px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.moss-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.1), rgba(107, 142, 35, 0.03));
    z-index: 1;
}

.signin-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    text-align: center;
}

.stone-emblem {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    transition: transform 0.5s ease;
}

.stone-emblem:hover {
    transform: rotate(10deg);
}

.stone-emblem svg {
    width: 100%;
    height: 100%;
}

h1 {
    color: var(--bamboo-text);
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 1.2em;
    line-height: 1.6;
}

.input-stone {
    position: relative;
    margin-bottom: 20px;
}

.input-stone input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 1px solid var(--moss-green);
    border-radius: 10px;
    background-color: rgba(107, 142, 35, 0.05);
    color: var(--bamboo-text);
    outline: none;
    transition: all 0.3s ease;
}

.input-stone input:focus {
    box-shadow: 0 0 10px rgba(107, 142, 35, 0.3);
    border-color: var(--water-accent);
}

.stone-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.enter-gate {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--moss-green);
    border-radius: 10px;
    background-color: transparent;
    color: var(--bamboo-text);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.enter-gate:hover {
    background-color: var(--moss-green);
    color: white;
}

.enter-gate:active {
    transform: scale(0.95);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.error-message {
  text-align: center;
  margin-top: 10px;
  color: #ff4444;
  font-size: 0.9em;
}

.input-stone.error input {
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.enter-gate.loading {
  position: relative;
  color: transparent;
}

.enter-gate.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.zen-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.zen-footer a {
    color: var(--bamboo-text);
    text-decoration: none;
    font-size: 0.8em;
    opacity: 0.7;
    transition: color 0.3s ease;
}

.zen-footer a:hover {
    color: var(--water-accent);
}

@media (max-width: 450px) {
    .signin-panel {
        width: 95%;
        height: auto;
    }
}