/**
 * Abyssal Puzzle - 公共 CSS 样式
 * 包含密码表单、冷却激活等公共样式
 */

/* ========== 密码表单基础样式 ========== */

.form-container,
.password-form {
    background-color: rgba(30, 30, 30, 0.85);
    padding: 30px 40px;
    border-radius: 10px;
    border: 1px solid #555;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.password-form {
    position: sticky;
    bottom: 0;
    padding: 10px 0 0;
    margin: 0;
    width: 100%;
}

.form-container input[type="text"],
.password-form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background: #333;
    color: #fff;
    border: 1px solid #666;
    display: block;
    border-radius: 4px;
    font-size: 1em;
}

.password-form input[type="text"] {
    width: calc(100% - 18px);
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 0;
}

.form-container button,
.password-form button {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    color: #fff;
    border: none;
    cursor: pointer;
    display: block;
    border-radius: 4px;
    font-size: 1.1em;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.password-form button {
    padding: 8px;
    border-radius: 0;
}

.form-container button:not(:disabled):hover,
.password-form button:not(:disabled):hover {
    background: #45a049;
}

.form-container button:disabled,
.password-form button:disabled {
    background: #666;
    cursor: not-allowed;
}

/* ========== 错误消息样式 ========== */

.error {
    color: red;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
    min-height: 1.2em;
    font-weight: bold;
}

.password-form .error {
    margin-top: 5px;
    font-size: 0.9em;
}

/* ========== 冷却激活样式 ========== */

.form-container.cooldown-active input[type="text"],
.form-container.cooldown-active button,
.password-form.cooldown-active input[type="text"],
.password-form.cooldown-active button {
    background-color: #555 !important;
    border-color: #777 !important;
    color: #aaa !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.form-container.cooldown-active button:hover,
.password-form.cooldown-active button:hover {
    background-color: #555 !important;
}

/* ========== 音乐控制按钮样式 ========== */

.music-control {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 15px;
    background-color: rgba(30, 30, 30, 0.85);
    border: 2px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.music-control:hover {
    background-color: rgba(50, 50, 50, 0.9);
    border-color: #6cf;
    box-shadow: 0 2px 10px rgba(108, 207, 255, 0.3);
}

.music-control:active {
    transform: scale(0.95);
}